Archive Sales Order
PUT/api/sales-orders/:salesOrder/archive
Archives a sales order (stamps its archived timestamp so it is hidden from active lists), then runs the legacy archive-and-fulfill flow: a fulfillment is created for the order's remaining unfulfilled items and the tracking is submitted to the order's sales channel. The success message and returned data describe the created fulfillment.
orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
To archive orders without this fulfillment side effect, use the bulk endpoint PUT /api/sales-orders/archive with a single ID instead.
Authentication: Requires Bearer token.
Request body fields (all optional — when omitted, a fulfillment is created for all remaining unfulfilled items):
- fulfillment_type (string):
manual,shipstation,starshipit,shipmyorders,fba,walmart_wfs,veracore,shiphero,shipfusion,d3,trackstar,pickup, orsales_channel. - fulfilled_at (date): Shipment date; required for
manualfulfillments. - tracking_number (string, max 255).
- requested_shipping_method_id (integer) / requested_shipping_method (string, max 255).
- fulfilled_shipping_method_id (integer) / manual_fulfilled_shipping_method (string, max 255): For manual fulfillments.
- cost (number, < 100,000): Shipping cost.
- fulfillment_lines (array): Restrict the fulfillment to specific lines; each item needs sales_order_line_id (integer, required) and quantity (number, required, >= 0). Per-line
metadata.fba_seller_sku(string) andlot_allocation(array of {fifo_layer_id, quantity}) are supported for lot-tracked products. - metadata.signature_required (boolean), metadata.saturday_delivery (boolean), metadata.shipping_speed (string), metadata.comments (string), metadata.veracore_packing_slip_comments (string, max 500), metadata.veracore_shipping_comments (string, max 500), metadata.veracore_third_party_account_number (string, max 100), metadata.veracore_third_party_type (integer, 1-3).
- packing_slip_printed_at (date), status (string), submit_to_shipping_provider (boolean), submit_to_sales_channel (boolean).
Behavior:
- If the order is already archived, a warning is returned and no fulfillment is created.
- Orders held until a future date (
hold_until_date) cannot be fulfilled and return 400. - Draft orders and closed (non-out-of-sync) orders fail fulfillment validation.
Path parameters:
- salesOrder (required): Sales order ID.
Requires permission: sales_orders.update
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Bad Request
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 — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
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.