cancelFulfillment
Cancels a fulfillment in the V2 fulfillments state machine.
Transitions a fulfillment to the "cancelled" state. Valid source states are "allocated", "ready", "in_progress", and "failed_to_fulfill".
For cancellations from "allocated", "ready", "in_progress" or "failed_to_fulfill", allocated inventory is always released.
Requirements
- User must have
fulfill_orderpermission - Company context must be provided (via
X-Company-Idheader) - Fulfillment must exist and be in a cancellable state
Arguments
fulfillment_id(required): The ID of the fulfillment to cancelorder_id(required): The ID of the order the fulfillment belongs tometadata(optional): JSON metadata for the cancellation
Behavior
- Transitions fulfillment to "cancelled" state
- Releases inventory unconditionally from "allocated"/"ready"/"in_progress"/"failed_to_fulfill"
- Returns the cancelled fulfillment
cancelFulfillment(
input: CancelFulfillmentInput!
): OrderFulfillment!
Arguments
cancelFulfillment.input ● CancelFulfillmentInput! non-null input common
Parameters for CancelFulfillment
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.