Skip to content

List locations​

GET
/locations

Returns locations in the selected organization. Filter and sort the results, include related data, or request aggregates before paging.

Use cases

  • Populate a location selector or site inventory.
  • Build location-level charger or session summaries.

Related endpoints

  • POST /locations — create a location.
  • GET /locations/{locationId} — inspect one location.
  • GET /chargers — list chargers, including location associations.

Authorizations​

bearerAuth

Generate an API token here

Type
HTTP (bearer)

Parameters​

Header Parameters

compatibility-date*

API compatibility date in YYYY-MM-DD format. Must be a date after 2025-11-01.

Type
string
Required
Example"2025-11-02"
Pattern
^\d{4}-\d{2}-\d{2}$
organization-id*

Routes the request to the organization named by this ID. The bearer token must be authorized for that organization.

Type
string
Required
Example"3b241101-e2bb-4255-8caf-4136c566a962"
Min Length
1
Max Length
40
x-ignore-forbidden-include

If an include requests data the token cannot view, set this to true or 1 to omit that included field instead of returning 403. This does not grant the missing permission.

Type
string
Valid values
"1""true"
Examples
"true""1"

Query Parameters

filter

Filter locations by these fields: id, createdAt, lat, lon, public. Use : for equality, <> for inequality, < and > for strict comparisons, <: and >: for inclusive comparisons, and ~ for substring matching. Use semicolons to AND conditions; multiple filter entries are OR alternatives.

Example"public:true;lat>:47"
sort

Sort by up to 3 fields from: id, createdAt, lat, lon, public. Prefix with + for ascending or - for descending, and separate fields with commas.

Type
string
Example"-createdAt"
Default
"-createdAt"
Min Length
1
Max Length
256
include

Related entities to include in the response. Allowed fields: chargers Use comma-separated selectors: a bare field includes all of its values, while field.subfield selects only that nested value.

Type
string
Example"chargers.id"
Min Length
1
Max Length
512
aggregate

Aggregation functions to apply. Supported functions: count, sum, avg, min, max. Format: function:field.subfield (e.g. count:sessions.energy)

Type
string
Example"count:sessions.energy"
Min Length
1
Max Length
512
aggregate_interval

Time bucket interval (e.g. 1m, 2h, 1d). Required when aggregate is set. Use a positive integer followed by s, m, h, d, or w for seconds, minutes, hours, days, or weeks. Example: 1h.

Type
string
Example"1h"
Min Length
2
Max Length
16
page

1-based page number; defaults to 1.

Type
integer
Example2
Default
1
Exclusive Minimum
0
Maximum
4294967295
per_page

Maximum records returned per page. Defaults to 10 and cannot exceed 100.

Type
integer
Example25
Default
10
Exclusive Minimum
0
Maximum
100

Responses​

success.location.list

application/json

Number of locations matching the filters before pagination.

Minimum0
Maximum9007199254740991

Playground​

Authorization
Headers
Variables
Key
Value

Samples​