Skip to main content

Webhooks

Agent.radar_locations.created

This contains the recent locations of agents associated with a single account. Captain sends all the recent locations of the agents whenever an agent location changes or every 1 minute for each account.

Specific Data for this message

JSON FieldTypeDescription
account_uuidstringStore UUID
agent_locationsarrayArray of Agent Location objects

Agent Location Object

JSON FieldTypeDescription
agent_uuidstringThe UUID of the driver
agent_partners_external_identifierstringExternal ID from partner system to identify the driver
locationsarrayArray of Location objects

Location Object

JSON FieldTypeDescription
latitudefloatLatitude of the agent
longitudefloatLongitude of the agent
speedfloatSpeed agent was travelling in Km/h
coursefloatDirection agent is travelling when available in degrees
recorded_atDateTimeThe time the agent location event was created
account_uuidstringStore UUID

Example Webhook Payload

{
"data": {
"account_uuid": "47975676",
"agent_locations": [
{
"agent_uuid": "32314",
"agent_partners_external_identifier": "external_1",
"locations": [
{
"latitude": "36.12244499999999",
"longitude": "-115.1511192",
"speed": "35.2",
"course": 13.2,
"recorded_at": "2021-12-10 05:49:50 UTC",
"account_uuid": "47975676"
},
{
"latitude": "36.254499999999",
"longitude": "-115.1511192",
"speed": "37.5",
"course": 15.5,
"recorded_at": "2021-12-10 05:49:50 UTC",
"account_uuid": "47975676"
}
]
},
{
"agent_uuid": "4535",
"agent_partners_external_identifier": "external_2",
"locations": [
{
"latitude": "36.12244499999999",
"longitude": "-115.1511192",
"speed": "40.4",
"course": 16.1,
"recorded_at": "2021-12-10 05:49:50 UTC",
"account_uuid": "47975676"
},
{
"latitude": "36.254499999999",
"longitude": "-115.1511192",
"speed": "42.2",
"course": 18.5,
"recorded_at": "2021-12-10 05:49:50 UTC",
"account_uuid": "47975676"
}
]
}
]
},
"environment": "production",
"event_name": "agent.radar_locations.created",
"created_at": "2018-12-10T00:54:23.273-05:00",
"event_uuid": "02a3934d-c51c-409f-acf9-3fb76bd36113",
"metadata": {
"sent_at": "2018-12-10T00:54:23.293-05:00",
"delivery_attempt": 1
}
}