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 Field | Type | Description |
---|---|---|
account_uuid | string | Store UUID |
agent_locations | array | Array of Agent Location objects |
Agent Location Object
JSON Field | Type | Description |
---|---|---|
agent_uuid | string | The UUID of the driver |
agent_partners_external_identifier | string | External ID from partner system to identify the driver |
locations | array | Array of Location objects |
Location Object
JSON Field | Type | Description |
---|---|---|
latitude | float | Latitude of the agent |
longitude | float | Longitude of the agent |
speed | float | Speed agent was travelling in Km/h |
course | float | Direction agent is travelling when available in degrees |
recorded_at | DateTime | The time the agent location event was created |
account_uuid | string | Store 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
}
}