For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

List of accessible locations

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
limitinteger · min: 1 · max: 1000Optional

Limits how many records are returned in the response.

Default: 1000Example: 3
cursorstringOptional

Cursor value from the previous response's pagination object used to fetch the next or previous page of results.

Example: eyJsb2NhdGlvbl9pZCI6MTU2OH0
Responses
200

A flat list of accessible locations.

application/json
get/locations
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
  }
}

Get location details

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idintegerRequired

The ID of the location.

Example: 1560
Query parameters
includestring · enumOptional

Pass "children" to include child locations of the current location in the response.

Example: childrenPossible values:
limitintegerOptional

Maximum number of children to return per page when using include=children. Defaults to 1000 if not specified.

Default: 1000Example: 1
cursorstringOptional

Cursor value from the previous response's pagination object used to fetch the next or previous page of children when using include=children.

Example: eyJsb2NhdGlvbl9pZCI6MTU2OH0
Responses
200

Location details found

application/json
get/locations/{id}
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
  }
}

Get real-time occupancy data for a location

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idintegerRequired

The ID of the location.

Example: 1560
Query parameters
includestring · enumOptional

Pass "children" to include current occupancy for child locations in the response.

Example: childrenPossible values:
limitintegerOptional

Maximum number of children to return per page when using include=children. Defaults to 1000 if not specified.

Default: 1000Example: 1
cursorstringOptional

Cursor value from the previous response's pagination object used to fetch the next page of children when using include=children.

Example: eyJsb2NhdGlvbl9pZCI6MTU2OH0
Responses
200

Current real-time occupancy data for the location.

application/json
get/locations/{id}/now
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