{"service":"m2a-api","description":"Device REST API (decision/impression/heartbeat) + admin→device WS command relay","endpoints":{"GET /health":"Liveness probe","GET /v1/decision":"Preview the ad a device would be served (no impression unless record=true)","POST /v1/decision":"Select the ad for a device and record the impression (record=false to skip)","POST /v1/impressions":"Confirm a creative played (deviceId, campaignMediaId)","POST /v1/heartbeat":"Report device telemetry/location (state history source)","POST /v1/heartbeats/batch":"Replay bounded offline heartbeat telemetry after reconnection","POST /v1/commands/:id/result":"Report a Native Ad Loader command result to Operations Portal","GET /v1/native-ad-loader-releases/:id":"Authenticated tablet release stream through the VPN-safe API origin","GET /v1/media/:id":"Authenticated creative stream through the VPN-safe API origin","GET /v1/buffer-ads":"All currently servable creatives for offline pre-cache","GET /v1/devices/check":"Resolve/validate a device reference","GET /v1/devices/display-config":"Device/group custom display content for AdLoader side and top panels","GET /v1/qr.svg":"Generate a tracked QR SVG for an advertiser target URL","GET /v1/qr/scan":"Record a QR scan and redirect to the target URL","WS /relay":"admin→device command relay (admin: ?role=admin&token=<supabase jwt>; device: ?deviceId=&channel=agent|kiosk|adloader)"}}