Skip to content
aYOUne
← Configuration API

BuildingSpaceStates

Singular: BuildingSpaceState — Base URL: https://config-api.ayoune.app — Access: read-only — Machine-readable spec (JSON · YAML)

Try it now beta

Requests are proxied through the consumer-app to *.ayoune.app. Tokens stay in your browser and are forwarded per call.

Example response (recorded) sample

A real, previously recorded GET /:id response of this endpoint — not the live call above. Sensitive fields are masked.

{
  "payload": {
    "_id": "6acd2d3d69829e3b9200ea5d",
    "_buildingSpace": "6acd2d23cf30733281f1793d",
    "_companyLocation": "65ce1445a4982a6f10eb0ab4",
    "booking": {
      "busy": true,
      "until": "2026-10-12T21:26:16.000Z",
      "_calendarEntry": "6acd2d528503a4dac543a003",
      "measuredAt": "2026-10-12T19:02:56.904Z"
    },
    "createdAt": "2026-10-12T18:55:57.305Z",
    "fusedAt": "2026-10-12T19:02:56.904Z",
    "kind": "room",
    "shares": [],
    "updatedAt": "2026-10-12T19:02:57.327Z",
    "lastOccupiedAt": "2026-10-12T19:02:56.904Z",
    "occupancy": {
      "value": {
        "occupied": true
      },
      "source": "booking",
      "measuredAt": "2026-10-12T19:02:56.904Z",
      "confidence": 0.5
    }
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://config-api.ayoune.app/buildingspacestates/6acd2d3d69829e3b9200ea5d",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "BuildingSpaces",
        "title": "MODEL_BUILDINGSPACE",
        "href": "https://api.ayoune.app/config/buildingspaces/6acd2d23cf30733281f1793d",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.buildingspaces"
      },
      {
        "rel": "CompanyLocations",
        "title": "MODEL_COMPANYLOCATION",
        "href": "https://api.ayoune.app/config/companylocations/65ce1445a4982a6f10eb0ab4",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.companylocations"
      }
    ],
    "relations": [
      {
        "rel": "BuildingSpaces",
        "title": "MODEL_BUILDINGSPACE",
        "href": "https://api.ayoune.app/config/buildingspaces",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.buildingspaces"
      },
      {
        "rel": "CompanyLocations",
        "title": "MODEL_COMPANYLOCATION",
        "href": "https://api.ayoune.app/config/companylocations",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.companylocations"
      }
    ],
    "debugId": "6b0653ca92a1964c090dd31e",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_BUILDINGSPACESTATE",
        "href": "https://api.ayoune.app/config/buildingspacestates/6acd2d3d69829e3b9200ea5d/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_BUILDINGSPACESTATE",
        "href": "https://api.ayoune.app/config/buildingspacestates/6acd2d3d69829e3b9200ea5d",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.170.1",
      "core": "2026.393.0"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "6452",
      "reset": "1795579355",
      "resetDate": "Wed Nov 25 2026"
    },
    "responseTime": 19.243872,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

MethodPathDescriptionRight
GET /buildingspacestates List with filters/pagination config.buildingspacestates.view
GET /buildingspacestates/:id Single record by ID config.buildingspacestates.view

SDK

import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');

// List all
const list = await ay.config.buildingSpaceStates.find().limit(10).exec();

// Single record
const one = await ay.config.buildingSpaceStates.findById('OBJECT_ID').exec();

See also