Lo scopo principale della Driver API v2 è quello di fornire informazioni sul driver. Questa API prevede due tipi di richieste: una per un driver specifico e una per tutti i driver.
Richiesta di un conducente specifico
GET /drivers/{driverId}?version=2&api_key=<...> HOST: api.fm-track.com Content-Type: application/json;charset=UTF-8
I seguenti parametri sono obbligatori per questa richiesta:
Parameter | Type | Description |
---|---|---|
driverId | String | Driver identifier |
version | String | Version of the API |
api_key | String | User identification key |
Di seguito è riportato un esempio di risposta:
{ "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.
I parametri di risposta sono descritti nella seguente tabella:
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 |
Richiesta per tutti i conducenti
GET /drivers?version=2&api_key=<...>&limit=<...>&continuation_token=<...>&identifier_type=<...>&identifier=<...> HOST: api.fm-track.com Content-Type: application/json;charset=UTF-8
Questa richiesta ha i seguenti parametri:
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 |
Di seguito è riportato un esempio di risposta:
{ "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 |