Skip to content
Dashboard

Pagination

List endpoints that can return many records are paginated with limit and offset query parameters.

ParameterTypeDefaultDescription
limitintegerVaries by endpointNumber of records to return (minimum 1)
offsetinteger0Number of records to skip before this page starts

The default and maximum limit differ per endpoint:

OperationPathDefault limitMaximum limit
listTasksGET /tasks20100
listReservationsGET /reservations20100
listDevicesGET /devices20100
listCodesGET /lock-codes20100
listTemplatesGET /task-templates20100
listDepartmentsGET /departments50100
listTeamMembersGET /members50100
listPropertiesGET /properties50500
listUpsellsGET /upsells50200
listClockedShiftsGET /clocked-shifts50200
listShiftsGET /shifts501000
listTagsGET /tags100500
listPropertyGroupsGET /property-groups200200

A limit outside the allowed range is rejected with 400 validation_error. It is not clamped. Other list operations (for example listPortals or listInstructions) return every matching record in one response and have no meta.pagination. search (1–50, default 20) and searchCoverIcons (1–100, default 25) take a limit cap but no offset.

Paginated responses include a meta.pagination object alongside the data array:

{
"data": [
{ "id": "7d0e…", "nameText": "Deep clean unit 4B", "status": "not_started" },
{ "id": "c41a…", "nameText": "Inspect pool area", "status": "in_progress" }
],
"meta": {
"requestId": "3f1c9a52-…",
"pagination": {
"total": 142,
"limit": 20,
"offset": 0
}
}
}
FieldDescription
totalTotal number of records matching the query (before pagination)
limitThe limit that was applied
offsetThe offset that was applied

To retrieve all records, advance offset by limit until offset >= total:

#!/bin/bash
LIMIT=100
OFFSET=0
REGION=us
while true; do
status=$(curl -s -o page.json -D headers.txt -w '%{http_code}' \
"https://api-${REGION}.suiteop.com/api/v1/tasks?limit=${LIMIT}&offset=${OFFSET}" \
-H "Authorization: Bearer sk_live_your_key_here")
if [ "$status" = 429 ]; then
wait=$(grep -i '^retry-after:' headers.txt | tr -dc '0-9')
sleep "${wait:-1}"
continue
elif [ "$status" != 200 ]; then
cat page.json >&2
exit 1
fi
response=$(cat page.json)
# process $response here
total=$(echo "$response" | python3 -c "import json,sys; d=json.load(sys.stdin); print(d['meta']['pagination']['total'])")
OFFSET=$((OFFSET + LIMIT))
if [ "$OFFSET" -ge "$total" ]; then
break
fi
done
Terminal window
curl "https://api-us.suiteop.com/api/v1/tasks?limit=20&offset=20" \
-H "Authorization: Bearer sk_live_your_key_here"

Returns records 21–40.

  • Numbers and booleans are read from their text form. Booleans accept true, 1 or yes and false, 0 or no.
  • To send an array filter, repeat the key: ?statuses=not_started&statuses=in_progress. A single value is treated as a one-element array. A comma-separated list is not split.
  • Query parameters an operation doesn’t declare are ignored.
  • total reflects the count at query time. If records are created or deleted between pages, you may see gaps or duplicates. Where an endpoint offers a date-window filter, narrowing the window reduces this.
  • Requesting an offset beyond total returns an empty data array with total unchanged. It is not an error.