Location Preparation Time Changed
5 min
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
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
}cURL
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
{
"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:
{
"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. |