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

# List locations

`GET /locations`

Endpoint used to list location resources

## Query parameters

- `cursor` string — Last pagination reference
- `limit` integer — max number of Locations returned
- `name` string — Will only show locations that have a name starting with this.
- `customFieldName` string[] — Filter locations by custom field value. Your query parameter should be your custom field name. (ie: To filter by a custom field named "Industry" with the value "Construction", you would do this "/locations?Industry=Construction"). <br><br>Adding multiple instance of the same custom field act as an <code>OR</code> and adding a different custom field act as an <code>AND</code>. (ie: To filter by a custom field named <code>Industry</code> with the value <code>Construction</code> OR <code>Transportation</code> AND the custom field <code>Manufacturer</code> with the value <code>ACME</code>, you would do this <code>/locations?Industry=Construction&Industry=Transportation&Manufacturer=ACME</code>). <br><br>If your custom field label is the same as a reserved query parameter such as <code>limit</code>, <code>sort</code>, <code>expand</code>, etc, you can add <code>__c</code> to your custom field filtering (ie: To filter by a custom field named <code>limit</code> with the value <code>ten</code>, you would do this <code>/locations?limit__c=ten</code>). <br><br>Note that your custom field needs to be created beforehand. Only number and single line text custom field types are supported.
- `expand` string[] — To expand multiple fields: `expand=extra_fields&expand=team_ids`

## Headers

- `x-organization-id` integer
- `x-organization-ids` string

## Response `200`

Successfully fetched Locations list

- object
  - `locations` object[], required
    - `id` integer, required — Global ID of the location
    - `name` string, required
    - `description` string, nullable
    - `address` string, nullable — Postal address of the location
    - `parentId` integer, nullable — ID of the parent location
    - `createdAt` string, date-time — Date & time at which the location was created
    - `updatedAt` string, date-time — Date & time at which the location was last updated. This doesn't include comments
    - `organizationId` integer — ID of the organization that owns this resource
    - `externalId` string, nullable — External ID for this location, unique per organization.
    - `extraFields` object — Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: "Department") (expand with query parameter)
    - `teamIds` number[] — Team IDs (expand with query parameter)
    - `vendorIds` number[] — Vendor IDs (expand with query parameter)
    - `barcode` string — String encoded barcode (expand with query parameter)
  - `nextCursor` string, nullable, required — The cursor to retrieve the next page of Locations.
  - `nextPageUrl` string, nullable, required — Path with query parameters that can be used to retrieve the next page of Locations.

## Other responses

- `400` — Error with query
- `401` — Invalid token

---

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