Fulfilment without Location ID

ayazahmadtarar
New Member
1 0 1

Our business model works in a way that a user can create a virtual Shopify store and sync it with the app. All orders are pushed to our app via order webhook our app does fulfillment service and push data back to Shopify store for fulfillment(tracking) info. As most of the store is virtually no physical location exists so all orders might not be sending location id.
An order can have more than one product so if products have different locations how I can achieve fulfillment?
After Shopify API update location id is required to create fulfillment. Please suggest the workaround how I can create the fulfillments for this location issue.

Reply 1 (1)
_JB
Shopify Staff
Shopify Staff
836 100 218

Hey @ayazahmadtarar,

Even if you don't use physical locations, every shop has a default location with it's own location_id. You can find the default location for any shop by querying /admin/api/{{api_version}}/shop.json and check the primary_location_id field, or query /admin/api/{{api_version}}/locations.json for a full list. Once you have the location_id, you can just make sure to include it in your fulfillment calls.

JB | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog