Locations
The Locations endpoints allow you to retrieve a list of all accessible locations, view details for a specific location, and get real-time occupancy data for any location.
Limits how many records are returned in the response.
1000Example: 3Cursor value from the previous response's pagination object used to fetch the next or previous page of results.
eyJsb2NhdGlvbl9pZCI6MTU2OH0A flat list of accessible locations.
Unexpected error
GET /v2/locations HTTP/1.1
Host: api.occuspace.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": [
{
"location_id": 1560,
"name": "Austin Office",
"status": "active",
"parent_id": null,
"capacity": 1341,
"start_date": "2024-07-17"
},
{
"location_id": 1562,
"name": "Amenities",
"status": "active",
"parent_id": 1560,
"capacity": 126,
"start_date": "2024-07-17"
},
{
"location_id": 1563,
"name": "Departments",
"status": "active",
"parent_id": 1560,
"capacity": 1215,
"start_date": "2024-07-17"
}
],
"pagination": {
"prev_cursor": null,
"next_cursor": "eyJsb2NhdGlvbl9pZCI6MTU2OH0",
"has_more": true
}
}The ID of the location.
1560Pass "children" to include child locations of the current location in the response.
childrenPossible values: Maximum number of children to return per page when using include=children. Defaults to 1000 if not specified.
1000Example: 1Cursor value from the previous response's pagination object used to fetch the next or previous page of children when using include=children.
eyJsb2NhdGlvbl9pZCI6MTU2OH0Location details found
Location not found or not accessible with the provided credentials
Internal server error
GET /v2/locations/{id} HTTP/1.1
Host: api.occuspace.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": {
"location_id": 1560,
"name": "Austin Office",
"status": "active",
"parent_id": null,
"capacity": 1341,
"start_date": "2025-12-01",
"children_data": [
{
"location_id": 1562,
"name": "Amenities",
"status": "active",
"parent_id": 1560,
"capacity": 126,
"start_date": "2025-12-01"
}
]
},
"pagination": {
"prev_cursor": null,
"next_cursor": "eyJsb2NhdGlvbl9pZCI6MTU2OH0",
"has_more": true
}
}The ID of the location.
1560Pass "children" to include current occupancy for child locations in the response.
childrenPossible values: Maximum number of children to return per page when using include=children. Defaults to 1000 if not specified.
1000Example: 1Cursor value from the previous response's pagination object used to fetch the next page of children when using include=children.
eyJsb2NhdGlvbl9pZCI6MTU2OH0Current real-time occupancy data for the location.
Location not found or not accessible with the provided credentials.
Internal server error
GET /v2/locations/{id}/now HTTP/1.1
Host: api.occuspace.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": {
"location_id": 1560,
"name": "Austin Office",
"status": "active",
"count": 1073,
"percentage": 0.8,
"timestamp": "2025-12-01T22:01:28",
"children_data": [
{
"location_id": 1562,
"name": "Amenities",
"status": "active",
"count": 95,
"percentage": 0.75
}
]
},
"pagination": {
"prev_cursor": null,
"next_cursor": "eyJsb2NhdGlvbl9pZCI6MTU2OH0",
"has_more": true
}
}Last updated