Skip to main content

Pagination

Lists are cursor-paged. A page is:

{
"items": [ … ],
"nextCursor": "eyJ…"
}

Pass nextCursor back as cursor for the next page. An empty nextCursor means there are no more items. A cursor is opaque: do not build or change one, and use it only with the same filters.

curl "https://api.zaitrack.app/v1/drivers?pageSize=100&cursor=$NEXT" \
-H "Authorization: Bearer zk_test_…"

Page size​

ListsPage size
Alerts, devices, drivers, dispatch jobs, fuel transactions, geofences and their visits, report runs, trips, maintenance work orders and inspectionspageSize, capped by the service
Vehiclesfixed by the service; no pageSize
A webhook's deliverieslimit, 1 to 200
Commandslimit; no cursor
A device's track, tank eventslimit with a time range (from, to); no cursor

Some short lists (asset classes, device classes, codecs, alert rules, webhook subscriptions, report schedules, fuel cards) return {"items": [...]} in one response. Each list's page in the API reference names the query parameters it reads.

Walking a list​

cursor=""
while :; do
page=$(curl -s "https://api.zaitrack.app/v1/trips?pageSize=100&cursor=$cursor" \
-H "Authorization: Bearer zk_test_…")
echo "$page" | jq -c '.items[]'
cursor=$(echo "$page" | jq -r '.nextCursor // ""')
[ -z "$cursor" ] && break
done