Anchor to fulfillmentOrdersReroutefulfillment
fulfillmentOrdersReroute
mutation
Requires access scope,
access scope or
access scope. Also: The user must have the fulfill_and_ship_orders permission or the calling API client must be Shopify POS.
Route the fulfillment orders to an alternative location, according to the shop's order routing settings. This involves:
- Finding an alternate location that can fulfill the fulfillment orders.
- Assigning the fulfillment orders to the new location.
Anchor to Arguments
Arguments
- Anchor to excludedLocationIdsexcluded•
Location Ids The list of IDs of the locations to exclude for rerouting. Excluded locations specified here take precedence over included locations provided through included_location_ids.
- Anchor to fulfillmentOrderIdsfulfillment•
Order Ids [ID!]!required The list of IDs of the fulfillment orders.
- Anchor to includedLocationIdsincluded•
Location Ids The list of IDs of the locations to include for rerouting. By default, all locations are included.
Was this section helpful?
Anchor to FulfillmentOrdersReroutePayload returnsFulfillmentOrdersReroutePayload returns
- Anchor to movedFulfillmentOrdersmoved•
Fulfillment Orders The fulfillment orders which contains the moved line items.
- Anchor to userErrorsuser•
Errors The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
1mutation fulfillmentOrdersReroute($excludedLocationIds: [ID!], $fulfillmentOrderIds: [ID!]!, $includedLocationIds: [ID!]) {2 fulfillmentOrdersReroute(excludedLocationIds: $excludedLocationIds, fulfillmentOrderIds: $fulfillmentOrderIds, includedLocationIds: $includedLocationIds) {3 movedFulfillmentOrders {4 # FulfillmentOrder fields5 }6 userErrors {7 field8 message9 }10 }11}
Input
1{2 "excludedLocationIds": [3 "gid://shopify/<objectName>/10079785100"4 ],5 "fulfillmentOrderIds": [6 "gid://shopify/<objectName>/10079785100"7 ],8 "includedLocationIds": [9 "gid://shopify/<objectName>/10079785100"10 ]11}
{
"excludedLocationIds": [
"gid://shopify/<objectName>/10079785100"
],
"fulfillmentOrderIds": [
"gid://shopify/<objectName>/10079785100"
],
"includedLocationIds": [
"gid://shopify/<objectName>/10079785100"
]
}