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.
orders:writeGrant 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
- 200
- 401
- 403
- 404
- 422
- 429
OK
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.
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.