Skip to main content

Undo Line Swap

POST 

/api/sales-order-lines/:salesOrderLineId/unswap

Revert a swapped line to the product the customer ordered and clear the swap provenance. Allocations move back to the original product.

Required scope: orders:write

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

Authentication: Requires Bearer token.

Blocked with 409 when the line has not been swapped or is committed to fulfillment. Returns the refreshed sales order.

Set after_fulfillment to true to undo a swap on a line that is already submitted or shipped. Stock and cost move back to the ordered product, and the fulfillment provider is not contacted.

Request​

Responses​

OK

Response Headers
    Content-Type