Allocate a single line item's quantity across multiple fulfillment locations

We received an email about changes in order fulfilment Allocate a single line item's quantity across multiple fulfillment locations - Shopify developer changelog. I tried to reproduce this, and in the orders I created manually in the shop - it reproduced, order fulfillment was split.

I tried to replicate the same thing on the latest version of the API: I created an order with help of REST Order API, product stock in one place set to 1, in another place set to many. The order was not split, instead of one it became negative (-1).

The changes have not been applied to the API yet? Nowhere does it say when this will work in the API, when it will work?

1 Like

Hey @Ilya_Z,

Happy to look in to this with you. When you create the order in REST, what are you specifying for inventory behaviour? You’ll want to make sure you are specifying decrement_obeying_policy Order - REST

I would also recommend checking any order routing rules that may be set on the shop to make sure splitting the order would be expected on that order.

From there, do you see the same when creating orders using graphql orderCreate mutation?

Thank you for quick answer.
We use “inventory_behaviour”:“decrement_obeying_policy”. No order routing rules. Api version: 2025-04.

We use only REST, we don’t want to remake query to graphql orderCreate. Do you have any other ideas?

Do you know, order splitting should already work when using REST? We decided that it doesn’t work at all, but maybe it will work in the near future…

Thanks for that clarity. I’m going to set up and test to see what I find here.

Regarding using REST, these api’s are currently Legacy with all new features and enhancements being built specifically for Graphql. We have a great migration guide here to help make the change About REST to GraphQL migration

Hey! I did some testing here and I was able to get it working with REST create order.

I was running in to the same issue you were, but then I worked through this document here to make sure the settings were meeting all of the criteria. Once I did that, the orders started splitting as expected.

Hi Ilya,

Does Kyles approach above resolve this issue for you?

This is strange as I asked the same question in Shopify support and Ally replied to me that the order should not be split.

They have let me know that this is expected behaviour, since the API call you provided is creating the order and there is no checkout occurring here.

In the dev doc you are following it mentions this limitation/expected behaviour:
Split line items across fulfillment orders

How split orders occur:

Split allocation in an order can occur under the following circumstances: A checkout is completed containing one of the above products or product variants with a quantity that is greater than can be fulfilled from a single location, but less than or equal to what is available in all locations. Since there is no actual checkout occurring here, the fulfilment is not split.

Thanks for sharing that.

To remove any doubt, these are the settings I have enabled in my Shipping settings:

I then set a variant with 1 available at each location:

Then I run the following mutation:

curl --location 'https://REDACTED.myshopify.com/admin/api/2025-04/orders.json' \
--header 'X-Shopify-Access-Token: REDACTED' \
--header 'Content-Type: application/json' \
--data '{
    "order": {
        "line_items": [
            {
                "variant_id": 123456789,
                "quantity": 2
            }
        ],
        "inventory_behaviour": "decrement_obeying_policy"
    }
}'

Then I refresh the inventory page in the admin to confirm the order was split: