Driver API v2

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:

ParameterTypeDescription
driverIdStringDriver identifier
versionStringVersion of the API
api_keyStringUser 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:

ParameterTypeArrayDescriptionUnits
idStringDriver identifierText
first_nameStringThe driver’s first nameText
last_nameStringThe driver’s last nameText
addressStringThe driver's addressText
phoneStringThe driver's telephone numberText
identifiersArrayContainer for identification codes
identifierStringidentifiersIdentification codeText
typeStringidentifiersIdentification 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:

ParameterTypeDescriptionRequired
versionStringVersion of the APIYes
api_keyStringUser identification keyYes
limitNumberHow many drivers should be included in the response
Default value: 100
Maximum value: 1000
No
continuation_tokenNumberNo
identifier_typeStringIdentification type, used to get specific driver data
Possible values:
DLT
TACHOGRAPH
WIRELESS
IBUTTON
No
identifierStringIdentification code, used to get specific driver dataNo

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.

ParameterTypeArrayDescriptionUnits
countNumberHow many records are included in the response
continuation_tokenNumberDisplays from which record the data is shown if the record limit was reached
itemsArrayContainer for all drivers
idStringitemsDriver identifierText
first_nameStringitemsThe driver’s first nameText
last_nameStringitemsThe driver’s last nameText
addressStringitemsThe driver's addressText
phoneStringitemsThe driver's telephone numberText
identifiersArrayitemsContainer for identification codes
identifierStringidentifiersIdentification codeText
typeStringidentifiersIdentification code type
Possible values:
DLT
TACHOGRAPH
WIRELESS
IBUTTON
Text