---
title: Location
description: Subscribe to field-level changes on the Location GraphQL Admin API object.
api_version: unstable
source_url:
  html: 'https://shopify.dev/docs/api/events/latest/location'
  md: 'https://shopify.dev/docs/api/events/latest/location.md'
api_name: events
---

# Location

**Requires \`read\_locations\` access scope.:**

Subscribe to field-level changes on the [`Location`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location) GraphQL Admin API object. You can subscribe to create, delete, and update events, as well as changes to specific fields.

Each [topic](https://shopify.dev/docs/api/events/latest#configuration) corresponds to a commerce resource (for example, a location) that can exist independently within its domain. Child entities that depend on a parent within the same domain don't have their own topic. Instead, changes to child entities trigger a delivery on the parent topic. Calculated fields, derived fields, auto-updated timestamps, and cross-domain fields aren't available as triggers.

## shopify.app.toml

```toml
[events]
api_version = "unstable"


[[events.subscription]]
handle = "my_location_events"


topic = "Location"
actions = ["update"]
triggers = [
    "location.address.city",
    "location.isActive"
]


uri = "https://your-app.com/events"


query = """
query location_details($locationId: ID!) {
  location(id: $locationId) {
    id
    name
    isActive
    address {
      city
      provinceCode
      countryCode
    }
  }
  shop {
    id
  }
}
"""


