---
title: Location Availability Changed
slug: devdocs/location-availability-changed
docTags: 
createdAt: 2026-10-16T12:03:50.987Z
---

A location becomes available or unavailable for delivery orders.

## Set the webhook (sandbox)

Send this mutation with your `urlPath`. Expressoft then sends a message to `urlPath` each time the availability of the location with `locationKey` changes.

**Query**

```graphql
mutation LocationAvailabilityChanged($urlPath: String!, $locationKey: Guid!, $isAvailable: Boolean!) {
  miscellaneous {
    webHooks {
      post_LocationAvailabilityChanged (
        payload: {
          urlPath:$urlPath
          locationKey: $locationKey
          isAvailable: $isAvailable
        }
    )
    }
  }
}
```

**Variables**

```json
{
  "urlPath": "<your callback URL>",
  "locationKey": "<locationKey>",
  "isAvailable": true
}
```

**cURL**

```bash
curl --location 'https://sandbox.expressoft.eu/connect/api/interopgql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{"query": "mutation LocationAvailabilityChanged($urlPath: String!, $locationKey: Guid!, $isAvailable: Boolean!) { miscellaneous { webHooks { post_LocationAvailabilityChanged ( payload: { urlPath:$urlPath locationKey: $locationKey isAvailable: $isAvailable } ) } } }", "variables": {"urlPath": "<your callback URL>", "locationKey": "<locationKey>", "isAvailable": true}}'
```

**Response**

```json
{
  "data": {
    "miscellaneous": {
      "webHooks": {
        "post_LocationAvailabilityChanged": "<string>"
      }
    }
  }
}
```

The mutation returns a `String` (the type is confirmed by the schema). Your callback URL is called later, when the event happens.

## Payload sent to your URL

Expressoft sends a `POST` request with this JSON body:

```json
{
  "is_available": false,
  "location_key": "00000000-0000-0000-0000-000000000051"
}
```

| Field          | Type    | Description                                                  |
| -------------- | ------- | ------------------------------------------------------------ |
| `is_available` | boolean | `true` if the location can take orders, `false` if it can't. |
| `location_key` | GUID    | The `publicKey` of the location.                             |

:::BlockQuote
ℹ️ **INFO**
In production, Expressoft configures this webhook for you. Contact `support@expressoft.ro`.
:::
