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:

Copied!
svc=resource/upload_tacho_file&params={
    "outputFlag": <uint>,
    "eventHash": <text>
}

To bind the content of the uploaded file to a specified driver, use signature 2:

Copied!
svc=resource/upload_tacho_file&params={
    "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:

Copied!
{
    "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:
  • Invalid input parameters. (for signature 2)
  • Driver not found (for signature 2).
  • Failed to parse or validate a file with the guid.
5 One of the following errors:
  • Failed to upload the DDD file (for signature 1).
  • Failed to write the DDD file (for signature 2).
  • Failed to read a file with the guid from the file system (for signature 2).
7 One of the following errors (for signature 2):
  • Missing ADF_ACL_AVL_RES_EDIT_DRIVERS access right to the resource.
  • Failed to find the resource with the specified ID.

If you find a mistake in the text, please select it and press Ctrl+Enter.

Report a mistake

Your message was sent. Thank you!

An error occurred while submitting the form

Download PDF file
Download Word document

See also