I want to create locations using GRAPHQL or REST API, unfortunately there is no hint in documentation about location CUD(create,update,delete) operations except from read operation. Is there any alternative ?
Hey @tmeristem ,
It’s currently only possible to create a new location through the merchant admin panel. The only exception is when you’re using a fulfillmentService, but the created location can only be used by that fulfillmentService.
Hi @_JB
I know this is a pretty old thread but I am having the same concern as @tmeristem had. I need to create a new location using REST API or Graphql but I can’t find how, I looked at fulfillmentService documentation as you suggested but I didn’t find anything, could you provide me the document where it shows you how to create a location for a fulfillmentService?
Shopify automatically creates a Location for each Fulfillment Service. So if you need to create a Location, then create a Fulfillment Service.
For those that come across this like I did, you can now add, edit, delete, activate and deactivate locations using the GraphQL API and it’s mutations. locationAdd, locationEdit, and so on.
Use the locationAdd mutation of the GraphQL API. It is listed under the “Store Properties” menu on the GraphQL API section of the docs website. https://shopify.dev/docs/api/admin-graphql/2023-01/mutations/locationAdd