Resources / Integrations & API

Integrations & Partner API

Pull our catalog, stock levels and your account's prices straight into your store, ERP or spreadsheet — and push orders-in-progress into your cart. JSON over HTTPS, for approved wholesale accounts.

Your store or system syncs with B2B Sportswear's live stock and your price, your cart fills automatically, and you check out on the website or in the iPhone app.

In plain words

If you sell our blanks in your own online store (Shopify, WooCommerce, your own site) or keep stock in a system or spreadsheet, the Partner API lets that system talk to ours on its own. It always knows what we have in stock and what you pay, and it can put items in your B2B Sportswear cart when you need to reorder. You still review the cart and place the order yourself, on the website or in the iPhone app.

  • ✓Live stock and your prices, synced all day
  • ✓No more downloading and copying spreadsheets
  • ✓Stop selling items that just sold out
  • ✓Reorders added to your cart automatically
  • ✓Check out on b2bsportswear.com or the iPhone app
  • ✓Free for approved wholesale accounts

Do I need to be technical?

No — but someone has to connect it once. Whoever builds or runs your store or website (a developer, your Shopify expert, or an integration tool you already use) follows the docs below. You request access and approve your keys; they do the hookup.

Can it order or charge me by itself?

Never. It can only read stock and prices and fill your cart. Every order is placed by you at checkout, with your usual shipping, tax-exempt status and payment.

Is it safe?

Access is off until we approve your account, and every key you create waits for our approval too. Keys are shown once, masked, and you can revoke one any time in My Account → API Access.

What does it cost?

Nothing. It is free for approved wholesale accounts; you pay only for what you order.

Products & SKUs

Style, brand, color, size, UPC and a permanent SKU ID for every variant.

Stock

Pieces available across our warehouses, with a timestamp on every response.

Your price

The exact unit price your account pays at checkout, wholesale tier included.

Cart push

Send a list of SKUs and quantities straight into your cart, then check out on the site or app.

How to get access

  1. Open a wholesale account (or sign in).
  2. Go to My Account → API Access and press Request access. Tell us briefly what you'll connect.
  3. Pick what you need: Stock & pricing, Cart push, or both. Each one is approved separately, account by account.
  4. We review it by hand and approve or decline. You'll get an email either way.
  5. Create a key on the same page. It is shown once, masked — use Copy and store it like a password. Your account number is shown next to it.
  6. Each new key shows Pending approval until we approve it; until then it does not work (403 key_pending). Once approved it shows Active and your developer can connect.

Access is closed by default and granted per account. Questions: info@b2bsportswear.com.

Docs

Base URL: https://b2bsportswear.com/api/partner/v1

Authentication

Send your account number as the username and your API key as the password, using HTTP Basic auth on every request. A key only works with the account it was issued to. HTTPS only.

Authorization: Basic base64("B2B-123456:b2b_live_YOUR_KEY")

# curl does the encoding for you:
curl -u "B2B-123456:b2b_live_YOUR_KEY" https://b2bsportswear.com/api/partner/v1/me

Never put your key in browser code or a public repository. If a key leaks, revoke it in My Account → API Access and create a new one; the old key stops working on the next call.

Permissions

  • Stock & pricing — GET /products, /products/{style}, /inventory, /me.
  • Cart push — GET, POST and DELETE /cart, plus /me. You still check out yourself on the website or app.

Calling an endpoint your account isn't approved for returns 403 scope_not_granted. GET /me lists the permissions you have.

How cart push works

  1. Your system sends POST /cart with SKUs (by sku_id or UPC) and quantities.
  2. We check each one: it must be in our public catalog and in stock. Anything we can't add comes back in rejected with a reason; the rest is added.
  3. The items land in the same cart you see when you sign in on b2bsportswear.com or in the B2B Sportswear iPhone app.
  4. You open the cart, review it, and check out there as usual — shipping, tax-exempt status and payment are handled at checkout, and prices are confirmed at that moment.

The API can never place, pay for or cancel an order. mode: "replace" empties the cart first; the default "add" adds to what's there (same SKU twice adds up). A cart holds up to 300 lines.

