Glavna svrha Driver API v2 je prikaz informacija o vozaču. Ovaj API ima dvije vrste zahtjeva – jedan za određeni vozač i jedan za sve vozače.
Zahtjev za određenog vozača
GET /drivers/{driverId}?version=2&api_key=<...> HOST: api.fm-track.com Content-Type: application/json;charset=UTF-8
Sljedeći parametri su obavezni za ovaj zahtjev:
Parameter | Type | Description |
---|---|---|
driverId | String | Driver identifier |
version | String | Version of the API |
api_key | String | User identification key |
Primjer odgovora prikazan je u nastavku:
{ "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" } ] }
Bilješka
Parametri bez vrijednosti vraćaju vrijednost „null”.
Parametri odgovora opisani su u sljedećoj tablici:
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 |
Zahtjev za sve vozače
GET /drivers?version=2&api_key=<...>&limit=<...>&continuation_token=<...>&identifier_type=<...>&identifier=<...> HOST: api.fm-track.com Content-Type: application/json;charset=UTF-8
Ovaj zahtjev ima sljedeće parametre:
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 |
Primjer odgovora prikazan je u nastavku:
{ "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" } ] }, ... ] }
Bilješka
Parametri bez vrijednosti vraćaju vrijednost „null”.
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 |