---
title: "Gets all locations"
method: GET
path: "/locations/v4"
tags: ["Locations"]
---

# Gets all locations

`GET /locations/v4`

Gets all locations of the project.

## Query parameters

- `limit` integer
- `pageToken` string
- `geofenceId` string, uuid — Geofence ID
- `name` string
- `street` string
- `city` string
- `postalCode` string
- `state` string
- `country` string
- `locationId` string
- `sort` union
  - string
  - string[]
- `externalLocationId` string — External location id in external cloud

## Response `200`

Response body contains an array of location objects, count indicating the number of
returned items, limit indicating the requested maximum amount of records to be returned
and pageToken for the next page if available.

- object
  - `count` integer, required — Number of items returned in the response
  - `items` object[], required
    - `address` object — Location address.
      - `city` string — City
      - `country` string — Country
      - `postalCode` string — Postal code
      - `state` string — State
      - `street` string — Street address
    - `description` string — Description of the location.
    - `externalLocationId` string — External location id in external cloud
    - `geofenceId` string, uuid — Optional geofenceId associated with the location. Has to match an existing geofenceId.
    - `location` object — Location coordinates.
      - `lat` number, required — Latitude in WGS-84 format, decimal representation ranging from -90 to 90.
      - `lng` number, required — Longitude in WGS-84 format, decimal representation ranging from -180 to 180.
    - `locationId` string, required — Location ID
    - `name` string — Name of the location.
  - `limit` integer, required — Maximum number of items as specified in request
  - `nextPageToken` string — Token to fetch the next page (if exists)
  - `total` integer — Total number of locations for query

## Other responses

- `400` — Bad request The request object is in an incorrect format or has values that are invalid or out of range. If available, further error details are provided in the response body.
- `401` — Unauthorized The request did not provide correct authentication details
- `403` — Forbidden The account does not have the correct privileges

---

[API](https://skmtc.net/here/apis/tracking.md) · [All operations](https://skmtc.net/here/apis/tracking/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/here/tracking/revisions/efa162f7023c/schema)