POST /cart
{
  "mode": "add",
  "items": [
    { "upc": "00821780008294", "quantity": 24 },
    { "sku_id": "0a19e5e7-298a-47d9-adf1-1a08d0a6ce59", "quantity": 12 }
  ]
}

→ 200
{
  "mode": "add",
  "added": 2,
  "rejected": [],
  "cart": {
    "lines": [ { "sku_id": "…", "upc": "…", "style": "5000", "brand": "Gildan", "color": "Antique Cherry Red", "size": "S", "quantity": 36, "unit_price": 2.77, … } ],
    "line_count": 1,
    "piece_count": 36,
    "checkout_url": "https://b2bsportswear.com/cart"
  }
}

Cart line fields

FieldTypeMeaning
sku_idstring | nullOur SKU ID.
upcstring | nullUPC, when published.
stylestringStyle number.
brandstringBrand name.
titlestringProduct name.
colorstringColor.
sizestringSize.
quantityintegerPieces.
unit_pricenumberYour price when added — for reference; checkout re-prices.

Endpoints

GET /products needs Stock & pricing

Styles with every SKU, stock and your price. Paged.

  • brand — Exact brand name, e.g. Gildan.
  • style — Exact style number.
  • category — One of: t-shirts, hoodies, polos, hats, activewear, bags, outerwear, pants.
  • updated_since — ISO 8601 date-time. Only styles changed since then.
  • page — Page number, from 1.
  • per_page — Styles per page, 1–25 (default 10).
curl -u "B2B-123456:b2b_live_YOUR_KEY" \
  "https://b2bsportswear.com/api/partner/v1/products?brand=Gildan&per_page=5"

Response keys: datapageper_pagehas_morestock_as_ofgenerated_at

GET /products/{style} needs Stock & pricing

One style by its style number.

  • brand — Brand name, when two brands share a style number.
curl -u "B2B-123456:b2b_live_YOUR_KEY" \
  "https://b2bsportswear.com/api/partner/v1/products/5000?brand=Gildan"

Response keys: datastock_as_ofgenerated_at

GET /inventory needs Stock & pricing

Stock and price for up to 100 SKUs. The fast way to keep stock in sync.

  • sku_id — Comma-separated sku_id values from /products.
  • upc — Comma-separated UPCs. Use sku_id, upc or both.
curl -u "B2B-123456:b2b_live_YOUR_KEY" \
  "https://b2bsportswear.com/api/partner/v1/inventory?upc=00821780000000,00821780000017"

Response keys: datanot_foundstock_as_ofgenerated_at

GET /me any approval

Your account number, price tier, limits and today's usage.

curl -u "B2B-123456:b2b_live_YOUR_KEY" \
  "https://b2bsportswear.com/api/partner/v1/me"

Response keys: account_numbercompanyprice_tierscopeslimitsusagegenerated_at

POST /cart needs Cart push

Add products to your cart (or replace it). Up to 100 items per call, 1–10,000 pieces each. In-stock items only. This never places or pays for an order.

  • mode — "add" (default) adds to what is already in the cart; "replace" empties it first.
  • items (required) — Array of { sku_id or upc, quantity }.
curl -u "B2B-123456:b2b_live_YOUR_KEY" -X POST \
  -H "Content-Type: application/json" \
  -d '{"mode":"add","items":[{"upc":"00821780008294","quantity":24},{"sku_id":"0a19e5e7-…","quantity":12}]}' \
  "https://b2bsportswear.com/api/partner/v1/cart"

Response keys: modeaddedrejectedcartgenerated_at

GET /cart needs Cart push

What is in your cart right now.

curl -u "B2B-123456:b2b_live_YOUR_KEY" \
  "https://b2bsportswear.com/api/partner/v1/cart"

Response keys: linesline_countpiece_countcheckout_urlnotegenerated_at

DELETE /cart needs Cart push

Empty your cart.

curl -u "B2B-123456:b2b_live_YOUR_KEY" -X DELETE \
  "https://b2bsportswear.com/api/partner/v1/cart"

Response keys: clearedgenerated_at

Sample response — GET /products

Shape is exact; stock, price and IDs are example values.

