{"openapi":"3.1.0","info":{"title":"SmallBatchDANK Partner API","version":"2026-10-20","description":"Live inventory, products, lab results, stock holds, dropship orders and signed webhooks for approved partners. Sandbox keys (sbd_sk_test_…) only ever see fixtures."},"servers":[{"url":"https://smallbatchdank.com"}],"tags":[{"name":"Auth"},{"name":"Catalog"},{"name":"Inventory"},{"name":"Reservations"},{"name":"Orders"},{"name":"Webhooks"},{"name":"White label"},{"name":"Sandbox"}],"paths":{"/v1/oauth/token":{"post":{"summary":"Exchange client credentials for a short-lived access token","tags":["Auth"],"operationId":"post_oauth_token","security":[],"x-sbd-scope":null,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"grant_type":{"const":"client_credentials","type":"string"},"client_id":{"type":"string","minLength":8,"maxLength":64},"client_secret":{"type":"string","minLength":8,"maxLength":128},"scope":{"type":"string","maxLength":500}},"required":["grant_type","client_id","client_secret"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"const":"Bearer","type":"string"},"expires_in":{"type":"integer"},"scope":{"type":"string"}},"required":["access_token","token_type","expires_in","scope"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/products":{"get":{"summary":"List the products and variants available to you","tags":["Catalog"],"operationId":"get_products","security":[{"bearer":["products:read"]},{"oauth2":["products:read"]},{"publishableKey":["products:read"]}],"x-sbd-scope":"products:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"category","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"sku","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"product_variant","type":"string"},"product_id":{"type":"string","format":"uuid"},"sku":{"type":"string"},"name":{"type":"string"},"variant":{"type":"string"},"category":{"type":"string"},"cultivar":{"type":["string","null"]},"description":{"type":["string","null"],"description":"Plain text"},"description_markdown":{"type":["string","null"],"description":"The same copy with its formatting (Markdown)"},"size_g":{"type":["number","null"]},"unit_count":{"type":"integer"},"msrp_cents":{"type":"integer","description":"Integer cents, USD"},"currency":{"const":"USD","type":"string"},"availability":{"type":"object","properties":{"band":{"type":"string","enum":["OUT","LIMITED","AVAILABLE","DEEP"]},"available":{"type":"integer","description":"Only when quantities are enabled for your integration; capped"}},"required":["band"],"additionalProperties":false,"description":"inventory:read"},"pricing":{"type":"object","properties":{"moq":{"type":"integer"},"tiers":{"type":"array","items":{"type":"object","properties":{"min_qty":{"type":"integer"},"unit_cents":{"type":"integer","description":"Integer cents, USD"}},"required":["min_qty","unit_cents"],"additionalProperties":false}}},"required":["moq","tiers"],"additionalProperties":false,"description":"pricing:read"},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"alt":{"type":"string"},"urls":{"type":"object","properties":{"small":{"type":"string"},"medium":{"type":"string"},"large":{"type":"string"}},"required":["small","medium","large"],"additionalProperties":false}},"required":["id","alt","urls"],"additionalProperties":false},"description":"media:read"},"lab":{"type":["object","null"],"properties":{"batch":{"type":"string"},"report_number":{"type":"string"},"lab_name":{"type":"string"},"tested_at":{"type":"string"},"total_thc_pct":{"type":["string","null"]},"batches":{"type":"array","items":{"type":"string"}}},"required":["batch","report_number","lab_name","tested_at","total_thc_pct","batches"],"additionalProperties":false,"description":"coa:read"}},"required":["id","object","product_id","sku","name","variant","category","cultivar","description","description_markdown","size_g","unit_count","msrp_cents","currency"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/products/{id}":{"get":{"summary":"Get one variant (by id or SKU)","tags":["Catalog"],"operationId":"get_products_id","security":[{"bearer":["products:read"]},{"oauth2":["products:read"]},{"publishableKey":["products:read"]}],"x-sbd-scope":"products:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"product_variant","type":"string"},"product_id":{"type":"string","format":"uuid"},"sku":{"type":"string"},"name":{"type":"string"},"variant":{"type":"string"},"category":{"type":"string"},"cultivar":{"type":["string","null"]},"description":{"type":["string","null"],"description":"Plain text"},"description_markdown":{"type":["string","null"],"description":"The same copy with its formatting (Markdown)"},"size_g":{"type":["number","null"]},"unit_count":{"type":"integer"},"msrp_cents":{"type":"integer","description":"Integer cents, USD"},"currency":{"const":"USD","type":"string"},"availability":{"type":"object","properties":{"band":{"type":"string","enum":["OUT","LIMITED","AVAILABLE","DEEP"]},"available":{"type":"integer","description":"Only when quantities are enabled for your integration; capped"}},"required":["band"],"additionalProperties":false,"description":"inventory:read"},"pricing":{"type":"object","properties":{"moq":{"type":"integer"},"tiers":{"type":"array","items":{"type":"object","properties":{"min_qty":{"type":"integer"},"unit_cents":{"type":"integer","description":"Integer cents, USD"}},"required":["min_qty","unit_cents"],"additionalProperties":false}}},"required":["moq","tiers"],"additionalProperties":false,"description":"pricing:read"},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"alt":{"type":"string"},"urls":{"type":"object","properties":{"small":{"type":"string"},"medium":{"type":"string"},"large":{"type":"string"}},"required":["small","medium","large"],"additionalProperties":false}},"required":["id","alt","urls"],"additionalProperties":false},"description":"media:read"},"lab":{"type":["object","null"],"properties":{"batch":{"type":"string"},"report_number":{"type":"string"},"lab_name":{"type":"string"},"tested_at":{"type":"string"},"total_thc_pct":{"type":["string","null"]},"batches":{"type":"array","items":{"type":"string"}}},"required":["batch","report_number","lab_name","tested_at","total_thc_pct","batches"],"additionalProperties":false,"description":"coa:read"}},"required":["id","object","product_id","sku","name","variant","category","cultivar","description","description_markdown","size_g","unit_count","msrp_cents","currency"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inventory":{"get":{"summary":"Available-to-sell bands (or capped quantities) for every visible variant","tags":["Inventory"],"operationId":"get_inventory","security":[{"bearer":["inventory:read"]},{"oauth2":["inventory:read"]},{"publishableKey":["inventory:read"]}],"x-sbd-scope":"inventory:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"sku","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sku":{"type":"string"},"band":{"type":"string","enum":["OUT","LIMITED","AVAILABLE","DEEP"]},"available":{"type":"integer"}},"required":["id","sku","band"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pricing":{"get":{"summary":"Your price book: MSRP, minimums and quantity breaks","tags":["Catalog"],"operationId":"get_pricing","security":[{"bearer":["pricing:read"]},{"oauth2":["pricing:read"]}],"x-sbd-scope":"pricing:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sku":{"type":"string"},"msrp_cents":{"type":"integer","description":"Integer cents, USD"},"currency":{"const":"USD","type":"string"},"moq":{"type":"integer"},"tiers":{"type":"array","items":{"type":"object","properties":{"min_qty":{"type":"integer"},"unit_cents":{"type":"integer","description":"Integer cents, USD"}},"required":["min_qty","unit_cents"],"additionalProperties":false}}},"required":["id","sku","msrp_cents","currency","moq","tiers"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/coas/{batch}":{"get":{"summary":"Lab results for a batch you can sell","tags":["Catalog"],"operationId":"get_coas_batch","security":[{"bearer":["coa:read"]},{"oauth2":["coa:read"]},{"publishableKey":["coa:read"]}],"x-sbd-scope":"coa:read","parameters":[{"name":"batch","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"batch","type":"string"},"batch":{"type":"string"},"cultivar":{"type":"string"},"harvest_date":{"type":["string","null"]},"coas":{"type":"array","items":{"type":"object","additionalProperties":{}}},"lab_results_url":{"type":"string"}},"required":["object","batch","cultivar","coas"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reservations":{"post":{"summary":"Hold stock for a checkout (all lines or none)","tags":["Reservations"],"operationId":"post_reservations","security":[{"bearer":["dropship:write"]},{"oauth2":["dropship:write"]}],"x-sbd-scope":"dropship:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key and body replay the first response"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"partner_ref":{"type":"string","minLength":1,"maxLength":80},"ttl_minutes":{"type":"integer","minimum":5,"maximum":2880},"lines":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string","minLength":1,"maxLength":64,"description":"Your SKU (mapped in the portal) or our SKU"},"variant_id":{"type":"string","format":"uuid"},"qty":{"type":"integer","minimum":1,"maximum":10000}},"required":["qty"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["lines"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"reservation","type":"string"},"status":{"type":"string","enum":["ACTIVE","RELEASED","EXPIRED","CONVERTED"]},"partner_ref":{"type":["string","null"]},"expires_at":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"variant_id":{"type":"string"},"sku":{"type":"string"},"qty":{"type":"integer"}},"required":["variant_id","sku","qty"],"additionalProperties":false}},"livemode":{"type":"boolean"}},"required":["id","object","status","partner_ref","expires_at","lines","livemode"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reservations/{id}":{"get":{"summary":"Get a stock hold","tags":["Reservations"],"operationId":"get_reservations_id","security":[{"bearer":["dropship:write"]},{"oauth2":["dropship:write"]}],"x-sbd-scope":"dropship:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"reservation","type":"string"},"status":{"type":"string","enum":["ACTIVE","RELEASED","EXPIRED","CONVERTED"]},"partner_ref":{"type":["string","null"]},"expires_at":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"variant_id":{"type":"string"},"sku":{"type":"string"},"qty":{"type":"integer"}},"required":["variant_id","sku","qty"],"additionalProperties":false}},"livemode":{"type":"boolean"}},"required":["id","object","status","partner_ref","expires_at","lines","livemode"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Release a stock hold","tags":["Reservations"],"operationId":"delete_reservations_id","security":[{"bearer":["dropship:write"]},{"oauth2":["dropship:write"]}],"x-sbd-scope":"dropship:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"reservation","type":"string"},"status":{"type":"string","enum":["ACTIVE","RELEASED","EXPIRED","CONVERTED"]},"partner_ref":{"type":["string","null"]},"expires_at":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"variant_id":{"type":"string"},"sku":{"type":"string"},"qty":{"type":"integer"}},"required":["variant_id","sku","qty"],"additionalProperties":false}},"livemode":{"type":"boolean"}},"required":["id","object","status","partner_ref","expires_at","lines","livemode"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/dropship/orders":{"post":{"summary":"Create a dropship order shipped to your customer (blind packing)","tags":["Orders"],"operationId":"post_dropship_orders","security":[{"bearer":["dropship:write"]},{"oauth2":["dropship:write"]}],"x-sbd-scope":"dropship:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key and body replay the first response"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"partner_order_id":{"type":"string","minLength":1,"maxLength":80},"reservation_id":{"type":"string","format":"uuid"},"shipping_service":{"type":"string","enum":["GROUND","SECOND_DAY","OVERNIGHT"],"default":"GROUND"},"ship_to":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"company":{"type":["string","null"],"maxLength":120},"line1":{"type":"string","minLength":1,"maxLength":200},"line2":{"type":["string","null"],"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"region":{"type":"string","description":"Two-letter state or territory code","minLength":2,"maxLength":40},"postal":{"type":"string","minLength":3,"maxLength":20},"country":{"const":"US","type":"string","default":"US","description":"Dropship ships within the United States only"},"phone":{"type":["string","null"],"maxLength":40}},"required":["name","line1","city","region","postal"],"additionalProperties":false},"customer_email":{"type":"string","format":"email","maxLength":200},"lines":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string","minLength":1,"maxLength":64,"description":"Your SKU (mapped in the portal) or our SKU"},"variant_id":{"type":"string","format":"uuid"},"qty":{"type":"integer","minimum":1,"maximum":10000},"retail_price_cents":{"type":"integer","minimum":0,"description":"What you charged your customer — used to report your margin"}},"required":["qty"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["partner_order_id","ship_to","lines"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"dropship_order","type":"string"},"number":{"type":"string"},"partner_order_id":{"type":"string"},"status":{"type":"string","enum":["ACCEPTED","IN_FULFILLMENT","SHIPPED","DELIVERED","CANCELED","EXCEPTION"]},"livemode":{"type":"boolean"},"shipping_service":{"type":"string"},"ship_to":{"type":"object","additionalProperties":{}},"customer_email":{"type":["string","null"]},"lines":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer"},"sku":{"type":"string"},"partner_sku":{"type":["string","null"]},"variant_id":{"type":"string"},"name":{"type":"string"},"variant":{"type":"string"},"qty":{"type":"integer"},"unit_cost_cents":{"type":"integer","description":"Integer cents, USD"},"retail_price_cents":{"type":["integer","null"],"description":"Integer cents, USD"}},"required":["line","sku","partner_sku","variant_id","name","variant","qty","unit_cost_cents","retail_price_cents"],"additionalProperties":false}},"amounts":{"type":"object","properties":{"items_cents":{"type":"integer","description":"Integer cents, USD"},"handling_cents":{"type":"integer","description":"Integer cents, USD"},"shipping_cents":{"type":"integer","description":"Integer cents, USD"},"total_cents":{"type":"integer","description":"Integer cents, USD"},"partner_retail_cents":{"type":["integer","null"],"description":"Integer cents, USD"},"margin_cents":{"type":["integer","null"],"description":"Integer cents, USD"},"currency":{"const":"USD","type":"string"}},"required":["items_cents","handling_cents","shipping_cents","total_cents","partner_retail_cents","margin_cents","currency"],"additionalProperties":false},"tracking":{"type":"object","properties":{"carrier":{"type":["string","null"]},"number":{"type":["string","null"]}},"required":["carrier","number"],"additionalProperties":false},"exception":{"type":["string","null"]},"created_at":{"type":"string"},"shipped_at":{"type":["string","null"]},"delivered_at":{"type":["string","null"]},"canceled_at":{"type":["string","null"]},"fulfillment":{"type":"object","properties":{"order_status":{"type":["string","null"]},"packing":{"type":["string","null"]},"shipments":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["order_status","packing","shipments"],"additionalProperties":false,"description":"fulfillment:read"}},"required":["id","object","number","partner_order_id","status","livemode","shipping_service","ship_to","customer_email","lines","amounts","tracking","exception","created_at","shipped_at","delivered_at","canceled_at"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}":{"get":{"summary":"Get one of your orders (DS number, id, or your partner_order_id)","tags":["Orders"],"operationId":"get_orders_id","security":[{"bearer":["orders:read"]},{"oauth2":["orders:read"]}],"x-sbd-scope":"orders:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"dropship_order","type":"string"},"number":{"type":"string"},"partner_order_id":{"type":"string"},"status":{"type":"string","enum":["ACCEPTED","IN_FULFILLMENT","SHIPPED","DELIVERED","CANCELED","EXCEPTION"]},"livemode":{"type":"boolean"},"shipping_service":{"type":"string"},"ship_to":{"type":"object","additionalProperties":{}},"customer_email":{"type":["string","null"]},"lines":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer"},"sku":{"type":"string"},"partner_sku":{"type":["string","null"]},"variant_id":{"type":"string"},"name":{"type":"string"},"variant":{"type":"string"},"qty":{"type":"integer"},"unit_cost_cents":{"type":"integer","description":"Integer cents, USD"},"retail_price_cents":{"type":["integer","null"],"description":"Integer cents, USD"}},"required":["line","sku","partner_sku","variant_id","name","variant","qty","unit_cost_cents","retail_price_cents"],"additionalProperties":false}},"amounts":{"type":"object","properties":{"items_cents":{"type":"integer","description":"Integer cents, USD"},"handling_cents":{"type":"integer","description":"Integer cents, USD"},"shipping_cents":{"type":"integer","description":"Integer cents, USD"},"total_cents":{"type":"integer","description":"Integer cents, USD"},"partner_retail_cents":{"type":["integer","null"],"description":"Integer cents, USD"},"margin_cents":{"type":["integer","null"],"description":"Integer cents, USD"},"currency":{"const":"USD","type":"string"}},"required":["items_cents","handling_cents","shipping_cents","total_cents","partner_retail_cents","margin_cents","currency"],"additionalProperties":false},"tracking":{"type":"object","properties":{"carrier":{"type":["string","null"]},"number":{"type":["string","null"]}},"required":["carrier","number"],"additionalProperties":false},"exception":{"type":["string","null"]},"created_at":{"type":"string"},"shipped_at":{"type":["string","null"]},"delivered_at":{"type":["string","null"]},"canceled_at":{"type":["string","null"]},"fulfillment":{"type":"object","properties":{"order_status":{"type":["string","null"]},"packing":{"type":["string","null"]},"shipments":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["order_status","packing","shipments"],"additionalProperties":false,"description":"fulfillment:read"}},"required":["id","object","number","partner_order_id","status","livemode","shipping_service","ship_to","customer_email","lines","amounts","tracking","exception","created_at","shipped_at","delivered_at","canceled_at"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}/tracking":{"get":{"summary":"Tracking for one of your orders","tags":["Orders"],"operationId":"get_orders_id_tracking","security":[{"bearer":["tracking:read"]},{"oauth2":["tracking:read"]}],"x-sbd-scope":"tracking:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"tracking","type":"string"},"order":{"type":"string"},"carrier":{"type":["string","null"]},"tracking_number":{"type":["string","null"]},"tracking_url":{"type":["string","null"]},"status":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"details":{"type":["string","null"]},"occurred_at":{"type":"string"}},"required":["status","occurred_at"],"additionalProperties":false}}},"required":["object","order","carrier","tracking_number","status","events"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}/cancel":{"post":{"summary":"Cancel before a label is bought; refunds your partner account","tags":["Orders"],"operationId":"post_orders_id_cancel","security":[{"bearer":["orders:write"]},{"oauth2":["orders:write"]}],"x-sbd-scope":"orders:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key and body replay the first response"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":300}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"dropship_order","type":"string"},"number":{"type":"string"},"partner_order_id":{"type":"string"},"status":{"type":"string","enum":["ACCEPTED","IN_FULFILLMENT","SHIPPED","DELIVERED","CANCELED","EXCEPTION"]},"livemode":{"type":"boolean"},"shipping_service":{"type":"string"},"ship_to":{"type":"object","additionalProperties":{}},"customer_email":{"type":["string","null"]},"lines":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer"},"sku":{"type":"string"},"partner_sku":{"type":["string","null"]},"variant_id":{"type":"string"},"name":{"type":"string"},"variant":{"type":"string"},"qty":{"type":"integer"},"unit_cost_cents":{"type":"integer","description":"Integer cents, USD"},"retail_price_cents":{"type":["integer","null"],"description":"Integer cents, USD"}},"required":["line","sku","partner_sku","variant_id","name","variant","qty","unit_cost_cents","retail_price_cents"],"additionalProperties":false}},"amounts":{"type":"object","properties":{"items_cents":{"type":"integer","description":"Integer cents, USD"},"handling_cents":{"type":"integer","description":"Integer cents, USD"},"shipping_cents":{"type":"integer","description":"Integer cents, USD"},"total_cents":{"type":"integer","description":"Integer cents, USD"},"partner_retail_cents":{"type":["integer","null"],"description":"Integer cents, USD"},"margin_cents":{"type":["integer","null"],"description":"Integer cents, USD"},"currency":{"const":"USD","type":"string"}},"required":["items_cents","handling_cents","shipping_cents","total_cents","partner_retail_cents","margin_cents","currency"],"additionalProperties":false},"tracking":{"type":"object","properties":{"carrier":{"type":["string","null"]},"number":{"type":["string","null"]}},"required":["carrier","number"],"additionalProperties":false},"exception":{"type":["string","null"]},"created_at":{"type":"string"},"shipped_at":{"type":["string","null"]},"delivered_at":{"type":["string","null"]},"canceled_at":{"type":["string","null"]},"fulfillment":{"type":"object","properties":{"order_status":{"type":["string","null"]},"packing":{"type":["string","null"]},"shipments":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["order_status","packing","shipments"],"additionalProperties":false,"description":"fulfillment:read"}},"required":["id","object","number","partner_order_id","status","livemode","shipping_service","ship_to","customer_email","lines","amounts","tracking","exception","created_at","shipped_at","delivered_at","canceled_at"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks":{"get":{"summary":"List your webhook endpoints","tags":["Webhooks"],"operationId":"get_webhooks","security":[{"bearer":["webhooks:write"]},{"oauth2":["webhooks:write"]}],"x-sbd-scope":"webhooks:write","parameters":[],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"webhook_endpoint","type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"description":{"type":["string","null"]},"status":{"type":"string","enum":["active","disabled"]},"secret_prefix":{"type":"string"},"created_at":{"type":"string"},"secret":{"type":"string","description":"Only in the create response — store it now"}},"required":["id","object","url","events","description","status","secret_prefix","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add a webhook endpoint (the signing secret is returned once)","tags":["Webhooks"],"operationId":"post_webhooks","security":[{"bearer":["webhooks:write"]},{"oauth2":["webhooks:write"]}],"x-sbd-scope":"webhooks:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key and body replay the first response"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","maxLength":2000},"events":{"type":"array","items":{"type":"string","enum":["product.created","product.updated","inventory.updated","price.updated","batch.created","coa.updated","reservation.expired","order.created","order.paid","order.packed","order.shipped","order.delivered","order.exception","*"]},"minItems":1},"description":{"type":"string","maxLength":200}},"required":["url","events"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"webhook_endpoint","type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"description":{"type":["string","null"]},"status":{"type":"string","enum":["active","disabled"]},"secret_prefix":{"type":"string"},"created_at":{"type":"string"},"secret":{"type":"string","description":"Only in the create response — store it now"}},"required":["id","object","url","events","description","status","secret_prefix","created_at"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}":{"delete":{"summary":"Delete a webhook endpoint","tags":["Webhooks"],"operationId":"delete_webhooks_id","security":[{"bearer":["webhooks:write"]},{"oauth2":["webhooks:write"]}],"x-sbd-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","deleted"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/white-label/projects":{"get":{"summary":"Your white-label projects and their status","tags":["White label"],"operationId":"get_white-label_projects","security":[{"bearer":["white_label:read"]},{"oauth2":["white_label:read"]}],"x-sbd-scope":"white_label:read","parameters":[],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"moq":{"type":"integer"},"lead_time_days":{"type":"integer"},"skus":{"type":"array","items":{"type":"object","properties":{"partner_sku":{"type":"string"},"sku":{"type":"string"}},"required":["partner_sku","sku"],"additionalProperties":false}}},"required":["id","number","name","status","moq","lead_time_days","skus"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sandbox/orders/{id}/advance":{"post":{"summary":"Sandbox only: move a test order to its next status and fire its webhook","tags":["Sandbox"],"operationId":"post_sandbox_orders_id_advance","security":[{"bearer":["dropship:write"]},{"oauth2":["dropship:write"]}],"x-sbd-scope":"dropship:write","x-sbd-sandbox-only":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key and body replay the first response"}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"}},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"dropship_order","type":"string"},"number":{"type":"string"},"partner_order_id":{"type":"string"},"status":{"type":"string","enum":["ACCEPTED","IN_FULFILLMENT","SHIPPED","DELIVERED","CANCELED","EXCEPTION"]},"livemode":{"type":"boolean"},"shipping_service":{"type":"string"},"ship_to":{"type":"object","additionalProperties":{}},"customer_email":{"type":["string","null"]},"lines":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer"},"sku":{"type":"string"},"partner_sku":{"type":["string","null"]},"variant_id":{"type":"string"},"name":{"type":"string"},"variant":{"type":"string"},"qty":{"type":"integer"},"unit_cost_cents":{"type":"integer","description":"Integer cents, USD"},"retail_price_cents":{"type":["integer","null"],"description":"Integer cents, USD"}},"required":["line","sku","partner_sku","variant_id","name","variant","qty","unit_cost_cents","retail_price_cents"],"additionalProperties":false}},"amounts":{"type":"object","properties":{"items_cents":{"type":"integer","description":"Integer cents, USD"},"handling_cents":{"type":"integer","description":"Integer cents, USD"},"shipping_cents":{"type":"integer","description":"Integer cents, USD"},"total_cents":{"type":"integer","description":"Integer cents, USD"},"partner_retail_cents":{"type":["integer","null"],"description":"Integer cents, USD"},"margin_cents":{"type":["integer","null"],"description":"Integer cents, USD"},"currency":{"const":"USD","type":"string"}},"required":["items_cents","handling_cents","shipping_cents","total_cents","partner_retail_cents","margin_cents","currency"],"additionalProperties":false},"tracking":{"type":"object","properties":{"carrier":{"type":["string","null"]},"number":{"type":["string","null"]}},"required":["carrier","number"],"additionalProperties":false},"exception":{"type":["string","null"]},"created_at":{"type":"string"},"shipped_at":{"type":["string","null"]},"delivered_at":{"type":["string","null"]},"canceled_at":{"type":["string","null"]},"fulfillment":{"type":"object","properties":{"order_status":{"type":["string","null"]},"packing":{"type":["string","null"]},"shipments":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["order_status","packing","shipments"],"additionalProperties":false,"description":"fulfillment:read"}},"required":["id","object","number","partner_order_id","status","livemode","shipping_service","ship_to","customer_email","lines","amounts","tracking","exception","created_at","shipped_at","delivered_at","canceled_at"],"additionalProperties":false}}}},"400":{"description":"Malformed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, inactive integration, IP or origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, idempotency conflict or insufficient stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"request_id":{"type":"string"}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Secret key (sbd_sk_live_… / sbd_sk_test_…) or an OAuth access token (sbd_at_…)"},"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://smallbatchdank.com/v1/oauth/token","scopes":{"products:read":"products:read","inventory:read":"inventory:read","pricing:read":"pricing:read","media:read":"media:read","coa:read":"coa:read","orders:write":"orders:write","orders:read":"orders:read","fulfillment:read":"fulfillment:read","tracking:read":"tracking:read","webhooks:write":"webhooks:write","white_label:read":"white_label:read","dropship:write":"dropship:write"}}}},"publishableKey":{"type":"apiKey","in":"header","name":"X-SBD-Publishable-Key","description":"Embeds only: read-only scopes, requests must come from an allowed Origin"}}},"x-sbd-webhooks":{"events":["product.created","product.updated","inventory.updated","price.updated","batch.created","coa.updated","reservation.expired","order.created","order.paid","order.packed","order.shipped","order.delivered","order.exception"],"signature":"SBD-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, `${t}.${rawBody}`)>; reject if |now - t| > 300 s; dedupe on the event id"}}