What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Cannot specify location when creating order using Shopify Rest API

Cannot specify location when creating order using Shopify Rest API

wylanosorio
Shopify Partner
10 0 0

We have 3 locations set in admin settings. And we want to use a location (not the default location) for some orders.

I have tried setting the order location_id field or the line_item origin_location field (tried also both together), but none is working.


There's no error but the created order always sets to the default location.

Reply 1 (1)

GrahamS
Shopify Staff (Retired)
193 37 55

Hey @wylanosorio ,

 

This would be expected - initial inventory debiting is actioned based on shop inventory priority configuration, and can then be re-attributed with a followup fulfillment call.

 

Alternatively, you can include a fulfillment array directly in the order payload and cite a location id from which to debit the inventory, but it's worth noting that this will cause the order to immediately transition to "fulfilled" upon creation.

 

Best,

To learn more visit the Shopify Help Center or the Community Blog.