Skip to main content

revertFulfillmentToAllocated

Reverts a fulfillment to allocated state in the V2 fulfillments state machine.

Transitions a fulfillment from "ready" or "in_progress" back to "allocated" state. Allocated inventory is retained during the revert, so the fulfillment can be edited and sent out again.

Requirements​

  • User must have revert_fulfillment_to_allocated permission. Reverting from "in_progress" dispatches the retraction internally, which runs under that same permission, so no second grant is needed.
  • Valid brand context must be provided (via argument or X-Brand-Id header)
  • Fulfillment must exist and be in "ready" or "in_progress" state

Arguments​

  • fulfillment_id (required): The ID of the fulfillment to revert
  • order_id (required): The ID of the order the fulfillment belongs to
  • proceed_without_integration (optional): revert even when the system holding the fulfillment does not accept cancellations

Behavior​

  • Transitions fulfillment to "allocated" state
  • Retains all allocated inventory
  • Reverting from "in_progress" pulls the fulfillment back from the system holding it: that system is asked to cancel its copy, and one that does not accept cancellations is refused until proceedWithoutIntegration is set. Reverting anyway drops the external id, so the fulfillment stops counting as sent.
  • Returns the reverted fulfillment

Error Scenarios​

  • **E_INTEGRATION_CANNOT_CANCEL**: when the fulfillment is with a system that does not accept cancellations and proceedWithoutIntegration was not set. Ask the user to confirm and retry.
revertFulfillmentToAllocated(
input: RevertFulfillmentToAllocatedInput!
): OrderFulfillment!

Arguments​

revertFulfillmentToAllocated.input ● RevertFulfillmentToAllocatedInput! non-null input common​

Parameters for RevertFulfillmentToAllocated

Type​

OrderFulfillment object orders​

This type represents an order fulfillment. An order can have multiple fulfillments, each one associated with a warehouse and a party that fulfilled the order.