---
title: "List locations"
method: GET
path: "/api/v1/locations"
tags: ["locations"]
---

# List locations

`GET /api/v1/locations`

## Request

- Base URL: `https://demo.invoiceninja.com`
- URL: `https://demo.invoiceninja.com/api/v1/locations`
- Auth: none declared. Required headers: `X-API-TOKEN`, `X-Requested-With`
- TypeScript: <https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/docs/api/v1/locations/get.ts> (a function with typed inputs; its response is checked against the schema)

##  GET /api/v1/locations

Locations are additional addresses that are applicable to a client. This is useful when a client has multiple addresses for shipping, billing, etc.

When retrieving a list of locations you can chain query parameters to filter the dataset. For example:

```html
/api/v1/locations?name=warehouse*
```

Sorting uses `column|asc` or `column|desc`. Use a single `sort` parameter for one column, or repeated `sort[]` parameters for multi-level ordering (first is primary):

```html
/api/v1/locations?sort=id|desc
/api/v1/locations?sort[]=id|desc&sort[]=name|asc
```

For pagination, use per_page and page parameters:

```html
/api/v1/locations?per_page=15&page=2
```

The default per_page value is 20.

## Query parameters

- `index` string
- `per_page` integer
- `page` integer
- `sort` string[]
- `name` string

## Headers

- `X-API-TOKEN` string, required
- `X-Requested-With` string, required

## Response `200`

A list of locations

- object
  - `data` Location[]
    - `id` string: The location hashed id
    - `name` string: The location name
    - `address1` string: The first line of the address
    - `address2` string: The second line of the address
    - `city` string: The city name
    - `state` string: The state or region
    - `postal_code` string: The postal or zip code
    - `country_id` string: The ID of the associated country
    - `custom_value1` string, nullable: Custom field value 1
    - `custom_value2` string, nullable: Custom field value 2
    - `custom_value3` string, nullable: Custom field value 3
    - `custom_value4` string, nullable: Custom field value 4
    - `is_deleted` boolean: Indicates if the location has been deleted
    - `is_shipping_location` boolean: Indicates if this is a shipping location
    - `user_id` string: The user hashed id
    - `assigned_user_id` string: The assigned user hashed id
    - `client_id` string: The client hashed id
    - `vendor_id` string: The vendor hashed id
    - `created_at` integer: Timestamp of when the location was created
    - `updated_at` integer: Timestamp of when the location was last updated

## Other responses

- `401`: Authentication error
- `403`: Authorization error
- `422`: Validation error
- `429`: Rate Limit Exceeded
- `default`: Unexpected Error

## Changes

- **2026-05-06** `89876e7e51d6`: 1 info
  - for the `query` request parameter `sort`, the type was generalized from `string` to `array`
- **2026-04-20** `69a36036d334`: 1 info
  - the response optional property `data/items/id` became read-only for the status `200`
- **2025-10-10** `f36c4f94ae7b`: 2 info
  - added the new optional `query` request parameter `page`
  - added the new optional `query` request parameter `per_page`
- **2025-05-24** `93bb427f804b`: 1 warning
  - removed the optional property `meta` from the response with the `200` status
- **2025-05-23** `783f03909c3a`: 1 info
  - added the optional property `meta` to the response with the `200` status

[Operation history](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/changes/api/v1/locations/get.md)

---

[API](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference.md) - [All operations](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/revisions/bcda1f823746?raw)
