Filtering, sorting and pagination
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Use these steps with GET /chargers, GET /locations, or GET /sessions. The available filter and sort fields differ by operation; use that operation’s parameter schema as the allowlist.
Filter before retrieving pages
Section titled “Filter before retrieving pages”A filter expression is field<operator>value. The operators are:
| Operator | Meaning | Example |
|---|---|---|
: | equals | name:north |
<> | not equal | name<>north |
<, > | strictly less/greater than | startedAt>2026-10-01T00:00:00.000Z |
<:, >: | less/greater than or equal | startedAt>:2026-10-01T00:00:00.000Z |
~ | substring match | name~north |
Separate conditions in one filter value with ; to require all of them. Repeat the filter parameter to provide OR alternatives; at most four alternatives are accepted. For example, this selects sessions started in October 2026:
curl --get "$API_BASE/sessions" \ --data-urlencode 'filter=startedAt>:2026-10-01T00:00:00.000Z;startedAt<2026-11-01T00:00:00.000Z' \ --data-urlencode 'sort=+startedAt,+id' \ --data-urlencode 'page=1' \ --data-urlencode 'per_page=100' \ --header "Authorization: Bearer $API_KEY" \ --header "organization-id: $ORGANIZATION_ID" \ --header "compatibility-date: $COMPATIBILITY_DATE" \ --header 'Accept: application/json'curl --data-urlencode encodes operators, semicolons, and + signs so they reach the API as intended. To match either name substring, send two filter parameters, for example filter=name~north and filter=name~south.
Choose an explicit sort order
Section titled “Choose an explicit sort order”Sort by up to three allowed fields, separated by commas. Prefix a field with + for ascending or - for descending; an unmarked field sorts ascending. The first field is the primary order, and later fields break ties. For example, sort=+startedAt,+id is useful when reading sessions in start-time order, provided id is in that operation’s allowed sort fields. Some operations define a default sort, so specify one when page order matters.
Traverse the result set
Section titled “Traverse the result set”page is 1-based and defaults to 1. per_page defaults to 10 and cannot exceed 100. The response uses chargers plus total for /chargers, and locations or chargingSessions plus count for /locations and /sessions. The count is the number of matching records before the page slice.
Process a page, then stop when it contains fewer than per_page records. Otherwise request the next page, keeping the same filter and sort. If records can be added while you page, use a stable sort and de-duplicate by ID; use id as the final sort key only where the operation allows it.