Swap a line item's product in place
Replaces the product on an existing order line in ONE server-side transaction,
keeping the captured payment attached so only the price delta needs settling.
Composes the canonical add + delete: it adds the replacement line (kit
re-explosion, pricing policy, tax) and removes the original (reservation release,
kit component cascade) with a single recalculation. sort_order is preserved.
For channel-sourced orders (Shopify/Amazon/eBay), the replacement line inherits
the original line’s external line-id triple so revision sync-back can map old ->
new. Requires orders:write scope.
Editing a line on a CLOSED AR document is blocked the same way as update/delete:
cancelled/voided or posted/fulfilled (suggested_action: create_return, not
overridable); paid/billed (suggested_action: revise_order). To swap a line on a
paid order pass override: true with the orders.revision_override permission;
the swap is audited (item_swapped). A kit COMPONENT line returns 422
kit_component_not_editable (swap the kit parent). A line with an issued
drop-ship PO returns 409 dropship_po_issued_blocks_line_edit.
Authorizations
API key issued per entity via Settings > Developers > API Keys.
Each key carries scopes (e.g. orders:read, products:write).
Bearer token format: Authorization: Bearer ark_live_ent_Test keys use ark_test_ent_. Both are issued per entity
via Settings > Developers > API Keys.
Body
Replacement product.
Replacement variant (required if the product has variants).
Quantity for the replacement line. Defaults to the original line's quantity.
x >= 1Override unit price for the replacement (canonical Arcus field).
Alias of sell_rate (Stripe/Shopify convention).
Set true (with orders.revision_override) to swap a line on a paid/billed order. Without it a paid/billed order returns 422 edit_not_allowed (suggested_action revise_order).
Response
Line swapped. Returns old + new order_item ids, quantity, sort_order, and channel_lineage_inherited.

