Create Shipment
POST/api/supplier-portal/purchase-orders/:purchaseOrder/shipments
Record a shipment on one purchase order. Omit lines to ship everything remaining. Partial shipments keep the order open for the rest.
Called by a B2B portal buyer with the bearer token POST /api/portal/auth/login returns (or the buyer's feed key) — not with a staff Personal Access Token.
Warehouse orders must be accepted first. A dropship order sends the tracking to the end customer's sales channel.
Rules: carrier and tracking_numbers (1-10) are required unless dropship_label_uuid names a purchased shipping label of this dropship order; shipped_at is your calendar day (not in the future, not before the order was sent); expected_arrival_date applies to warehouse orders; each line quantity must not exceed what is left (Only 12 left to ship on this line.).
Tracking numbers that do not match the carrier's format are saved with a tracking_format warning. packing_slip_missing is true for a dropship order that requires the packing slip when it was not downloaded first.
409 purchase_order_canceled when the buyer canceled the order (the buyer is alerted); 409 not_shippable with reason closed | not_sent | changes_pending | awaiting_response | fully_shipped | rejected.
Authentication: supplier-portal bearer token. Every lookup is scoped to the signed-in user's supplier; a record of another supplier returns 404.
Request
Responses
- 201
- 401
- 403
- 404
- 409
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not Found
Response Headers
Conflict
Response Headers
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.