Driver Location Notification
WEBHOOK: POSThttps://<YOUR_WEBHOOK_URI> event_type: health.driver_location
Event indicating the updated real-time location of the driver for a trip.
Note
: Frequent driver webhook location is not available in all regions.
¶ 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. |
data.location |
object | An object that provides the geographical coordinates and directional bearing of the driver’s current location. |
data.location.bearing |
string | The direction i which driver is heading, measured in radians. |
data.location.latitude |
string | The latitude of driver’s location. |
data.location.longitude |
string | The longitude of driver’s location. |
Note
: Please reach out to your Uber representative to add driver location for webhooks frequently every 4 seconds example.
¶ Example Webhook
{
"event_id": "LfN0QX+I4kQk8F/AX05+wiBw9FlydHqbxGzroE2SOKxx",
"event_time": 1634236315,
"event_type": "health.driver_location",
"resource_href": "https://api.uber.com/v1/health/trips/22642e3f-cb6c-42be-9d16-29c92ecef000",
"meta": {
"user_id": "b2d01098-777f-4cd6-a463-73715a69cxxx",
"resource_id": "22642e3f-cb6c-42be-9d16-29c92ecefxxx",
"status": "in_progress"
},
"data": {
"location": {
"bearing": 0.7087848763801929,
"latitude": 48.8616,
"longitude": 2.3520117
}
}
}