Development discussions around Shopify APIs
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.
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
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023