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.

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
- Open a wholesale account (or sign in).
- Go to My Account → API Access and press Request access. Tell us briefly what you'll connect.
- Pick what you need: Stock & pricing, Cart push, or both. Each one is approved separately, account by account.
- We review it by hand and approve or decline. You'll get an email either way.
- 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.
- 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/meNever 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
- Your system sends
POST /cartwith SKUs (bysku_idor UPC) and quantities. - We check each one: it must be in our public catalog and in stock. Anything we can't add comes back in
rejectedwith a reason; the rest is added. - The items land in the same cart you see when you sign in on b2bsportswear.com or in the B2B Sportswear iPhone app.
- 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
| Field | Type | Meaning |
|---|---|---|
| sku_id | string | null | Our SKU ID. |
| upc | string | null | UPC, when published. |
| style | string | Style number. |
| brand | string | Brand name. |
| title | string | Product name. |
| color | string | Color. |
| size | string | Size. |
| quantity | integer | Pieces. |
| unit_price | number | Your 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
| Field | Type | Meaning |
|---|---|---|
| style | string | The brand's style number. |
| brand | string | Brand name. |
| title | string | null | Product name. |
| category | string | null | One of: t-shirts, hoodies, polos, hats, activewear, bags, outerwear, pants. |
| product_url | string | The product page on b2bsportswear.com. |
| blank_resale | "allowed" | "not_allowed" | "some_skus" | Whether the style may be resold blank. |
| skus | SKU[] | Every active color/size, fields below. |
SKU fields
| Field | Type | Meaning |
|---|---|---|
| sku_id | string (UUID) | Our permanent ID for this SKU. Use it with /inventory. |
| sku | string | Readable label: STYLE-COLOR-SIZE. |
| upc | string | null | UPC / GTIN barcode, when the manufacturer publishes one. |
| color | string | null | Color name. |
| color_hex | string | null | Swatch color, e.g. #1F2A44. |
| size | string | null | Size name. |
| case_qty | integer | null | Pieces per full case. |
| stock | integer | Pieces available to order across our warehouses. |
| in_stock | boolean | stock > 0. |
| case_only | boolean | In stock but sold by the full case only right now. |
| price | number | null | Your account's unit price in USD. Wholesale accounts pay this at any quantity. |
| currency | "USD" | Always USD. |
| blank_resale | boolean | false = 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/inventorycall. - Every response carries
X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Daily-LimitandX-RateLimit-Daily-Remaining. - Over a limit you get
429with aRetry-Afterheader (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." } }| HTTP | code | Meaning |
|---|---|---|
| 400 | bad_request | A parameter is missing, unknown or malformed. The message says which. |
| 401 | unauthorized | Wrong or missing account number / key, or a revoked key. 10 failures from one IP within an hour block that IP for an hour. |
| 403 | api_access_disabled | API access is turned off for your account. |
| 403 | key_pending | This 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. |
| 403 | scope_not_granted | Your account isn't approved for this part of the API (e.g. cart push). Request it in My Account → API Access. |
| 403 | ip_not_allowed | Your account is locked to specific IP addresses and this call came from another. |
| 403 | https_required | Plain http:// is refused. Use https://. |
| 404 | not_found | No style with that number. |
| 409 | no_login | The account has never signed in, so it has no cart yet. Sign in once on the website or app. |
| 413 | bad_request | Request body over 64 KB. |
| 415 | bad_request | POST 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). |
| 429 | rate_limited | Over your per-minute or daily limit. Wait the number of seconds in the Retry-After header. |
| 500 | server_error | Our side. Retry after a short wait. |
| 503 | timeout | The request took too long. Ask for fewer styles per page. |