Remap a sales-order item
Remap a single posted line item to a different product and re-post the order’s sales items. Use this to correct an incorrect product mapping on an already-posted sales order (purgatory mapping only covers pre-posting orders).
The service evaluates a guardrail matrix before acting:
- If a fulfillment order exists, it is deleted and recreated for the new product.
- A pushed fulfillment order is blocked unless
forceistrue, in which case it is unpushed, deleted, and recreated. - Shipped, cancelled, and refunded orders are hard-blocked, as are line items that have already shipped or been invoiced — invoices are never auto-voided.
- The split-fulfillment block is scoped to the target line item: a remap is blocked only when that item itself spans multiple fulfillment orders, not merely because the order as a whole is split.
Pass dry_run=true to get the same plan as the
preview
endpoint without mutating. When a guardrail blocks the remap at commit time
the endpoint returns 422 with a message.
Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
Path Parameters
Sales order ID
Sales order line-item ID (must belong to the sales order)
Body
ID of the product to remap the line item to
x >= 1When true, record the line's original SKU as an alternate SKU
on the new product so future orders auto-map to it.
Proceed even when the fulfillment order is pushed — unpushes, deletes, and recreates it. Without this, a pushed fulfillment order blocks the remap.
Evaluate only and return the remap plan; mutate nothing. The
response is the same plan shape as the remap-preview endpoint.
Response
When dry_run is false, the remapped line item. When dry_run is
true, the remap plan.
- Remapped line item
- Remap plan (dry run)