upload_tacho_file
The resource/upload_tacho_file method is used for uploading tachograph files to the server.
To upload a tachograph file and get it parsed, use signature 1:
svc=resource/upload_tacho_file¶ms={
"outputFlag": <uint>,
"eventHash": <text>
}
To bind the content of the uploaded file to a specified driver, use signature 2:
svc=resource/upload_tacho_file¶ms={
"itemId": <long>,
"driverCode": <text>,
"guid": <text>,
"outputFlag": <uint>
}
Parameters
Below is te description of the request parameters.
Parameter | Description |
---|---|
itemId | Resource ID. |
driverCode | Driver code. |
guid | Uploaded file identifier. You can obtain it from the response to a POST request that uses signature 1. |
outputFlag | Response flag: 1 — get the DDD header; 2 — get activity. |
eventHash | Event name which will be generated after processing the data. |
Response
If the file is parsed successfully, the response is returned in the following format:
{
"guid": <text>, // Uploaded file identifier.
"parseResult": { // Parsing result.
"an": <text>, // Issue authority.
"c": <text>, // Country.
"dc": <text>, // Driver's code, 14 characters.
"dn": <text>, // Driver's name.
"la": <long>, // Last activity date.
"ed": <long>, // Expiry date.
"fa": <long>, // First activity date.
"id": <long>, // ID.
"vb": <long>, // Validity period beginning.
"vl": [<text>], // Vehicle registration plate.
"activity": { // Driver's activity. Shown if outputFlag:2 is set.
"Availability": {
"a": <uint>, // Driver's action: 0 — break/rest, 1 — availability, 2 — work, 3 — driving.
"cs": <uint>, // Card status: 0 — inserted; 1 — not inserted.
"s": <uint>, // Driver's slot: 0 — driver, 1 — co-driver.
"st": <uint>, // Number of drivers: 0 — one driver, 1 — crew.
"t": <uint> // Time.
},
"Break/Rest": {
"a": <uint>,
"cs": <uint>,
"s": <uint>,
"st": <uint>,
"t": <uint>
},
"Driving": {
"a": <uint>,
"cs": <uint>,
"s": <uint>,
"st": <uint>,
"t": <uint>
},
"Work": {
"a": <uint>,
"cs": <uint>,
"s": <uint>,
"st": <uint>,
"t": <uint>
}
}
}
}
If the request fails, an error code is returned.
Error codes
Error Code | Description |
---|---|
4 | One of the following errors:
|
5 | One of the following errors:
|
7 | One of the following errors (for signature 2):
|