# Optional
query_filter = "location.isActive:true"
```

***

## Supported triggers

Field-level [triggers](https://shopify.dev/docs/api/events/latest#configuration) for `Location` subscriptions.

All triggers require the [`read_locations`](https://shopify.dev/docs/api/usage/access-scopes) access scope, and those triggers that require additional scopes are documented where relevant. Deprecated triggers are listed last.

Subscriptions can include multiple triggers. Use the `shopify-webhook-id` header for deduplication when handling duplicate deliveries.

Custom queries aren't limited to [`Location`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location). They can query the full GraphQL Admin API.

### location

Fires when events involve the [`Location`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location) object.

The `"create"` and `"delete"` actions are only relevant within the context of this parent topic. Use `fields_changed` to follow or replicate impacted data after a delete event. Define a custom query to retrieve specific fields from create events.

Collect details about changes to the object by subscribing to the trigger along with the `"update"` action, though it's recommended that you narrow your subscription to one of the other triggers below.

**Variables:** `locationId`

### location​.address

Fires when the [`address`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location#field-Location.fields.address) field on the [`Location`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `address` field represents the address of this location.

**Variables:** `locationId`

### location​.address​.address1

Fires when the [`address1`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress#field-LocationAddress.fields.address1) field on the [`LocationAddress`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `address1` field represents the first line of the address for the location.

**Variables:** `locationId`

### location​.address​.address2

Fires when the [`address2`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress#field-LocationAddress.fields.address2) field on the [`LocationAddress`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `address2` field represents the second line of the address for the location.

**Variables:** `locationId`

### location​.address​.city

Fires when the [`city`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress#field-LocationAddress.fields.city) field on the [`LocationAddress`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `city` field represents the city of the location.

**Variables:** `locationId`

### location​.address​.countryCode

Fires when the [`countryCode`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress#field-LocationAddress.fields.countryCode) field on the [`LocationAddress`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `countryCode` field represents the country code of the location.

**Variables:** `locationId`

### location​.address​.latitude

Fires when the [`latitude`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress#field-LocationAddress.fields.latitude) field on the [`LocationAddress`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `latitude` field represents the approximate latitude coordinates of the location.

**Variables:** `locationId`

### location​.address​.longitude

Fires when the [`longitude`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress#field-LocationAddress.fields.longitude) field on the [`LocationAddress`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `longitude` field represents the approximate longitude coordinates of the location.

**Variables:** `locationId`

### location​.address​.phone

Fires when the [`phone`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress#field-LocationAddress.fields.phone) field on the [`LocationAddress`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `phone` field represents the phone number of the location.

**Variables:** `locationId`

### location​.address​.provinceCode

Fires when the [`provinceCode`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress#field-LocationAddress.fields.provinceCode) field on the [`LocationAddress`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `provinceCode` field represents the code for the province, state, or district of the address of the location.

**Variables:** `locationId`

### location​.address​.zip

Fires when the [`zip`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress#field-LocationAddress.fields.zip) field on the [`LocationAddress`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `zip` field represents the ZIP code of the location.

**Variables:** `locationId`

### location​.deactivatedAt

Fires when the [`deactivatedAt`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location#field-Location.fields.deactivatedAt) field on the [`Location`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `deactivatedAt` field represents the date and time (ISO 8601 format) that the location was deactivated at.

**Variables:** `locationId`

### location​.fulfillsOnlineOrders

Fires when the [`fulfillsOnlineOrders`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location#field-Location.fields.fulfillsOnlineOrders) field on the [`Location`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `fulfillsOnlineOrders` field indicates whether this location can fulfill online orders.

**Variables:** `locationId`

### location​.isActive

Fires when the [`isActive`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location#field-Location.fields.isActive) field on the [`Location`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `isActive` field indicates whether the location is active.

**Variables:** `locationId`

### location​.metafield

Fires when the [`metafield`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location#field-Location.fields.metafield) field on the [`Location`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `metafield` field represents a custom field, including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information.

**Variables:** `locationId`, `metafieldKey`, `metafieldNamespace`

### location​.metafield​.value

Fires when the [`value`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Metafield#field-Metafield.fields.value) field on the [`Metafield`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Metafield) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

The `value` field represents the data stored in the metafield.

**Variables:** `locationId`, `metafieldKey`, `metafieldNamespace`

### location​.shipsInventory

Fires when the [`shipsInventory`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location#field-Location.fields.shipsInventory) field on the [`Location`](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location) object changes.

Subscribe to this trigger with the `"update"` action and include the field in a custom `query` to retrieve updated data from the payload. You can trace the field in subsequent requests using `fields_changed`.

Legacy field indicating this location was designated for shipping.

**Variables:** `locationId`

### Examples

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["create"]
  triggers = ["location"]

  uri = "https://your-app.com/events"

  query = """
  query location_details($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "create",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123']"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: create
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.address"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
      address {
        __typename
      }
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "address": {
          "__typename": "LocationAddress"
        }
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].address"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.address.address1"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
      address {
        address1
      }
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "address": {
          "address1": "…"
        }
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].address.address1"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.address.address2"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
      address {
        address2
      }
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "address": {
          "address2": "…"
        }
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].address.address2"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.address.city"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
      address {
        city
      }
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "address": {
          "city": "…"
        }
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].address.city"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.address.countryCode"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
      address {
        countryCode
      }
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "address": {
          "countryCode": "…"
        }
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].address.countryCode"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.address.latitude"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
      address {
        latitude
      }
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "address": {
          "latitude": "…"
        }
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].address.latitude"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.address.longitude"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
      address {
        longitude
      }
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "address": {
          "longitude": "…"
        }
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].address.longitude"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.address.phone"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
      address {
        phone
      }
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "address": {
          "phone": "…"
        }
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].address.phone"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.address.provinceCode"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
      address {
        provinceCode
      }
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "address": {
          "provinceCode": "…"
        }
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].address.provinceCode"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.address.zip"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
      address {
        zip
      }
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "address": {
          "zip": "…"
        }
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].address.zip"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.deactivatedAt"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
      deactivatedAt
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "deactivatedAt": "…"
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].deactivatedAt"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.fulfillsOnlineOrders"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
      fulfillsOnlineOrders
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "fulfillsOnlineOrders": "…"
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].fulfillsOnlineOrders"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.isActive"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].isActive"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.metafield(namespace: 'custom', key: 'material')"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!, $metafieldNamespace: String!, $metafieldKey: String!) {
    location(id: $locationId) {
      id
      name
      isActive
      metafield(namespace: $metafieldNamespace, key: $metafieldKey) {
        namespace
        key
        value
        type
      }
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "metafield": {
          "namespace": "custom",
          "key": "material",
          "value": "Cotton",
          "type": "single_line_text_field"
        }
      }
    },
    "fields_changed": [
      "location.metafield(namespace: 'custom', key: 'material')"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123",
      "metafieldKey": "material",
      "metafieldNamespace": "custom"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.metafield(namespace: 'custom', key: 'material').value"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!, $metafieldNamespace: String!, $metafieldKey: String!) {
    location(id: $locationId) {
      id
      name
      isActive
      metafield(namespace: $metafieldNamespace, key: $metafieldKey) {
        namespace
        key
        value
        type
      }
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "metafield": {
          "namespace": "custom",
          "key": "material",
          "value": "Cotton",
          "type": "single_line_text_field"
        }
      }
    },
    "fields_changed": [
      "location.metafield(namespace: 'custom', key: 'material').value"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123",
      "metafieldKey": "material",
      "metafieldNamespace": "custom"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

* #### Subscribe via app configuration

  ##### shopify.app.toml

  ```toml
  [events]
  api_version = "unstable"

  [[events.subscription]]
  handle = "location-event"

  topic = "Location"
  actions = ["update"]
  triggers = ["location.shipsInventory"]

  uri = "https://your-app.com/events"

  query = """
  query location_event_payload($locationId: ID!) {
    location(id: $locationId) {
      id
      name
      isActive
      shipsInventory
    }
  }
  """
  ```

  ##### Payload

  ```json
  {
    "topic": "Location",
    "action": "update",
    "handle": "location-event",
    "data": {
      "location": {
        "id": "gid://shopify/Location/123",
        "name": "Example location",
        "isActive": true,
        "shipsInventory": "…"
      }
    },
    "fields_changed": [
      "location[id: 'gid://shopify/Location/123'].shipsInventory"
    ],
    "query_variables": {
      "locationId": "gid://shopify/Location/123"
    }
  }
  ```

  ##### Headers

  ```bash
  shopify-action: update
  shopify-api-version: unstable
  shopify-event-id: 44444444-4444-4444-4444-444444444444
  shopify-handle: location-event
  shopify-hmac-sha256: 61lWIGuA2nXdHRjhMU/+EDw2y3Eg0mPKJ+RhR7dKKIM=
  shopify-resource-id: gid://shopify/Location/123
  shopify-shop-domain: your-shop.myshopify.com
  shopify-topic: Location
  shopify-triggered-at: 2026-03-23T16:24:35.267Z
  shopify-webhook-id: 7613956a-18a5-332d-b71e-e164bbcacdba
  ```

***
