Skip to main content

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.

Required scope: orders:write

Grant 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, or sales_channel.
  • fulfilled_at (date): Shipment date; required for manual fulfillments.
  • 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) and lot_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

OK

Response Headers
    Content-Type