Cancel a fulfillment order (synchronous)
Cancels a fulfillment order as a CANCELLED transition validated against the state machine version pinned on the FO. A required free-text reason plus any free-form metadata are captured on an immutable timeline event (FulfillmentOrderTrackingEvent — the cancellation moment is previousStatus; the server-validated reason always wins over a same-named metadata key) and echoed back in the response metadata. On enter, the CANCELLED state releases the inventory reservation (RELEASE_INVENTORY); the transition, the timeline event and the stock release run in a single transaction. A fulfillment order at or after INVOICED has no declared edge to CANCELLED and is rejected with 422. accountCode and the actor (user or service account) come from the JWT.
Path parameters
Fulfillment order identifier (UUID).
Request body
Response
Fulfillment order cancelled.