This returns average time spent (in milliseconds) per zone, helping you optimize product placement. Polling an API every minute is inefficient. The Xovis documentation describes webhooks. You configure XCS to send an HTTP POST to your server only when an event occurs (e.g., queue exceeds 10 people or occupancy hits 90%).
Example: http://192.168.1.100/api/v1/occupancy/current The documentation lists dozens of endpoints, but 80% of integrations use these three: xovis api documentation
# Navigate the JSON structure per docs occupancy = data['data'][0]['current_people'] print(f"Current people: occupancy") return occupancy except requests.exceptions.RequestException as e: print(f"API Error: e (Check docs for error code meaning)") return None while True: get_current_occupancy() time.sleep(60) # Respect rate limits per documentation Beyond simple counting, the Xovis API documentation details advanced telemetry that separates this system from basic infrared beam counters. 1. Path Data (Trajectories) For privacy-compliant heatmaps, the API can export aggregated path data (not individual tracking). The endpoint /analytics/paths returns how people move between zones. This requires enabling "Path Analytics" in XCS. 2. Dwell Time Endpoint Understanding where customers linger is gold for retailers. The documentation explains the dwell_time parameter: GET /zones/id/dwell?interval=PT1H This returns average time spent (in milliseconds) per
| Endpoint | Method | Description | | :--- | :--- | :--- | | /sensors | GET | Lists all sensors connected to the XCS. | | /counts/interval | GET | Retrieves historical footfall data (requires start/end time). | | /occupancy/current | GET | Snapshot of current load per zone. | | /queue/status | GET | Data for actively monitored queue areas. | Let’s simulate a real-world use case: Displaying real-time store occupancy on a digital sign. Step 1: Read the Request Parameters According to the Xovis API documentation, the /occupancy/current endpoint supports optional filtering by locationId . If omitted, it returns all zones. You configure XCS to send an HTTP POST
"status": "success", "timestamp": "2024-05-21T14:32:01Z", "data": [ "zoneId": "entrance_a", "name": "Main Entrance", "current_people": 47, "capacity": 100, "utilization_percentage": 47.0, "status": "normal" ]
headers = "Authorization": f"Apikey API_KEY"