Wolt Drive API webhook service

Webhooks provide a mechanism for the merchant to receive information related to e.g. status changes of a single delivery. The Wolt Drive API contains CRUD endpoints for managing the webhooks.

The webhooks operate in the merchant level: the webhook events related to all the venues of the merchant will be sent to the same endpoint. I.e. the merchant needs to configure only a single webhook in order to receive all the events related to all the stores.

The merchant system will need to provide a callback_url and client_secret for each webhook it registers.

Each event is encoded into a JSON Web Token (JWT) and will be sent in the format: "token": "<payload as HS256 encoded JWT>". After receiving and decoding the payload, the system can validate the event origin by verifying the secret (signature) which it provided while registering the webhook. Signature is not base64 encoded.

The following sequence diagram visualizes the webhook related operations.

Webhook sequence. Webhook is registered once. When an order is created, status events are sent to merchant's registered endpoint from Wolt's system.

Endpoints for managing webhooks

All requests to Drive API endpoints must be authorized with a Bearer Token.

All the requests must contain Authorization: Bearer <token> header. This token is often referred as Merchant Key. Staging token will be provided by Wolt when you start the integration development and the production token when you successfully complete the testing phase. Only one token per merchant is needed.

Create a webhook

Create a webhook to be used to send events

POST /v1/merchants/{merchant_id}/webhooks

POST /v1/merchants/{merchant_id}/webhooks
{
"callback_config": {
"exponential_retry_backoff": {
"exponent_base": 5,
"max_retry_count": 3
}
},
"callback_url": "string",
"client_secret": "string",
"disabled": false
}
ParameterTypeRequiredDescription
callback_config .exponential_retry_backoff .exponent_baseintegerRequiredBase of the exponent in retry_delay = base^n calculating the delay in seconds until the next retry attempt to deliver webhook event.
callback_config .exponential_retry_backoff .max_retry_countintegerRequiredThe number of times webhook event will be resent.
callback_urlstringRequiredEnd-point URL where webhook events are sent.
client_secretstringRequiredA string which is used to sign the webhook event payload.
disabledbooleanDefault: falseDetermines whether the webhook is in use and events should be sent.

Create webhook response

Response example
201 Created
{
"callback_config": {
"exponential_retry_backoff": {
"exponent_base": 0,
"max_retry_count": 0
}
},
"callback_url": "string",
"created_at": "string",
"disabled": true,
"id": "string",
"modified_at": "string",
"subscribed_events": [
"string"
]
}
StatusMeaningDescription
201CreatedSuccessful Response
400Bad RequestBad Request
401UnauthorizedUnauthorized
422Unprocessable EntityValidation Error

Get a list of webhooks

Get a list of all webhook configured under the merchant ID.

GET /v1/merchants/{merchant_id}/webhooks

GET /v1/merchants/{merchant_id}/webhooks
curl {{host}}/v1/merchants/{merchant_id}/webhooks \
-H "Authorization: Bearer (token)"
NameInTypeRequired
merchant_idpathstringtrue

List all webhooks response

Response example
200 Ok
[
{
"callback_config": {
"exponential_retry_backoff": {
"exponent_base": 0,
"max_retry_count": 0
}
},
"callback_url": "string",
"created_at": "string",
"disabled": true,
"id": "string",
"modified_at": "string",
"subscribed_events": [
"string"
]
}
]
ParameterTypeRequiredDescription
callback_configWebhookCallbackConfigV1Required
callback_urlstringRequiredEnd-point url where webhook events are sent.
created_atstringRequired
disabledbooleanRequiredDetermines whether the webhook is in use and events should be sent.
idstringRequired
modified_atstringRequired
subscribed_events[string]RequiredThe list of events a webhook sends updates about. See available events
StatusMeaningDescription
200OkSuccessful Response
400Bad RequestBad Request
401UnauthorizedUnauthorized
422Unprocessable EntityValidation Error

Get a single webhook

GET /v1/merchants/{merchant_id}/webhooks/{webhook_id}

GET /v1/merchants/{merchant_id}/webhooks/{webhook_id}
curl {{host}}/v1/merchants/{merchant_id}/webhooks/{webhook_id} \
-H "Authorization: Bearer (token)"
NameLocationTypeRequired
merchant_idIn: pathstringRequired
webhook_idIn: pathstringRequired

