Postman collection
If you work in Postman, this collection gives you a runnable version of the core API patterns, with test scripts that chain state between requests: the auth token, your sandbox floor, the occupancy polling cursor, and the analytics paging offset are all stored in the environment automatically.
Download and import
Download collectionDownload environment template
- Download both files with the buttons above.
- In Postman, choose Import and add both files.
- Select the XY Sense Api User environment and fill in
coreApiKeyandcoreApiSecretwith your API key. AReadPublicApikey runs every request except Generate Occupancy Changes, which needsWritePublicApi.
Run order
Run the Getting started folder first:
- Fetch Auth Token stores the bearer token in the environment. Tokens last about 15 minutes, so re-run this request when you start seeing
401responses. - Fetch Space Data lists your floors and spaces, and stores the id of a floor named
API Test Floorfor the sandbox flow. If you don't have a floor with that name, the request still shows your portfolio and every other folder works normally.
Then explore the folders in any order:
| Folder | What it demonstrates |
|---|---|
| Occupancy | The full polling loop: generate sandbox events (dev-mode floors only), fetch the latest occupancy, then poll with a moving from cursor. Each run of the cursor request advances it, just like a production poller. |
| Analytics | occupancyPerHour with skip/take paging. Defaults to yesterday (UTC), and re-running the request pages through the results. |
| Space sensors | Capability and unit discovery, then the latest readings across your sensors. |
| Sensor health | Active area sensor installations with serial numbers and connection status. |
| Webhooks | Lists your registered webhooks and their delivery configuration. |
Prerequisites
- Each folder needs its feature enabled for your organisation.
- Generate Occupancy Changes needs a dev-mode floor and a
WritePublicApikey. See Test data without live sensors. - Analytics data becomes available the day after collection, so a brand-new sandbox returns an empty analytics page until it has a day of history.
The collection lives alongside these docs and is updated with them, so re-download it if the schema has moved since you imported it.