{
  "data": [
    {
      "style": "5000",
      "brand": "Gildan",
      "title": "Unisex Heavy Cotton™ T-Shirt",
      "category": "t-shirts",
      "product_url": "https://b2bsportswear.com/p/gildan/5000",
      "blank_resale": "allowed",
      "skus": [
        {
          "sku_id": "3f1c2a9e-7b1d-4c55-9a0e-2d6f8b1c4e77",
          "sku": "5000-BLACK-L",
          "upc": "00821780002325",
          "color": "Black",
          "color_hex": "#25282A",
          "size": "L",
          "case_qty": 72,
          "stock": 18450,
          "in_stock": true,
          "case_only": false,
          "price": 2.41,
          "currency": "USD",
          "blank_resale": true
        }
      ]
    }
  ],
  "page": 1,
  "per_page": 10,
  "has_more": true,
  "stock_as_of": "2026-11-17T11:08:16Z",
  "generated_at": "2026-11-17T15:02:44Z"
}

Style fields

FieldTypeMeaning
stylestringThe brand's style number.
brandstringBrand name.
titlestring | nullProduct name.
categorystring | nullOne of: t-shirts, hoodies, polos, hats, activewear, bags, outerwear, pants.
product_urlstringThe product page on b2bsportswear.com.
blank_resale"allowed" | "not_allowed" | "some_skus"Whether the style may be resold blank.
skusSKU[]Every active color/size, fields below.

SKU fields

FieldTypeMeaning
sku_idstring (UUID)Our permanent ID for this SKU. Use it with /inventory.
skustringReadable label: STYLE-COLOR-SIZE.
upcstring | nullUPC / GTIN barcode, when the manufacturer publishes one.
colorstring | nullColor name.
color_hexstring | nullSwatch color, e.g. #1F2A44.
sizestring | nullSize name.
case_qtyinteger | nullPieces per full case.
stockintegerPieces available to order across our warehouses.
in_stockbooleanstock > 0.
case_onlybooleanIn stock but sold by the full case only right now.
pricenumber | nullYour account's unit price in USD. Wholesale accounts pay this at any quantity.
currency"USD"Always USD.
blank_resalebooleanfalse = the brand requires decoration; this SKU may not be resold blank.

/inventory returns the SKU fields plus style and brand.

Stock freshness

Stock comes from the same source as our product pages. Every response carries stock_as_of (when that stock was last refreshed) and generated_at. Polling more often than the stock refreshes returns the same numbers — use updated_since and /inventory for efficient syncs.

Rate limits

  • 60 calls per minute and 10,000 calls per day per account (all keys combined), unless we've agreed different limits with you.
  • Up to 25 styles per page on /products; up to 100 SKUs per /inventory call.
  • Every response carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Daily-Limit and X-RateLimit-Daily-Remaining.
  • Over a limit you get 429 with a Retry-After header (seconds). The daily count resets at midnight UTC.
  • Up to 3 active keys per account.

Errors

Errors are JSON:

{ "error": { "code": "rate_limited", "message": "Limit of 60 calls per minute reached. Retry after 23 seconds." } }
HTTPcodeMeaning
400bad_requestA parameter is missing, unknown or malformed. The message says which.
401unauthorizedWrong or missing account number / key, or a revoked key. 10 failures from one IP within an hour block that IP for an hour.
403api_access_disabledAPI access is turned off for your account.
403key_pendingThis key was created but is still waiting for our approval. It starts working once approved — you'll see it marked Active in My Account → API Access.
403scope_not_grantedYour account isn't approved for this part of the API (e.g. cart push). Request it in My Account → API Access.
403ip_not_allowedYour account is locked to specific IP addresses and this call came from another.
403https_requiredPlain http:// is refused. Use https://.
404not_foundNo style with that number.
409no_loginThe account has never signed in, so it has no cart yet. Sign in once on the website or app.
413bad_requestRequest body over 64 KB.
415bad_requestPOST bodies must be JSON with Content-Type: application/json.
422(none)POST /cart where no item could be added — see rejected[] (not_found, out_of_stock, not_available).
429rate_limitedOver your per-minute or daily limit. Wait the number of seconds in the Retry-After header.
500server_errorOur side. Retry after a short wait.
503timeoutThe request took too long. Ask for fewer styles per page.