Get a single webhook response

Response example
200 Ok
{
"callback_config": {
"exponential_retry_backoff": {
"exponent_base": 0,
"max_retry_count": 0
}
},
"callback_url": "string",
"created_at": "string",
"disabled": true,
"id": "string",
"modified_at": "string",
"subscribed_events": [
"string"
]
}
ParameterTypeRequiredDescription
callback_configWebhookCallbackConfigV1Required
callback_urlstringRequiredEnd-point URL where webhook events are sent.
created_atstringRequired
disabledbooleanRequiredDetermines whether the webhook is in use and events should be sent.
idstringRequired
modified_atstringRequired
subscribed_events[string]RequiredThe list of events a webhook sends updates about. See available events
StatusMeaningDescription
200OkSuccessful Response
400Bad RequestBad Request
401UnauthorizedUnauthorized
422Unprocessable EntityValidation Error

Update a webhook

Change the webhook configuration and the subscribed events.

PATCH /v1/merchants/{merchant_id}/webhooks/{webhook_id}

PATCH /v1/merchants/{merchant_id}/webhooks/{webhook_id}
{
"callback_config": {
"exponential_retry_backoff": {
"exponent_base": 0,
"max_retry_count": 0
}
},
"callback_url": "string",
"client_secret": "string",
"disabled": false,
"subscribed_events": ["order.received"]
}
NameInTypeRequiredDescription
webhook_idpathstringtrue
merchant_idpathstringtrue
ParameterTypeRequiredDescription
callback_configWebhookCallbackConfigV1
callback_urlstringEnd-point url where webhook events are sent.
client_secretstringA string which is used to sign the webhook event payload.
disabledbooleanA string which is used to sign the webhook event payload.
subscribed_eventsstringAn array of enumerated event types

Delete a webhook

DELETE /v1/merchants/{merchant_id}/webhooks/{webhook_id}

DELETE /v1/merchants/{merchant_id}/webhooks/{webhook_id}
curl -X DELETE {{host}}/v1/merchants/{merchant_id}/webhooks/{webhook_id} \
-H "Authorization: Bearer (token)"
Response example
204 No content

Webhook order events

Note that we release new features constantly and may add optional fields in our API without creating a new API version. In practice, this could mean that some new fields are also introduced in the responses. The client side should allow unknown keys.

Events that are triggered by the same action, like order.dropoff_completed and order.delivered, may be sent at seemingly random order.

Webhook order event types

Event typeAuto-subscribedDescription
order.receivedYesOrder has been received successfully.
order.rejectedYesOrder has been rejected.
order.pickup_eta_updatedYesOrder pickup ETA is updated. New time is included in event details.
order.pickup_startedYesCourier has started a pickup task.
order.picked_upYesOrder has been picked up from venue.
order.pickup_arrivalYesCourier is arriving to pickup location. Triggered when courier enters 150 meter geo-fence radius.
order.dropoff_startedYesCourier has started a dropoff task.
order.dropoff_arrivalYesCourier is arriving to dropoff location. Triggered when courier enters 150 meter geo-fence radius.
order.dropoff_completedYesCourier has completed the dropoff task.
order.deliveredYesComplete order has been delivered.
order.customer_no_showNoCustomer not reached and delivery could not be made.
order.location_updatedNoCourier location info. When enabled, expect heavy event load and consider using a separate configuration for this event.
order.dropoff_eta_updatedYesOrder dropoff ETA is updated.
order.handshake_deliveryYesSent when delivery handshake verification is enabled.

Order event payload

Example payload format does not apply to order.location_updated and order.handshake_delivery events.

Example payload showcases an event which has all available fields included. Notice that some fields may be null in some events. For example, dropoff.completed_at is included only in order.dropoff_completed and order.delivered events, otherwise null.

