↑ ↓ to navigate · ↵ to open See all results
GET /api/v1/lookups/locations

Look up locations

Find location IDs and names for integration forms.

Last updated

Request

GET /api/v1/lookups/locations

Requires locations:read. See token permissions.

Send Authorization: Bearer YOUR_API_TOKEN and Accept: application/json.

Query parameters

page integer Optional
Page number, starting at 1; defaults to 1.
per_page integer Optional
Results per page, from 1 to 100; defaults to 25.
search string Optional
Filter matching names or record details. Up to 255 characters; surrounding whitespace is trimmed. Omit or send an empty value for all eligible choices.

Example

Set ASSETCENTER_API_TOKEN as described in the quick start. Replace example IDs and searches with values from your organization.

cURL / Bash
curl --request GET "https://my.assetcenter.app/api/v1/lookups/locations?search=office" \
  --header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
  --header "Accept: application/json"

Response

200 OK. Each choice contains only id and name. The API includes additional pagination links and metadata.

JSON
{
  "data": [
    {
      "id": 12,
      "name": "Main office"
    }
  ],
  "links": {
    "next": null,
    "prev": null
  },
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 25,
    "total": 1
  }
}

Behavior and constraints

Searches location details and returns their names. Results sort by name and then ID. To find spaces inside a selected location, use space lookups.

Every lookup stays bound to the organization attached to the token, even after its creator switches organizations in the app. Follow links.next to read more results. tenant_id, account_id, kind, and unknown query fields are rejected. location_id is also rejected.

Errors

401 means the token is missing, expired, revoked, or not a customer API token. 403 means a required permission or administrator access is missing. 404 means the record or entry is unavailable through this path. 422 identifies invalid or unsupported input; inspect the errors object. 429 means a rate limit was reached. See error handling and rate limits.