/api/v1/lookups/sublocations
Look up location spaces
Find named spaces inside one location in your organization.
Last updated
Request
GET /api/v1/lookups/sublocations
Requires locations:read. See token permissions.
Send Authorization: Bearer YOUR_API_TOKEN and Accept: application/json.
Query parameters
-
pageinteger Optional - Page number, starting at
1; defaults to1. -
per_pageinteger Optional - Results per page, from
1to100; defaults to25. -
searchstring 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.
-
location_idinteger Required - ID of the location containing the spaces, in your token's organization.
Example
Set ASSETCENTER_API_TOKEN as described in the quick start. Replace example IDs and searches with values from your organization.
curl --request GET "https://my.assetcenter.app/api/v1/lookups/sublocations?location_id=12&search=Shelf" \
--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.
{
"data": [
{
"id": 9,
"name": "Shelf A"
}
],
"links": {
"next": null,
"prev": null
},
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 25,
"total": 1
}
}
Behavior and constraints
Returns spaces inside the requested location, sorted by name and then ID. location_id must belong to your token's organization; a foreign or missing location ID returns 422. Spaces in other locations are excluded.
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.
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.