Pagination
Livepin APIs are not limited to a single pagination style. Depending on the endpoint you will use pagination[page] + pagination[pageSize], page + limit, or receive non-paginated lists.
Check each endpoint description before implementing list traversal.
Pagination patterns
Common query parameters in the current collection:
- Name
pagination[page]- Type
- integer
- Description
1-based page index. Used by standard REST collections such as
/api/vehicles,/api/trips, and/api/plans.
- Name
pagination[pageSize]- Type
- integer
- Description
Items per page for standard REST collections.
- Name
page- Type
- integer
- Description
Flat page index. Used by endpoints with a custom listing handler, such as
/api/trips/escalationsand/api/ecom-products.
- Name
limit- Type
- integer
- Description
Maximum items per page. Used alongside
pageon custom listings.
- Name
pageSize- Type
- integer
- Description
Items per page on
/api/devices/by-gps-model/:gps_model_id.
- Name
status- Type
- string
- Description
Additional list filter, for example in support ticket listings.
There is no global offset parameter. Custom listings use page and limit;
standard REST collections use pagination[page] and pagination[pageSize].
Example: vehicles (pagination[page])
curl -G "$LIVEPIN_API_BASE_URL/api/vehicles" \
-H "Authorization: Bearer $JWT_TOKEN" \
-H "x-api-key: $LIVEPIN_API_KEY" \
-d "pagination[page]=1" \
-d "pagination[pageSize]=100"
Example: escalations (page + limit)
curl -G "$LIVEPIN_API_BASE_URL/api/trips/escalations" \
-H "Authorization: Bearer $JWT_TOKEN" \
-H "x-api-key: $LIVEPIN_API_KEY" \
-d page=1 \
-d limit=20
Typical response shape
{
"data": [
{
"id": 1
// ...
}
],
"meta": {
"pagination": {
"page": 1,
"pageSize": 50,
"pageCount": 10,
"total": 500
}
}
}
Endpoints that return arrays directly
Some endpoints return plain arrays (for example latest locations). In those cases, pagination parameters may not apply.
Best practices
- Default to conservative
limitvalues and increase only when needed. - Stop paginating when no results are returned.
- Persist cursors/page state when building sync jobs.
