---
title: Location Preparation Time Changed
slug: devdocs/location-preparation-time-changed
docTags: 
createdAt: 2026-10-16T12:03:50.998Z
---

The preparation time of a location changes.

## Set the webhook (sandbox)

Send this mutation with your `urlPath`. Expressoft then sends a message to `urlPath` each time the preparation time (in minutes) of the location with `locationKey` changes.

**Query**

```graphql
mutation LocationPreparationTimeChanged($urlPath: String!, $locationKey: Guid!, $preparationTime: UInt!) {
  miscellaneous {
    webHooks {
      post_LocationPreparationTimeChanged(
        payload: {
          urlPath:$urlPath
          locationKey: $locationKey
          preparationTime: $preparationTime
        }
    )
    }
  }
}
```

**Variables**

```json
{
  "urlPath": "<your callback URL>",
  "locationKey": "<locationKey>",
  "preparationTime": 60
}
```

**cURL**

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

**Response**

```json
{
  "data": {
    "miscellaneous": {
      "webHooks": {
        "post_LocationPreparationTimeChanged": "<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
{
  "preparation_time_minutes": 60,
  "location_key": "00000000-0000-0000-0000-000000000051"
}
```

| Field                      | Type    | Description                           |
| -------------------------- | ------- | ------------------------------------- |
| `preparation_time_minutes` | integer | The new preparation time, in minutes. |
| `location_key`             | GUID    | The `publicKey` of the location.      |

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