{ "info": { "_postman_id": "e238ccf5-c5ed-4d4d-b7fd-0ce03dd66e71", "name": "my.betterspace.cloud", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "19162329" }, "item": [ { "name": "Create Token", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "client_credentials", "type": "text" }, { "key": "client_id", "value": "{{client_id}}", "type": "text" }, { "key": "client_secret", "value": "{{client_secret}}", "type": "text" } ] }, "url": { "raw": "{{base_url}}/oauth/v1/token", "host": [ "{{base_url}}" ], "path": [ "oauth", "v1", "token" ] } }, "response": [] }, { "name": "Get a list of all spaces", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Ocp-Apim-Subscription-Key", "value": "{{subscription_key}}", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [] }, "url": { "raw": "{{base_url}}/occupancy/api/v1/companies/{{companyId}}/locations/{{locationId}}/spaces", "host": [ "{{base_url}}" ], "path": [ "occupancy", "api", "v1", "companies", "{{companyId}}", "locations", "{{locationId}}", "spaces" ] } }, "response": [] }, { "name": "Get all occupancies", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Ocp-Apim-Subscription-Key", "value": "{{subscription_key}}", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [] }, "url": { "raw": "{{base_url}}/occupancy/api/v1/companies/{{companyId}}/locations/{{locationId}}/occupancies?startDate=2025-05-07T22:00:00Z&endDate=2025-05-15T22:00:00Z", "host": [ "{{base_url}}" ], "path": [ "occupancy", "api", "v1", "companies", "{{companyId}}", "locations", "{{locationId}}", "occupancies" ], "query": [ { "key": "startDate", "value": "2025-05-07T22:00:00Z" }, { "key": "endDate", "value": "2025-05-15T22:00:00Z" } ] } }, "response": [] }, { "name": "Delete an occupancy", "request": { "method": "DELETE", "header": [ { "key": "Ocp-Apim-Subscription-Key", "value": "{{subscription_key}}", "type": "text" } ], "url": { "raw": "{{base_url}}/occupancy/api/v1/companies/{{companyId}}/locations/{{locationId}}/occupancies/{{occupancyId}}", "host": [ "{{base_url}}" ], "path": [ "occupancy", "api", "v1", "companies", "{{companyId}}", "locations", "{{locationId}}", "occupancies", "{{occupancyId}}" ] } }, "response": [] }, { "name": "Edit an occupancy", "request": { "method": "PUT", "header": [ { "key": "Ocp-Apim-Subscription-Key", "value": "{{subscription_key}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"occupancyNumber\": \"R#654321\",\n \"description\": \"Anything you want\",\n \"spaces\": [\n {\n \"id\": \"5b80a124-ea60-4d53-920a-610db116b520\",\n \"name\": \"Room 1\"\n }\n ],\n \"startDate\": \"2025-05-11T12:00:00+00:00\",\n \"endDate\": \"2025-05-14T12:00:00+00:00\",\n \"source\": \"MANUAL\",\n \"occupants\": []\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/occupancy/api/v1/companies/{{companyId}}/locations/{{locationId}}/occupancies/{{occupancyId}}", "host": [ "{{base_url}}" ], "path": [ "occupancy", "api", "v1", "companies", "{{companyId}}", "locations", "{{locationId}}", "occupancies", "{{occupancyId}}" ] } }, "response": [] }, { "name": "Create an occupancy", "request": { "method": "POST", "header": [ { "key": "Ocp-Apim-Subscription-Key", "value": "{{subscription_key}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"occupancyNumber\": \"R#12345\",\n \"description\": \"Anything you want\",\n \"spaces\": [\n {\n \"id\": \"5b80a124-ea60-4d53-920a-610db116b520\",\n \"name\": \"Room 1\"\n }\n ],\n \"startDate\": \"2025-05-24T12:00:00+00:00\",\n \"endDate\": \"2025-05-25T12:00:00+00:00\",\n \"source\": \"AUTOMATIC\",\n \"occupants\": []\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/occupancy/api/v1/companies/{{companyId}}/locations/{{locationId}}/occupancies", "host": [ "{{base_url}}" ], "path": [ "occupancy", "api", "v1", "companies", "{{companyId}}", "locations", "{{locationId}}", "occupancies" ] } }, "response": [] } ], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{token}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "packages": {}, "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "packages": {}, "exec": [ "" ] } } ], "variable": [ { "key": "base_url", "value": "https://api.betterspace.cloud", "type": "string" }, { "key": "client_id", "value": "", "type": "string" }, { "key": "client_secret", "value": "", "type": "string" }, { "key": "subscription_key", "value": "", "type": "string" }, { "key": "companyId", "value": "", "type": "string" }, { "key": "locationId", "value": "", "type": "string" }, { "key": "occupancyId", "value": "", "type": "string" }, { "key": "token", "value": "", "type": "string" } ] }