API documentation

The TachoArchive API lets download software, card reader stations and your own scripts send tachograph files to the archive automatically. It is a plain REST API over HTTPS that answers in JSON.

Base URL: https://app.tacho.lnf.polbyte.app/api/v1
Format: JSON (UTF-8), dates in ISO 8601 (UTC)
OpenAPI 3: /openapi.json

Authentication

Create an API key in the panel under Settings & API. The key is shown once – store it safely. Send it in every request:

Authorization: Bearer ta_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Alternatively use the X-Api-Key header. A key gives access to the files of your company only. Create a separate key for each location or program, so you can revoke one without stopping the others.

Upload files

POST /files

Send one file in the multipart field "file", up to 50 files in "files[]", or the raw file as the body (Content-Type: application/octet-stream) with its name in the X-Filename header. Accepted extensions: .ddd, .c1b, .v1b, .tgd, .esm, .dtco, .add; max. 30 MB per file.

curl -X POST https://app.tacho.lnf.polbyte.app/api/v1/files \
  -H "Authorization: Bearer $TACHO_KEY" \
  -F "file=@C_20261121_0712_KOWALSKI.DDD"
$headers = @{ Authorization = "Bearer $env:TACHO_KEY" }
Invoke-RestMethod -Method Post -Uri "https://app.tacho.lnf.polbyte.app/api/v1/files" -Headers $headers `
  -Form @{ file = Get-Item "C:\Tacho\C_20261121_0712_KOWALSKI.DDD" }
import os, requests

r = requests.post(
    "https://app.tacho.lnf.polbyte.app/api/v1/files",
    headers={"Authorization": f"Bearer {os.environ['TACHO_KEY']}"},
    files={"file": open("C_20261121_0712_KOWALSKI.DDD", "rb")},
    timeout=60,
)
r.raise_for_status()
print(r.json())
curl -X POST https://app.tacho.lnf.polbyte.app/api/v1/files \
  -H "Authorization: Bearer $TACHO_KEY" \
  -H "Content-Type: application/octet-stream" \
  -H "X-Filename: M_20261120_1530_WX1234A.DDD" \
  --data-binary @M_20261120_1530_WX1234A.DDD

Response for one file: 201 Created (new file) or 200 OK with "duplicate": true (the same file is already in the archive – nothing is stored twice, so resending is safe).

{
  "duplicate": false,
  "id": 1842,
  "kind": "driver_card",          // driver_card | vehicle_unit | unknown
  "generation": "2",              // 1 | 2 | 2.2 | null
  "original_name": "C_20261121_0712_KOWALSKI.DDD",
  "size": 28431,
  "sha256": "9f2c0b…",
  "downloaded_at": "2026-11-21T06:12:40+00:00",
  "period_start": "2026-10-21",
  "period_end": "2026-11-21",
  "driver": { "id": 12, "card_number": "PL12345678901234", "surname": "KOWALSKI", "first_names": "JAN" },
  "vehicle": null,
  "source": "api",
  "uploaded_at": "2026-11-21T06:15:02+00:00"
}

With several files ("files[]") the answer is {"files": [...]} with one entry per file; status 207 if some of them were rejected (those entries contain "error").

List files

GET /files

Newest first. Query parameters (all optional):

kinddriver_card | vehicle_unit | unknown
driver, vehicleID from /drivers or /vehicles
from, toupload date, YYYY-MM-DD
qsearch in file name, name, card number, registration, VIN
page, per_pagepagination, per_page max. 200 (default 50)
curl "https://app.tacho.lnf.polbyte.app/api/v1/files?kind=vehicle_unit&from=2026-11-01" -H "Authorization: Bearer $TACHO_KEY"

{ "data": [ { "id": 1843, "kind": "vehicle_unit", … } ],
  "meta": { "page": 1, "per_page": 50, "total": 1, "last_page": 1 } }

One file

GET /files/{id}

Description of one file (same fields as above).

Download the original file

GET /files/{id}/download

Returns the file exactly as uploaded. The X-Sha256 header contains its checksum.

curl -OJ "https://app.tacho.lnf.polbyte.app/api/v1/files/1842/download" -H "Authorization: Bearer $TACHO_KEY"

Drivers

GET /drivers

Driver cards known from the uploaded files, with the last download and the next download date.

{ "data": [ {
  "id": 12, "card_number": "PL12345678901234", "card_nation": "PL",
  "surname": "KOWALSKI", "first_names": "JAN", "card_expiry": "2030-04-30",
  "last_download_at": "2026-11-21T06:12:40+00:00",
  "next_download_due": "2026-12-19T06:12:40+00:00",
  "status": "ok"                  // ok | soon | overdue | never
} ] }

Vehicles

GET /vehicles
{ "data": [ {
  "id": 4, "vin": "WDB9634031L123456", "vrn": "WX1234A", "vrn_nation": "PL",
  "last_download_at": "2026-11-20T14:30:00+00:00",
  "next_download_due": "2027-02-18T14:30:00+00:00",
  "status": "ok"
} ] }

Test the key

GET /ping
{ "ok": true, "account": { "id": 1, "name": "Trans-Pol Sp. z o.o.", "country": "PL", "regime": "eu" }, "key": "Download station" }

Errors and limits

StatuserrorMeaning
401unauthorizedmissing, wrong or revoked API key
404not_foundno such file in your archive
422no_file, unsupported_extension, too_large, too_many_filesthe request or file was rejected
429—more than 120 requests per minute for one key – wait and retry

Errors always have the form {"error": "code", "message": "…"}. Retry on 429 and 5xx with a pause; thanks to duplicate detection a retried upload never creates a second copy.

Automatic upload of a folder

Most download programs save files into a folder. This PowerShell script uploads new files and moves them to a "sent" subfolder; run it every 15 minutes with Windows Task Scheduler.

$Key    = "ta_xxxxxxxxxxxx"
$Folder = "C:\Tacho\Download"
$Sent   = Join-Path $Folder "sent"
New-Item -ItemType Directory -Force -Path $Sent | Out-Null

Get-ChildItem $Folder -File -Include *.ddd,*.c1b,*.v1b,*.tgd,*.esm -Recurse:$false | ForEach-Object {
  try {
    Invoke-RestMethod -Method Post -Uri "https://app.tacho.lnf.polbyte.app/api/v1/files" `
      -Headers @{ Authorization = "Bearer $Key" } -Form @{ file = $_ } | Out-Null
    Move-Item $_.FullName -Destination $Sent -Force
  } catch { Write-Warning "$($_.Exception.Message) – $($_.TargetObject)" }
}

Linux / macOS (cron):

#!/bin/sh
cd /data/tacho || exit 1
mkdir -p sent
for f in *.[dD][dD][dD]; do
  [ -f "$f" ] || continue
  curl -fsS -X POST https://app.tacho.lnf.polbyte.app/api/v1/files -H "Authorization: Bearer $TACHO_KEY" -F "file=@$f" \
    && mv "$f" sent/
done