I'm working on an export/import store app for personal use at the moment but I couldn't figure the logic for the Location requirements.
At the moment there is no way to create a Location using the current API. ( please correct me if I'm wrong here )
That said the Fulfilment API creates a Location when you create a new Fulfilment service, as mentioned here:
Shopify automatically creates a Location that's associated to that fulfillment service.
But per the deprecation information here:
Deprecation for legacy inventory calls is extended to all apps in 2019-10. This means that all apps, including private apps, that call this version or later will no longer be able to do the following:
- create fulfillments without specifying a location_id
So I'm a little confused now, since I can't create Locations, but the API will require the use of Location ID and I won't be able to import items from one store to another since the location id will not be present. Am I misunderstanding something here?
Can someone give some insight to this?
Solved! Go to the solution
You can use a location that already exists on the shop, which are found by using our locations API in REST or GraphQL. There will always be at least one location associated with a shop. If you need to create a location for use with your fulfillment service, then, as you pointed out, one will be created alongside the fulfillment service. Otherwise, it would need to be added in the admin by the account owner.
Hope that clarifies things
|an hour ago|