Delivery Status Notification
WEBHOOK: POSThttps://<YOUR_WEBHOOK_URI> event_type: dapi.status_changed
The Uber Direct API sends this webhook for delivery status changes. In order for your service to receive webhooks from Uber, set your webhook URL in the developer dashboard Settings section, under RIDE REQUESTS.
Once a webhook is received, you can pull the full order information using the resource_href
, which corresponds to the Get Delivery Status endpoint.
¶ JSON body parameters
The table below describes each parameter in the webhook notification:
Name | Type | Description |
---|---|---|
event_id |
string | Unique event identifier to ensure that events are only digested once. Events are retried if not acknowledged and their delivery is not guaranteed to be in order. |
event_time |
integer | Unix timestamp of when the event occurred. |
meta |
object | The object containing additional information that is specific to the event_type . |
meta.courier_trip_id |
string | Unique identifier for the trip associated to the order. |
meta.external_order_id |
string | The merchant order identifier provided in the Create Delivery request. |
meta.status |
string | The status of the delivery. Valid types include: SCHEDULED, EN_ROUTE_TO_PICKUP, ARRIVED_AT_PICKUP, EN_ROUTE_TO_DROPOFF, ARRIVED_AT_DROPOFF, COMPLETED, or FAILED. |
meta.order_id |
string | Unique identifier for the order. This is used to pull the delivery status from the Get Delivery Status endpoint. |
meta.is_returning |
boolean | Boolean indicating if this response belongs to a return delivery. |
resource_href |
string | Contains the full Get Delivery Status endpoint for the associated order ID. |
meta.related_deliveries |
array | A collection describing other deliveries that share an association. |
¶ Example notification
{
"event_id": "d1122602-45c4-4851-a91e-b35354a233b7",
"resource_href": "https://api.uber.com/v1/eats/deliveries/orders/8a8972cf-2331-4f77-85c0-d84fbed6bf53",
"meta": {
"courier_trip_id": "759de859-929a-47a3-bac5-34712400fe97",
"external_order_id": "merchant_order_001",
"status": "SCHEDULED",
"order_id": "8a8972cf-2331-4f77-85c0-d84fbed6bf53",
"is_returning": false
},
"event_type": "dapi.status_changed",
"event_time": 1596640612953
}
¶ Security
All webhooks sent from Uber contain a signature in the header of the request. More details about the implementation are available in the security section of the Rider webhook documentation.
¶ Expected response
Your service should POST a 200
response status code with an empty response body to acknowledge receipt of the webhook event. If no acknowledgement is received, Uber will continue to retry the webhook according to the retry logic described below.
¶ Retry logic
If Uber does not receive an acknowledgement response, the event will be resent based on an exponential backoff algorithm. The next webhook event will be sent 30 seconds after the initial event, then again after 60 seconds, then after 120 seconds, and so on until a response is received or until 7 events were sent without a response.
¶ Set up your webhook URL
To test the webhook, set a valid webhook URL and place an order in your test store.
Your service (a single webhook URL) can receive webhooks for multiple stores, as long as the developer account’s UUID is mapped to each individual store (org). When your service receives events, you’ll need to use the user_id
(which corresponds to store_id
) from the webhook to map it to the right store for notifications and order injections.
- In the developer dashboard Settings, under RIDE REQUESTS, enter your webhook URL, and click SAVE.
For testing purposes, you may want to setup your own webserver or use a third-party hosting provider to receive webhooks.