Status Change Notification
WEBHOOK: POSThttps://<YOUR_WEBHOOK_URI> event_type: guests.trips.status_changed
Event indicating that the status of a trip has changed.
¶ Webhook Event Structure
Name | Type | Description |
---|---|---|
event_id |
string |
Unique event identifier, which can be used to ensure that events are only digested once. |
event_time |
integer |
Unix timestamp of the time the event occurred. |
event_type |
string |
The type of event that occurred. |
resource_href |
string |
The URL of the resource being referenced. This URL can be called with your App’s bearer token to retrieve the full payload. |
meta |
object |
The object containing additional information that is specific to the event_type . |
meta.user_id |
string |
Unique identifier of the user this event was generated for. |
meta.org_uuid |
string |
The unique UUID of the Uber for Business organization for which the ride was requested. |
meta.resource_id |
string |
Unique identifier of the resource this event has been generated for. |
meta.status |
string |
The current status of the resource. |
¶ Status Values
The status values tell you the latest information about a trip, eliminating the need to poll the API for checking when a ride status changes or when a receipt is ready. The status values are different for the different event_types supported and are outlined in the table below.
The guests.trips.status_changed
event_type can have a number of different values that will be surfaced in the meta.status
field as the ride progreses. Below is a list of all possible status’ a trip can have for this event_type.
Status | Description |
---|---|
processing | The request is matching to the most efficient available driver. |
no_drivers_available | The request was unfulfilled because no drivers were available. This is a terminal state for a given trip. You may choose to create a new trip after receiving this webhook. |
accepted | The request has been accepted by a driver and is “en route” to the pickup location. |
arriving | The driver has arrived or will be shortly. |
in_progress | The request is “en route” from the start location to the end location. This webhook is triggered when the rider pickup is completed. |
driver_canceled | The request has been canceled by the driver after accepting a trip request. This will be a terminal state and sent only when the driver cancels the trip after waiting for a grace period at the pickup location. |
rider_canceled | The request canceled by rider. |
completed | The request has been completed by the driver. This will be triggered when the driver ends the trip. |
driver_redispatched | The driver has been redispatched and the driver should be arriving shortly. This will be triggered when a driver cancels a ride [After accepting a ride] within the grace waiting period at pickup location or when en route to pickup location and when uber start matching the next most effecient available driver. |
upfront_driver_assigned | The driver has been pre-assigned to a reserve trip. This can happen up to 7 days in advance before the pickup day. There are only specific categories of rides in which upfront driver assignment occurs more than 4 hours in advance. Majority of the upfront driver assignments occur between ~4hr to 30 min before pickup time. |
¶ Example Webhook
{
"event_id": "3a3f3da4-14ac-4056-bbf2-d0b9cdcb0777",
"event_time": 1427343990,
"event_type": "guests.trips.status_changed",
"meta": {
"user_id": "d13dff8b-das-asd-1212e",
"org_uuid": "63c2fd9c-b787-47d8-ae8f-f4145cecbcb5",
"resource_id": "5152dcc5-b88d-4754-8b33-975f4067c943",
"status": "accepted"
},
"resource_href": "https://api.uber.com/v1/guests/trips/5152dcc5-b88d-4754-8b33-975f4067c943"
}
{
"event_id": "3a3f3da4-14ac-4056-bbf2-d0b9cdcb0888",
"event_time": 1427343993,
"event_type": "guests.trips.status_changed",
"meta": {
"user_id": "d13dff8b-das-asd-1212e",
"org_uuid": "63c2fd9c-b787-47d8-ae8f-f4145cecbcb5",
"resource_id": "5152dcc5-b88d-4754-8b33-975f4067c943",
"status": "arriving"
},
"resource_href": "https://api.uber.com/v1/guests/trips/5152dcc5-b88d-4754-8b33-975f4067c943"
}
{
"event_id": "3a3f3da4-14ac-4056-bbf2-d0b9cdcb0000",
"event_time": 1427343998,
"event_type": "guests.trips.status_changed",
"meta": {
"user_id": "d13dff8b-das-asd-1212e",
"org_uuid": "63c2fd9c-b787-47d8-ae8f-f4145cecbcb5",
"resource_id": "5152dcc5-b88d-4754-8b33-975f4067c943",
"status": "completed"
},
"resource_href": "https://api.uber.com/v1/guests/trips/5152dcc5-b88d-4754-8b33-975f4067c943"
}
{
"event_id": "3a3f3da4-14ac-4056-bbf2-d0b9cdcb0000",
"event_time": 1427344008,
"event_type": "guests.trips.status_changed",
"meta": {
"user_id": "d13dff8b-das-asd-1212e",
"resource_id": "5152dcc5-b88d-4754-8b33-975f4067c943",
"org_uuid": "4a2c7244-63ec-41a1-bb1f-9dff711dd492",
"status": "upfront_driver_assigned"
},
"resource_href": "https://api.uber.com/v1/guests/trips/5152dcc5-b88d-4754-8b33-975f4067c943"
}