This API authenticates with Client SDK keys (
osk_ prefix).
This is the reverse direction from the Data Ingestion API (server to OneSight) — it polls events pushed from the server to the client.Endpoint
Overview
The Event Polling API provides a single channel for all push-type information that needs to be delivered from the backend to the client.- Zone entry notifications: Alerts when entering specific store sections
- Promotions: Flash deals, discount information
- Payment status: Payment requested, processing, completed, or failed
Request
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
zone | string | No | Current store zone (e.g., wine, meat). If omitted, only zone-independent events are returned |
Zone Types
| Zone | Description |
|---|---|
processed_food | Processed food |
fresh_produce | Fresh produce |
meat | Meat counter |
wine | Wine & spirits |
bakery | Bakery |
checkout | Checkout |
Response
Zone Promotion Event
Zone Entry Notification
Payment Status Event
No Events
Event Types
| Type | Description |
|---|---|
zone_promo | Zone promotion (Flash Deals, etc.) |
zone_entered | Zone entry notification |
payment_state | Payment status change |
Payment States
| State | Description |
|---|---|
REQUESTED | Payment request received |
PROCESSING | Being processed by payment provider |
COMPLETED | Payment completed |
FAILED | Payment failed |
Payment Failure Codes
| Code | Description |
|---|---|
INSUFFICIENT_BALANCE | Insufficient balance or credit limit |
CARD_DECLINED | Card declined |
TIMEOUT | Timed out |
USER_CANCELLED | Cancelled by user |
UNKNOWN | Unknown error |
Block Types
| Type | Description |
|---|---|
promo_card | Promotion card (image, price, discount) |
text | Text message |
image | Image |
product_list | Product listing |
suggestion | AI recommendation/suggestion |
result_card | Result card (success/failure/info) |
info_box | Information box |
Behavior
- Events are returned only once (marked as consumed after polling)
- Events past their
expires_atare automatically excluded - Use
event_idfor client-side deduplication - Periodic polling is recommended (2-5 second intervals)