# Area Detections

## Payload

The Detections event follows a standardized JSON structure:

```json
{
  "id": "event_2oUBiSXgx48RtbZKXHm5ekpAzFe",
  "type": "DETECTIONS",
  "timestamp": 1727735832000,
  "version": "v1.0.0",
  "metadata": {
    "org_id": "org_2oUBiRES2AmpczNM5yLu7pChz8o",
    "site_id": "site_2oUBkdxF0lLJZxyWVix09ZTsMNV",
    "building_id": "building_2oUBkaFkcYwDzo7HLXpPh8bP4cD",
    "floor_id": "space_2oUBnI7YL51GNemTvKIxEgSZ8gx",
    "room_id": "room_2oUDDps5iKHHo6RwlMgGVihmTlq", // (optional)
    "floor_custom_id": "2tZStWPtxqpmb3w0PoJDm7AnfIX", // (optional)
    "room_custom_id": "2tZSGplhA4CZ58wFlTf7wAeKMVo",  // (optional)
    "hive_id": "hive_2oULLOWeATbeC4Ebfe849hNlFWk",
    "sensor_id": "2oULMisdkRfEp6mBag2gLpJ0d7Z",
    "org_name": "Murphy Group",
    "site_name": "Los Angeles",
    "building_name": "Bergnaum Building",
    "floor_name": "1st Floor",
    "room_name": "Cherry Falls", // (optional)
    "hive_serial": "21312f639defabc0",
    "mac_address": "00-17-0d-00-00-cc-bb-aa",
    "sensor_mode": "presence",
    "sensor_model": "Heatic 2+",
    "hive_model": "2.0",
    "hive_version": "2.4.4"
  },
  "data": {
    "local": [ [0.5625, 0.125], [0.75, 0.5625] ], // 2 detections
    "world": [ [85.694195, 27.829299], [87.439295, 28.577199]] // 2 detections
  }
}
```

### Field Descriptions

#### Event Metadata

<table><thead><tr><th width="133">Field</th><th width="97">Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Unique event identifier</td></tr><tr><td>type</td><td>string</td><td>Event type (e.g., "detections")</td></tr><tr><td>timestamp</td><td>number</td><td>Timestamp of the event (in milliseconds)</td></tr><tr><td>version</td><td>string</td><td>Event version (e.g., "v1.0.0")</td></tr></tbody></table>

#### Organization and Location Metadata

<table><thead><tr><th width="173">Field</th><th width="157">Type</th><th>Description</th></tr></thead><tbody><tr><td>org_id</td><td>string</td><td>Unique organization identifier</td></tr><tr><td>site_id</td><td>string</td><td>Unique site identifier</td></tr><tr><td>building_id</td><td>string</td><td>Unique building identifier</td></tr><tr><td>floor_id</td><td>string</td><td>Unique floor identifier</td></tr><tr><td>room_id</td><td>string (optional)</td><td>Unique room identifier</td></tr><tr><td>floor_custom_id</td><td>string (optional)</td><td>Customer's unique floor identifier</td></tr><tr><td>room_custom_id</td><td>string (optional)</td><td>Customer's unique room identifier</td></tr><tr><td>hive_id</td><td>string</td><td>Unique hive identifier</td></tr><tr><td>sensor_id</td><td>string</td><td>Unique sensor identifier</td></tr><tr><td>org_name</td><td>string</td><td>Organization name</td></tr><tr><td>site_name</td><td>string</td><td>Site name</td></tr><tr><td>building_name</td><td>string</td><td>Building name</td></tr><tr><td>floor_name</td><td>string</td><td>Floor name</td></tr><tr><td>room_name</td><td>string (optional)</td><td>Room name</td></tr><tr><td>hive_serial</td><td>string</td><td>Hive serial number</td></tr><tr><td>mac_address</td><td>string</td><td>Sensor MAC address</td></tr><tr><td>sensor_mode</td><td>string</td><td>Sensor mode (e.g., "presence")</td></tr><tr><td>sensor_model</td><td>string</td><td>Sensor's model (e.g., "Heatic 2+", "Heatic 2")</td></tr><tr><td>hive_model</td><td>string</td><td>Hive's model (e.g., "2.0", "1.0")</td></tr><tr><td>hive_version</td><td>string</td><td>Hive's software version</td></tr></tbody></table>

#### Detection Data

<table><thead><tr><th width="102">Field</th><th width="259">Type</th><th>Description</th></tr></thead><tbody><tr><td>local</td><td>array[array[number, number]]</td><td>Array of detected people's coordinates (x, y), relative to the sensor's field of view</td></tr><tr><td>world</td><td>array[array[number, number]]</td><td>Array of detected people's coordinates (x, y), relative to the floor's coordinates</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.butlr.io/real-time-occupancy/webhooks-overview/human-detections.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
