Requires write_locations access scope.

Adds a new location.


The properties of the location to add.


Was this section helpful?

The location that was added.

The list of errors that occurred from executing the mutation.


Was this section helpful?

Examples

Hide code
DescriptionCopy
mutation {
  locationAdd(input: {name: "New York Warehouses", address: {address1: "101 Liberty Street", city: "New York", provinceCode: "NY", countryCode: US, zip: "10006"}, fulfillsOnlineOrders: true}) {
    location {
      id
      name
      address {
        address1
        provinceCode
        countryCode
        zip
      }
      fulfillsOnlineOrders
    }
  }
}
Hide code
Response
JSON
{
  "locationAdd": {
    "location": {
      "id": "gid://shopify/Location/1072404544",
      "name": "New York Warehouses",
      "address": {
        "address1": "101 Liberty Street",
        "provinceCode": "NY",
        "countryCode": "US",
        "zip": "10006"
      },
      "fulfillsOnlineOrders": true
    }
  }
}