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

HeaderTypeRequiredDescription
x-api-keyStringYesAPI key to authenticate the request. Obtain it from the portal
Connection-IdUUIDYesThe 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 as driverId in other requests
  • status: The driver's status:
    • 0: Unknown
    • 1: Active
    • 2: Inactive
  • name: Full name of the driver
  • rawDriverId: The id of the driver at the telematics provider
  • email: The driver's email address, when the provider has one
  • phone: The driver's phone number, when the provider has one
  • licenseState: State where the driver's licence was issued
  • licenseNumber: The driver's licence number
  • connectionId: The connection the driver belongs to
  • next: Always null: this list has only one page

Get Driver Details

GET /drivers/{driverId}

Returns one driver of the connection in Connection-Id.

Path parameters

ParameterRequiredTypeDescription
driverIdYesUUIDThe id of the driver

Headers

HeaderTypeRequiredDescription
x-api-keyStringYesAPI key to authenticate the request
Connection-IdUUIDYesThe 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

Did this page help you?