Skip to main content

Reverse Sales Order Fulfillment to Pre-Tracked

POST 

/api/sales-order-fulfillments/:salesOrderFulfillment/reverse-to-pre-tracked

Repairs a double deduction: for an order placed before the inventory start date, a shipment recorded from the sales channel with a date on or after the start date is voided locally — its inventory movements are reversed and stock returns — while the sales channel's own fulfillment is kept. The same units are credited as externally fulfilled (pre-tracked) in the same transaction, so a later channel sync changes nothing. A note is added to the order.

Required scope: orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token with the sales_orders.fulfill permission.

Path parameters:

  • salesOrderFulfillment (integer): Sales order fulfillment ID.

Refused (422) when: no inventory start date is set; the order was placed on/after the start date; the shipment was dispatched through SKU.io (shipping provider, manual, etc.) rather than recorded from the channel; it is already voided; it is dated before the start date; it is part of a merged shipment; or its date falls in a locked accounting period.

Response pre_tracked fields: sales_order_id, sales_order_number, reversed_fulfillments, returned_units, product_ids.

Request​

Responses​

OK

Response Headers
    Content-Type