Drivers
These endpoints return the drivers of your connections: a list of the drivers of one connection, and the details of one driver.
Both need your x-api-key and the Connection-Id header of one of your connections. A missing Connection-Id, or one that is not yours, answers 400.
List Drivers
GET /drivers
Returns all the drivers of the connection in Connection-Id. The list is not paginated and takes no query parameters: every driver of the connection is returned at once. For a connection with over a thousand drivers the response is about 0.3 MB and takes a few seconds (see Pagination).
Headers
| Header | Type | Required | Description |
|---|---|---|---|
x-api-key | String | Yes | API key to authenticate the request. Obtain it from the portal |
Connection-Id | UUID | Yes | The connection whose drivers to return |
Example request
curl --request GET \
--url "https://api.analytics.autos/drivers" \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Connection-Id: YOUR-CONNECTION-ID'Response
{
"status": 200,
"message": null,
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": 1,
"name": "John Doe",
"rawDriverId": "b5",
"email": "[email protected]",
"phone": "123-456-7890",
"licenseState": "CA",
"licenseNumber": "A1234567",
"connectionId": "4c540ad6-3e76-427c-95e8-72ce794b34de"
}
],
"next": null
}Response fields
id: Unique ID assigned to the driver by Manifold. Use it asdriverIdin other requestsstatus: The driver's status:0: Unknown1: Active2: Inactive
name: Full name of the driverrawDriverId: The id of the driver at the telematics provideremail: The driver's email address, when the provider has onephone: The driver's phone number, when the provider has onelicenseState: State where the driver's licence was issuedlicenseNumber: The driver's licence numberconnectionId: The connection the driver belongs tonext: Alwaysnull: this list has only one page
Get Driver Details
GET /drivers/{driverId}
Returns one driver of the connection in Connection-Id.
Path parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
driverId | Yes | UUID | The id of the driver |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
x-api-key | String | Yes | API key to authenticate the request |
Connection-Id | UUID | Yes | The connection of the driver |
Example request
curl --request GET \
--url "https://api.analytics.autos/drivers/123e4567-e89b-12d3-a456-426614174000" \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Connection-Id: YOUR-CONNECTION-ID'Response
The response has the same envelope as the list; data is the driver, with the fields above.
{
"status": 200,
"message": null,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": 1,
"name": "John Doe",
"rawDriverId": "b5",
"email": "[email protected]",
"phone": "123-456-7890",
"licenseState": "CA",
"licenseNumber": "A1234567",
"connectionId": "4c540ad6-3e76-427c-95e8-72ce794b34de"
},
"next": null
}A driver id that does not exist on the connection answers 200 with an empty driver, not 404: id and connectionId are all zeros (00000000-0000-0000-0000-000000000000) and the other fields are empty. This is how the API has always answered an unknown driver; it is not a "not found" signal designed for you, so check that id is not all zeros before you use the response. (GET /drivers/{driverId}/incident-counts answers 404 for an unknown driver.)
Related
GET /drivers/{driverId}/incident-counts: the driver's incident counts, see Incident Counts
Updated 13 days ago