Undo fulfillment on a shipped order (reverse to packed/editable)
Reverses a fulfillment: returns the order’s package(s) to packed, re-reserves inventory, FIFO-restocks the consumed layers, reverses the fulfillment GL (revenue/COGS), and re-opens the order lifecycle. invoice_status is left unchanged (paid stays paid). Gated by eligibility.can_undo_fulfillment and the fulfillment.reverse SoD permission.
Authorization: requires BOTH orders:write AND fulfillment:write API-key scopes (the action reverses a fulfillment and mutates the order lifecycle). Missing the second scope returns 403 insufficient_scope with required: fulfillment:write.
Migrated-order safety rail: a migrated (historical-import) order has no native FIFO trail to reverse, so this is blocked with an honest reason unless the caller opts in via allow_migrated_reversal (audited). Idempotent via the Idempotency-Key header; a second undo of an already-reversed order returns 409 already_unfulfilled.
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.
Headers
Client-generated unique key for idempotent POST/PATCH/DELETE operations. Alias for the Idempotency parameter. Max 255 chars. On retry with the same key, the original response is returned without re-executing the operation. Keys expire after 24 hours.
255Path Parameters
Body
Response
Fulfillment reversed; order returned to editable state

