Read this section before writing any code. Each item below cost real debugging time to find.
3.1 Two time fields, two different clocks
Every position and event carries both:
| Field | Clock | Example |
|---|---|---|
time |
The account's local timezone | 2026-10-07 11:10:29 |
timestamp |
Unix epoch, UTC | 1791364230 → 2026-10-07T09:10:30Z |
Those are the same instant, two hours apart on the page. The account used for this document is UTC+02:00.
Compute from
timestamp. Display fromtime. Parsingtimeas UTC is the single most common integration bug against this API, and it fails silently — everything is just wrong by the account's offset.
3.2 Date parameters are not interchangeable between report engines
| Engine | date_from / date_to |
Time of day |
|---|---|---|
v2/new-reports/* |
YYYY-MM-DD only |
separate time_from / time_to, HH:MM |
v2/consolidated-reports/* |
YYYY-MM-DD or YYYY-MM-DD HH:MM:SS |
either |
Sending "date_from": "2026-10-06 00:00:00" to a new-reports endpoint
returns:
{ "statusCode": 400, "message": "Whoops, looks like something went wrong.",
"status": 0, "errors": { "id": "Whoops, looks like something went wrong." } }
The message does not mention dates. It is the date format.
3.3 other is XML, not JSON
Raw device parameters on a position come back as an XML string:
<info><priority>0</priority><sat>14</sat><ignition>true</ignition>
<power>25.656</power><io270>137</io270><combinedfuel>0</combinedfuel></info>
This is the case in get_history, get_history_messages and the decoder
database alike. Parse it as XML. io<N> keys are the device's raw IO channels;
which one carries fuel, temperature and so on depends on the sensor
configuration for that vehicle.
3.4 Route::any() is pervasive
Most v1-era endpoints are registered with Route::any(), so GET /api/add_device
works as well as POST. Use the verb the operation implies — GET for reads,
POST for writes. Do not rely on the server to refuse the wrong one.
3.5 Three API generations coexist
| Generation | Shape | Example |
|---|---|---|
| v1 (legacy) | snake_case verbs at the root |
/api/get_devices |
| v2 | REST-ish under /v2/ |
/api/v2/analytics/summary |
| v2 reports | two separate engines | /api/v2/new-reports/…, /api/v2/consolidated-reports/… |
There is no deprecation of v1. Both are live and both are maintained. Prefer v2 where an equivalent exists — it is the one with consistent envelopes.