api_get_datatoken required
Returns the master vehicle list (last position, last event, driver, mileage, etc.) with optional filters.
/api— body field action.name = "api_get_data"Parameters
| Name | Type | Required | Description |
|---|---|---|---|
loginId | number | optional | Legacy login id used to scope results.e.g. 12345 |
license_nmbr | string | optional | License plate filter. The case-variant `License_NMBR` is also accepted.e.g. 17108 |
Vin | string | optional | Filter by VIN / chassis serial.e.g. 1HGCM82633A004352 |
Unit_ID | number | optional | Telematics unit id.e.g. 98765 |
vehicle_id | number | optional | Internal vehicle id.e.g. 591723 |
group_id | number | optional | Group / depot filter.e.g. 39201 |
last_time | date | optional | Only return vehicles updated after this timestamp. Parsed via `new Date()`.e.g. 2026-04-01T00:00:00Z |
mileageCoeff | number | optional | Divisor applied to speed and mileage values. Defaults to 1; cannot be 0.e.g. 1 |
client_id | number | optional | Narrow the result to one client within the session's own scope. Cannot widen it.e.g. 14952 |
Pagination
This action is paginated. The two parameters below are accepted on every call (both optional); omitting them yields page 1 with 100 rows. The response carries a pagination envelope alongside data; iterate while has_more === true.
page, page_size and has_more are present on every paginated response. total_count and total_pages are returned only by some actions — treat them as optional and drive iteration from has_more rather than from a page count worked out in advance.
| Name | Type | Required | Description |
|---|---|---|---|
page_number | number | optional | 1-based page index. Defaults to 1 if omitted. Page 1 pins a snapshot for stateful actions (events, telemetry) — subsequent pages reuse that snapshot until the session expires (~30 minutes).e.g. 1 |
page_size | number | optional | Rows per page. Defaults to 2000, which is also the maximum — larger values are silently capped to 2000, and a response of exactly 2000 rows usually means there are more pages. For stateful actions (events, telemetry) only the value sent with page 1 is honored, because later pages reuse the size pinned by the snapshot; stateless actions read it on every request.e.g. 2000 |
# Iterate every page until pagination.has_more is false.
# page_size "100" is a deliberate small page so the loop is visible — the
# default is 2000, which is also the maximum. Raise it to fetch fewer,
# larger pages; you still stop on has_more either way.
# Requires: jq (https://stedolan.github.io/jq/).
page=1
while :; do
body=$(curl -s -X POST 'https://private.develop-1.questar.io/v2/private-questar-units/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-d '{"action":{"name":"api_get_data","parameters":[{"loginId":12345,"license_nmbr":"17108","Vin":"1HGCM82633A004352","Unit_ID":98765,"vehicle_id":591723,"group_id":39201,"last_time":"2026-04-01T00:00:00Z","mileageCoeff":1,"client_id":14952,"page_number":"'$page'","page_size":"100"}]}}')
echo "$body" | jq '.response.properties.data[]'
has_more=$(echo "$body" | jq -r '.response.properties.pagination.has_more // false')
[ "$has_more" = "true" ] || break
page=$((page + 1))
donePage 1 pins a snapshot for stateful actions (events, telemetry). If the session expires (~30 min) the API returns action_value="3" with description pagination_session_expired — restart from page_number=1.
Notes
Request
curl -X POST 'https://private.develop-1.questar.io/v2/private-questar-units/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
--data '{"action":{"name":"api_get_data","parameters":[{"loginId":12345,"license_nmbr":"17108","Vin":"1HGCM82633A004352","Unit_ID":98765,"vehicle_id":591723,"group_id":39201,"last_time":"2026-04-01T00:00:00Z","mileageCoeff":1,"client_id":14952}]}}'{
"action": {
"name": "api_get_data",
"parameters": [
{
"loginId": 12345,
"license_nmbr": "17108",
"Vin": "1HGCM82633A004352",
"Unit_ID": 98765,
"vehicle_id": 591723,
"group_id": 39201,
"last_time": "2026-04-01T00:00:00Z",
"mileageCoeff": 1,
"client_id": 14952
}
]
}
}Response
Successful responses always wrap the action's payload in response.properties. The action_value field reports the handler outcome: "0" for success, "1" for invalid params, "2" for not allowed, "3" for limit-exceeded /pagination-session-expired, "999" for general error.
{
"response": {
"properties": {
"action_name": "api_get_data",
"action_value": "0",
"description": "success",
"data": [
{
"vehicle_id": "555",
"unit_id": "98765",
"group_id": "10",
"group_name": "Tel%20Aviv%20Fleet",
"client_id": "42",
"client_name": "Acme%20Logistics",
"company_no": "100200",
"unit_serial": "0000000000123456",
"license_nmbr": "AB-123-CD",
"chassis_number": "1HGCM82633A004352",
"last_communication_time": "2026-04-27T08:15:00Z",
"last_position_time": "2026-04-27T08:14:55Z",
"latitude": "32.0853000",
"longitude": "34.7818000",
"speed": "62.40",
"direction": "180",
"status": "1",
"last_event_time": "2026-04-27T08:14:00Z",
"last_event_type": "Ignition%20On",
"current_driver": "789",
"current_driver_number": "DRV-789",
"driver_name": "John Doe",
"worker_id": "W-789",
"current_drive": "44321",
"last_mileage": "152340.25",
"engine_hours": "8721.50",
"charge_hours": "112",
"manufacturer": "Volvo",
"model": "FH16",
"sub_model": "FH16-540"
}
],
"pagination": {
"page": 1,
"page_size": 100,
"has_more": true
}
}
}
}