The main purpose of the Driver API v2 is to output information about the driver. This API has two types of requests – one for a specific driver and one for all drivers.
Request for a specific driver
GET /drivers/{driverId}?version=2&api_key=<...> HOST: api.fm-track.com Content-Type: application/json;charset=UTF-8
The following parameters are mandatory for this request:
Parameter | Type | Description |
---|---|---|
driverId | String | Driver identifier |
version | String | Version of the API |
api_key | String | User identification key |
A response example is shown below:
{ "id": "ABC123", "first_name": "Driver", "last_name": null, "address": "Lithuania, Vilnius", "phone": "+3700000000", "identifiers": [ { "identifier": "343234323432342", "type": "DLT" }, { "identifier": "123456789", "type": "TACHOGRAPH" }, { "identifier": "3AC64785D2FF", "type": "WIRELESS" }, { "identifier": "123456789", "type": "IBUTTON" } ] }
Note
Parameters without values return a “null” value.
Response parameters are described in the following table:
Parameter | Type | Array | Description | Units |
---|---|---|---|---|
id | String | Driver identifier | Text | |
first_name | String | The driver’s first name | Text | |
last_name | String | The driver’s last name | Text | |
address | String | The driver's address | Text | |
phone | String | The driver's telephone number | Text | |
identifiers | Array | Container for identification codes | ||
identifier | String | identifiers | Identification code | Text |
type | String | identifiers | Identification code type Possible values: DLT TACHOGRAPH WIRELESS IBUTTON | Text |
Request for all drivers
GET /drivers?version=2&api_key=<...>&limit=<...>&continuation_token=<...>&identifier_type=<...>&identifier=<...> HOST: api.fm-track.com Content-Type: application/json;charset=UTF-8
This request has the following parameters:
Parameter | Type | Description | Required |
---|---|---|---|
version | String | Version of the API | Yes |
api_key | String | User identification key | Yes |
limit | Number | How many drivers should be included in the response Default value: 100 Maximum value: 1000 | No |
continuation_token | Number | No | |
identifier_type | String | Identification type, used to get specific driver data Possible values: DLT TACHOGRAPH WIRELESS IBUTTON | No |
identifier | String | Identification code, used to get specific driver data | No |
A response example is shown below:
{ "count": 100, "continuation_token": 123, "items": [ { "id": "ABC123", "first_name": "Driver", "last_name": null, "address": "Lithuania, Vilnius", "phone": "+3700000000", "identifiers": [ { "identifier": "343234323432342", "type": "DLT" }, { "identifier": "123456789", "type": "TACHOGRAPH" }, { "identifier": "3AC64785D2FF", "type": "WIRELESS" }, { "identifier": "123456789", "type": "IBUTTON" } ] }, ... ] }
Note
Parameters without values return a “null” value.
Parameter | Type | Array | Description | Units |
---|---|---|---|---|
count | Number | How many records are included in the response | ||
continuation_token | Number | Displays from which record the data is shown if the record limit was reached | ||
items | Array | Container for all drivers | ||
id | String | items | Driver identifier | Text |
first_name | String | items | The driver’s first name | Text |
last_name | String | items | The driver’s last name | Text |
address | String | items | The driver's address | Text |
phone | String | items | The driver's telephone number | Text |
identifiers | Array | items | Container for identification codes | |
identifier | String | identifiers | Identification code | Text |
type | String | identifiers | Identification code type Possible values: DLT TACHOGRAPH WIRELESS IBUTTON | Text |