{
"dispatched_at": "2023-01-01T00:00:00.000Z",
"type": "order.received",
"details": {
"id": "string",
"venue_id": "string",
"wolt_order_reference_id": "string",
"tracking_reference": "string",
"merchant_order_reference_id": "string",
"order_number": "string",
"price": {
"amount": 0,
"currency": "string"
},
"pickup": {
"eta": "2023-01-01T00:00:00.000Z"
},
"dropoff": {
"eta": {
"min": "2023-01-01T00:00:00.000Z",
"max": "2023-01-01T00:00:00.000Z"
},
"completed_at": "2023-01-01T00:00:00.000Z"
},
"courier": {
"id": 0,
"vehicle_type": "car"
},
"parcels": [
{
"description": "string",
"identifier": "string"
}
],
"purchase_rejected_reason": "GENERIC_VENUE_REQUESTED"
}
}
ParameterTypeRequiredDescription
dispatched_atstringRequiredWhen the event was dispatched from system. Timestamp is in ISO8601 format e.g. 2020-01-30T10:00:13.123Z
typeOrderEventTypeRequiredAn enumeration.
idstringRequiredEvent ID.
venue_idstringRequiredWolt venue ID.
wolt_order_reference_idstringRequiredWolt order reference ID.
tracking_referencestringRequiredWolt tracking reference.
merchant_order_reference_idstringThe merchant_order_reference_ID received in delivery creation.
order_numberstringThe order_number received in delivery creation.
pricePriceRequiredPrice for delivery.
pickup.etastringLatest estimated time for pickup. Timestamp is in ISO8601 format e.g. 2020-01-30T10:00:13.123Z
dropoff.eta.min dropoff.eta.maxstringLatest estimated time for dropoff. Minimum and maximum values are included.Timestamp is in ISO8601 format e.g. 2020-01-30T10:00:13.123Z
dropoff.completed_atstringTime when the dropoff to recipient was completed.Timestamp is in ISO8601 format e.g. 2020-01-30T10:00:13.123Z
courier.ididID of the assigned courier.
courier.vehicle_typestringVehicle type of the assigned courier.
parcels.description parcels.identifierstringList of delivered items, as received in delivery creation.
purchase_rejected_reasonstringReason for delivery rejection. Usually selected by Wolt's support.

Location updated

This event type order.location_updated is optional. When enabled, expect a heavy event load and consider creating a separate configuration for the event. Location refers to the current location of assigned courier partner.

{
"dispatched_at": "2023-01-01T00:00:00.000Z",
"type": "order.location_updated",
"details": {
"id": "string",
"wolt_order_reference_id": "string",
"merchant_order_reference_id": "string",
"order_number": "string",
"tracking_id": "string",
"courier_location": {
"lat": 0.0,
"lon": 0.0
}
}
}
ParameterTypeRequiredDescription
dispatched_atstringRequiredWhen the event was dispatched from system. Timestamp is in ISO8601 format e.g. 2020-01-30T10:00:13.123Z
typeOrderEventTypeRequiredAn enumeration.
idstringRequiredEvent ID.
wolt_order_reference_idstringRequiredWolt order reference ID.
merchant_order_reference_idstringThe merchant_order_reference_ID received in delivery creation.
order_numberstringThe order_number received in delivery creation.
tracking_idstringRequiredCourier tracking ID.
courier_location.latnumberRequiredLatitude value in EPSG:3857 Coordinate Reference System
courier_location.lonnumberRequiredLatitude value in EPSG:3857 Coordinate Reference System

Handshake delivery

This event type order.handshake_delivery is only sent when the delivery has delivery handshake verification enabled.

{
"dispatched_at": "2023-01-01T00:00:00.000Z",
"type": "order.handshake_delivery",
"details": {
"id": "string",
"wolt_order_reference_id": "string",
"merchant_order_reference_id": null,
"order_number": "string",
"pin_code": "string"
}
}
ParameterTypeRequiredDescription
dispatched_atstringRequiredWhen the event was dispatched from system. Timestamp is in ISO8601 format e.g. 2020-01-30T10:00:13.123Z
typeOrderEventTypeRequiredAn enumeration.
idstringRequiredEvent ID.
wolt_order_reference_idstringRequiredWolt order reference ID.
merchant_order_reference_idstringThe merchant_order_reference_ID received in delivery creation.
order_numberstringThe order_number received in delivery creation.
pin_codestringRequiredThe PIN code assigned for the delivery.

Wolt Drive API webhook service - Wolt for Developers