{"openapi":"3.0.3","info":{"title":"ShipFlow API","version":"1.0.0","description":"Client-scoped access to items, inventory, orders, shipments, receipts and webhooks. Authenticate with `Authorization: Bearer wms_live_…`. Every key belongs to one client; every response is limited to that client's data. Rate limit 600 requests/minute per key (X-RateLimit-* headers, 429 with Retry-After). Lists page with `?limit=&cursor=`; the response carries `next_cursor`."},"servers":[{"url":"https://api.3pltechflow.com/api/v1"}],"tags":[{"name":"Items"},{"name":"Inventory"},{"name":"Orders"},{"name":"Shipments"},{"name":"Receipts"},{"name":"Webhooks"}],"paths":{"/items":{"get":{"tags":["Items"],"summary":"List items","operationId":"get_items","security":[{"apiKey":["items:read"]}],"x-scope":"items:read","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"active","in":"query","required":false,"schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Page"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Item"}}}}]}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the items:read scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Items"],"summary":"Create an item (identifiers and case pack included)","operationId":"post_items","security":[{"apiKey":["items:write"]}],"x-scope":"items:write","parameters":[],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the items:write scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}}}},"/items/{sku}":{"get":{"tags":["Items"],"summary":"Get an item by SKU code","operationId":"get_items_sku_","security":[{"apiKey":["items:read"]}],"x-scope":"items:read","parameters":[{"name":"sku","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the items:read scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Items"],"summary":"Update an item","operationId":"patch_items_sku_","security":[{"apiKey":["items:write"]}],"x-scope":"items:write","parameters":[{"name":"sku","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the items:write scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemPatch"}}}}}},"/inventory":{"get":{"tags":["Inventory"],"summary":"List on-hand rows (sku, lot, location, status)","operationId":"get_inventory","security":[{"apiKey":["inventory:read"]}],"x-scope":"inventory:read","parameters":[{"name":"sku","in":"query","required":false,"schema":{"type":"string"}},{"name":"lot","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Page"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InventoryRow"}}}}]}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the inventory:read scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inventory/{sku}":{"get":{"tags":["Inventory"],"summary":"On-hand / allocated / available for one SKU","operationId":"get_inventory_sku_","security":[{"apiKey":["inventory:read"]}],"x-scope":"inventory:read","parameters":[{"name":"sku","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventorySku"}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the inventory:read scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders":{"get":{"tags":["Orders"],"summary":"List orders","operationId":"get_orders","security":[{"apiKey":["orders:read"]}],"x-scope":"orders:read","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"created_since","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Page"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}}}]}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the orders:read scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Orders"],"summary":"Create an order","operationId":"post_orders","security":[{"apiKey":["orders:write"]}],"x-scope":"orders:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for 24 h"}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the orders:write scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreate"}}}}}},"/orders/{id}":{"get":{"tags":["Orders"],"summary":"Get an order","operationId":"get_orders_id_","security":[{"apiKey":["orders:read"]}],"x-scope":"orders:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the orders:read scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}/cancel":{"post":{"tags":["Orders"],"summary":"Cancel an order (409 once picking has started)","operationId":"post_orders_id_cancel","security":[{"apiKey":["orders:write"]}],"x-scope":"orders:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for 24 h"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the orders:write scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Picking has started (code ORDER_NOT_CANCELLABLE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shipments":{"get":{"tags":["Shipments"],"summary":"List shipments (shipped orders with packages and tracking)","operationId":"get_shipments","security":[{"apiKey":["shipments:read"]}],"x-scope":"shipments:read","parameters":[{"name":"shipped_since","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Page"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Shipment"}}}}]}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the shipments:read scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shipments/{id}":{"get":{"tags":["Shipments"],"summary":"Get a shipment with package contents (lots, serials)","operationId":"get_shipments_id_","security":[{"apiKey":["shipments:read"]}],"x-scope":"shipments:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the shipments:read scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/receipts":{"get":{"tags":["Receipts"],"summary":"List receipts","operationId":"get_receipts","security":[{"apiKey":["receipts:read"]}],"x-scope":"receipts:read","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"created_since","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Page"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Receipt"}}}}]}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the receipts:read scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Receipts"],"summary":"Create a receipt (advance ship notice)","operationId":"post_receipts","security":[{"apiKey":["receipts:write"]}],"x-scope":"receipts:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for 24 h"}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the receipts:write scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptCreate"}}}}}},"/receipts/{id}":{"get":{"tags":["Receipts"],"summary":"Get a receipt","operationId":"get_receipts_id_","security":[{"apiKey":["receipts:read"]}],"x-scope":"receipts:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the receipts:read scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook subscriptions","operationId":"get_webhooks","security":[{"apiKey":["webhooks:manage"]}],"x-scope":"webhooks:manage","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Page"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}]}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the webhooks:manage scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Webhooks"],"summary":"Subscribe a URL to events (secret returned once)","operationId":"post_webhooks","security":[{"apiKey":["webhooks:manage"]}],"x-scope":"webhooks:manage","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for 24 h"}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the webhooks:manage scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}}}},"/webhooks/{id}":{"delete":{"tags":["Webhooks"],"summary":"Delete a subscription","operationId":"delete_webhooks_id_","security":[{"apiKey":["webhooks:manage"]}],"x-scope":"webhooks:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the webhooks:manage scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/test":{"post":{"tags":["Webhooks"],"summary":"Send a test delivery now","operationId":"post_webhooks_id_test","security":[{"apiKey":["webhooks:manage"]}],"x-scope":"webhooks:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"Invalid, revoked or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the webhooks:manage scope (code MISSING_SCOPE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"wms_live_<prefix>_<secret>","description":"Scopes: items:read, items:write, inventory:read, orders:read, orders:write, receipts:read, receipts:write, shipments:read, webhooks:manage"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"VALIDATION"},"message":{"type":"string"},"field":{"type":"string","nullable":true}},"required":["code","message"]}}},"Page":{"type":"object","properties":{"data":{"type":"array","items":{}},"next_cursor":{"type":"string","nullable":true,"description":"Pass as ?cursor= for the next page; null on the last page"},"total":{"type":"integer"}}},"Address":{"type":"object","properties":{"name":{"type":"string"},"company":{"type":"string","nullable":true},"line1":{"type":"string"},"line2":{"type":"string","nullable":true},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string","example":"US"},"phone":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["name","line1"]},"Identifier":{"type":"object","properties":{"type":{"type":"string","enum":["upc","ean","gtin","customer_sku","alias","carton_barcode","asin"]},"value":{"type":"string"}},"required":["type","value"]},"Item":{"type":"object","properties":{"sku":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"uom":{"type":"string","example":"EA"},"weight_lbs":{"type":"number","nullable":true},"length_in":{"type":"number","nullable":true},"width_in":{"type":"number","nullable":true},"height_in":{"type":"number","nullable":true},"lot_tracked":{"type":"boolean"},"expiry_tracked":{"type":"boolean"},"serial_tracked":{"type":"boolean"},"unit_control":{"type":"string","enum":["none","optional","required"]},"shelf_life_days":{"type":"integer","nullable":true},"hazmat":{"type":"object","nullable":true,"properties":{"un_number":{"type":"string"},"hazard_class":{"type":"string"},"packing_group":{"type":"string","nullable":true},"proper_shipping_name":{"type":"string","nullable":true},"ground_only":{"type":"boolean"},"limited_qty":{"type":"boolean"}}},"category":{"type":"string","nullable":true},"brand":{"type":"string","nullable":true},"manufacturer":{"type":"string","nullable":true},"hts_code":{"type":"string","nullable":true},"country_of_origin":{"type":"string","nullable":true,"example":"US"},"ships_as_is":{"type":"boolean"},"active":{"type":"boolean"},"identifiers":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"}},"case_pack":{"type":"object","nullable":true,"properties":{"sku":{"type":"string"},"units_per_case":{"type":"integer"},"barcode":{"type":"string","nullable":true}}}},"required":["sku","name"]},"ItemPatch":{"type":"object","description":"Any subset of Item except sku"},"OrderLine":{"type":"object","properties":{"sku":{"type":"string","description":"SKU code or any identifier (UPC, customer SKU, alias)"},"quantity":{"type":"integer","minimum":1},"unit_price":{"type":"number","nullable":true},"lot":{"type":"string","nullable":true},"line":{"type":"integer","nullable":true}},"required":["sku","quantity"]},"OrderCreate":{"type":"object","properties":{"external_id":{"type":"string","description":"Your order id — unique per client; a repeat is a 409"},"customer_reference":{"type":"string","nullable":true},"ship_to":{"$ref":"#/components/schemas/Address"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLine"},"minItems":1},"carrier":{"type":"string","nullable":true},"service":{"type":"string","nullable":true,"description":"Requested service, e.g. \"UPS Ground\""},"required_ship_date":{"type":"string","format":"date","nullable":true},"priority":{"type":"integer","minimum":1,"maximum":9,"nullable":true},"order_type":{"type":"string","enum":["FULFILLMENT","B2B"],"nullable":true},"notes":{"type":"string","nullable":true}},"required":["ship_to","lines"]},"Order":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"order_number":{"type":"string"},"external_id":{"type":"string","nullable":true},"customer_reference":{"type":"string","nullable":true},"status":{"type":"string","enum":["new","allocated","picking","packing","staged","shipped","backordered","cancelled"]},"source":{"type":"string"},"ship_to":{"$ref":"#/components/schemas/Address"},"carrier":{"type":"string","nullable":true},"service":{"type":"string","nullable":true},"required_ship_date":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"lines":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer"},"sku":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"integer"},"allocated":{"type":"integer"},"picked":{"type":"integer"},"shipped":{"type":"integer"},"lot":{"type":"string","nullable":true}}}},"packages":{"type":"array","items":{"$ref":"#/components/schemas/Package"}},"shipped_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"Package":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"carrier":{"type":"string","nullable":true},"service":{"type":"string","nullable":true},"tracking":{"type":"string","nullable":true},"weight_lbs":{"type":"number","nullable":true},"length_in":{"type":"number","nullable":true},"width_in":{"type":"number","nullable":true},"height_in":{"type":"number","nullable":true},"status":{"type":"string"},"shipped_at":{"type":"string","nullable":true},"contents":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string"},"quantity":{"type":"integer"},"lot":{"type":"string","nullable":true},"serial":{"type":"string","nullable":true}}}}}},"Shipment":{"type":"object","properties":{"id":{"type":"string","description":"The order id"},"order_number":{"type":"string"},"external_id":{"type":"string","nullable":true},"status":{"type":"string","example":"shipped"},"shipped_at":{"type":"string"},"ship_to":{"$ref":"#/components/schemas/Address"},"packages":{"type":"array","items":{"$ref":"#/components/schemas/Package"}},"tracking_numbers":{"type":"array","items":{"type":"string"}}}},"InventoryRow":{"type":"object","properties":{"sku":{"type":"string"},"name":{"type":"string"},"lot":{"type":"string","nullable":true},"expiry_date":{"type":"string","nullable":true},"location":{"type":"string"},"license_plate":{"type":"string","nullable":true},"status":{"type":"string","enum":["available","allocated","hold","damaged","quarantine"]},"quantity":{"type":"integer"},"updated_at":{"type":"string"}}},"InventorySku":{"type":"object","properties":{"sku":{"type":"string"},"name":{"type":"string"},"on_hand":{"type":"integer"},"allocated":{"type":"integer"},"available":{"type":"integer"},"by_status":{"type":"object"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/InventoryRow"}}}},"ReceiptCreate":{"type":"object","properties":{"external_ref":{"type":"string","description":"Your reference (ASN / container) — unique per client"},"supplier":{"type":"string","nullable":true},"client_po":{"type":"string","nullable":true,"description":"Your purchase order number"},"expected_arrival":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","nullable":true},"lines":{"type":"array","minItems":1,"items":{"type":"object","properties":{"sku":{"type":"string"},"quantity":{"type":"integer","minimum":1},"lot":{"type":"string","nullable":true},"expiry_date":{"type":"string","format":"date","nullable":true}},"required":["sku","quantity"]}}},"required":["lines"]},"Receipt":{"type":"object","properties":{"id":{"type":"string"},"receipt_number":{"type":"string"},"external_ref":{"type":"string","nullable":true},"client_po":{"type":"string","nullable":true},"supplier":{"type":"string","nullable":true},"status":{"type":"string","enum":["expected","in_transit","receiving","partially_received","received","cancelled"]},"expected_arrival":{"type":"string","nullable":true},"lines":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer"},"sku":{"type":"string"},"expected":{"type":"integer"},"received":{"type":"integer"},"lot":{"type":"string","nullable":true}}}},"created_at":{"type":"string"}}},"WebhookCreate":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"https only, public host"},"events":{"type":"array","items":{"type":"string"}},"secret":{"type":"string","nullable":true,"description":"Optional (16+ chars); generated and returned once when omitted"},"description":{"type":"string","nullable":true}},"required":["url","events"]},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"pausedAt":{"type":"string","nullable":true},"consecutiveFailures":{"type":"integer"},"secret":{"type":"string","description":"Only on creation"}}},"WebhookEnvelope":{"type":"object","description":"POSTed to your URL. Headers: X-WMS-Signature: v1=<hmac-sha256 hex of \"<timestamp>.<body>\">, X-WMS-Timestamp (unix seconds), X-WMS-Event, X-WMS-Delivery.","properties":{"id":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string"},"client_id":{"type":"string"},"data":{"type":"object","description":"The same shape GET /v1/... returns for the entity"}}}}},"x-scopes":["items:read","items:write","inventory:read","orders:read","orders:write","receipts:read","receipts:write","shipments:read","webhooks:manage"],"x-webhook-events":["order.created","order.allocated","order.shipped","order.cancelled","receipt.created","receipt.posted","inventory.adjusted","item.created","item.updated"],"x-webhook-signature":{"header":"X-WMS-Signature","format":"v1=<hex hmac-sha256 over \"<X-WMS-Timestamp>.<raw body>\">","tolerance_seconds":300,"retries":["1m","5m","30m","2h","12h"],"auto_pause_after_consecutive_failures":50}}