---
title: "List project locations"
method: GET
path: "/v2/projects/{project_id}/locations"
tags: ["locations"]
---

# List project locations

`GET /v2/projects/{project_id}/locations`

## Request

- Base URL: `https://api.hubstaff.com`
- URL: `https://api.hubstaff.com/v2/projects/{project_id}/locations`
- Auth: OAuth 2
  - Authorization code: `https://account.hubstaff.com/authorizations/new`
  - Token URL: `https://account.hubstaff.com/access_tokens` scopes: `hubstaff:read`, `hubstaff:write`
- TypeScript: <https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/docs/v2/projects/:project_id/locations/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a collection of locations (GPS coordinates) for the given project.

Results can be filtered by time_slot[start]/[stop].

Note: Date range limit is 7 days.

## Path parameters

- `project_id` integer, required

## Query parameters

- `page_start_id` integer
- `page_limit` integer
- `time_slot[start]` string, date-time, required
- `time_slot[stop]` string, date-time, required
- `include` string[]

## Response `200`

A list of locations

- object
  - `locations` Location[]
    - `id` integer, required: Location ID
    - `user_id` integer, required: User ID
    - `project_id` integer, required: Project ID
    - `created_at` string, date-time, required: When the record was created
    - `updated_at` string, date-time, required: When the record was last updated
    - `time_slot` string, date-time, required: Time slot
    - `recorded_at` string, date-time, required: Date and time the location was recorded
    - `date` string, date, required: Organization date
    - `latitude` string, required: Latitude, a decimal string
    - `longitude` string, required: Longitude, a decimal string
    - `accuracy` string, required: Accuracy, a decimal string
    - `job_site_id` integer: Job Site ID
    - `event` string, required: Event type (enter, exit, move

## Other responses

- `400`: Invalid parameters
- `401`: Unauthorized
- `403`: API access is only for organizations on an active plan
- `404`: Could not find record
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api.md) - [All operations](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/revisions/c6b90e4e4bdc?raw)
