Rerouting Fulfillment Orders is now possible via API

Shopify Updates: 

We have introduced the fulfillmentOrdersReroute mutation to the Admin GraphQL API. This mutation allows you to move fulfillment orders to the next best location based on the shop’s delivery strategies. This update ensures that both the API and Admin offer the same capabilities, enhancing consistency and flexibility for developers.

With this mutation, you can optionally specify locations to exclude from the reroute. Alternatively, you can define a set of locations to consider for changing the fulfillment orders’ location.

mutation {
  fulfillmentOrdersReroute(
    fulfillmentOrderIds: ["gid://shopify/FulfillmentOrder/12345678"],
    excludedLocationIds: ["gid://shopify/Location/456789"]
  ) {
    movedFulfillmentOrders {
      # FulfillmentOrder fields
    }
    userErrors {
      field
      message
    }
  }
}

For further details on working with the new mutation, please refer to our documentation.

Back to blog