{"openapi":"3.1.0","info":{"title":"OneIn API","version":"1.0.0","summary":"Read live occupancy, trading-night history and counter health for your venues.","description":"Every request carries an API key made by an owner under Integrations in the OneIn web app, as a bearer token. Keys come with the Max plan. Up to 60 requests a minute per key. Times are ISO 8601 in UTC; dates are the venue’s trading nights."},"servers":[{"url":"https://app.oneinhq.com/api/v1"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Authorization: Bearer onein_…"}}},"paths":{"/venues":{"get":{"summary":"List venues","description":"The venues this key can read, sorted by name.","responses":{"200":{"description":"Venues.","content":{"application/json":{"example":{"venues":[{"id":"v_riverside","name":"Riverside Bar","capacity":250,"timeZone":"Europe/London","doors":[{"id":"front","name":"Front door"},{"id":"side","name":"Side exit"}],"channels":{"twoChannels":false,"labels":["A","B"]},"hours":[null,{"opens":"17:00","closes":"01:00"},{"opens":"17:00","closes":"01:00"},{"opens":"17:00","closes":"01:00"},{"opens":"17:00","closes":"02:00"},{"opens":"17:00","closes":"04:00"},{"opens":"17:00","closes":"04:00"}]}]}}}},"401":{"description":"Missing, invalid or revoked key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}},"403":{"description":"The organisation doesn’t have API access (an extra on Multi-door and Max).","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}},"429":{"description":"More than 60 requests in a minute for this key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}}}}},"/venues/{venueId}":{"get":{"summary":"One venue","parameters":[{"name":"venueId","in":"path","required":true,"schema":{"type":"string"},"description":"From GET /venues."}],"responses":{"200":{"description":"The venue.","content":{"application/json":{"example":{"id":"v_riverside","name":"Riverside Bar","capacity":250,"timeZone":"Europe/London","doors":[{"id":"front","name":"Front door"},{"id":"side","name":"Side exit"}],"channels":{"twoChannels":false,"labels":["A","B"]},"hours":[null,{"opens":"17:00","closes":"01:00"},{"opens":"17:00","closes":"01:00"},{"opens":"17:00","closes":"01:00"},{"opens":"17:00","closes":"02:00"},{"opens":"17:00","closes":"04:00"},{"opens":"17:00","closes":"04:00"}]}}}},"401":{"description":"Missing, invalid or revoked key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}},"403":{"description":"The organisation doesn’t have API access (an extra on Multi-door and Max).","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}},"404":{"description":"Not a venue this key can read."},"429":{"description":"More than 60 requests in a minute for this key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}}}}},"/venues/{venueId}/live":{"get":{"summary":"Who’s in now","description":"The current trading night’s totals. `capacityState` is ok, warn (90% or more) or full. `byDoor` is keyed by door id.","parameters":[{"name":"venueId","in":"path","required":true,"schema":{"type":"string"},"description":"From GET /venues."}],"responses":{"200":{"description":"Live totals.","content":{"application/json":{"example":{"venueId":"v_riverside","day":"2026-10-03","total":184,"ins":212,"outs":28,"capacity":250,"capacityState":"ok","byDoor":{"front":{"ins":212,"outs":28}},"byChannel":[184,0],"updatedAt":"2026-10-03T23:41:08.120Z"}}}},"401":{"description":"Missing, invalid or revoked key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}},"403":{"description":"The organisation doesn’t have API access (an extra on Multi-door and Max).","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}},"429":{"description":"More than 60 requests in a minute for this key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}}}}},"/venues/{venueId}/nights":{"get":{"summary":"Trading nights","description":"Nights between `from` and `to` inclusive, most recent first; the last 31 days by default, up to 92 at a time. Send `Accept: text/csv` (or `?format=csv`) for a CSV with one row per night.","parameters":[{"name":"venueId","in":"path","required":true,"schema":{"type":"string"},"description":"From GET /venues."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"example":"2026-09-01"},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"example":"2026-09-30"}],"responses":{"200":{"description":"Nights.","content":{"application/json":{"example":{"venueId":"v_riverside","nights":[{"venueId":"v_riverside","date":"2026-10-03","peak":231,"peakAt":"2026-10-04T00:45:00.000Z","entries":612,"exits":609,"entriesBy15":{"20:00":8,"20:15":6,"20:30":11}}]}}}},"401":{"description":"Missing, invalid or revoked key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}},"403":{"description":"The organisation doesn’t have API access (an extra on Multi-door and Max).","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}},"429":{"description":"More than 60 requests in a minute for this key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}}}}},"/venues/{venueId}/nights/{date}":{"get":{"summary":"One night","description":"A night’s peak, entries, exits and entries in every 15-minute slot (keyed by local time). CSV gives one row per slot.","parameters":[{"name":"venueId","in":"path","required":true,"schema":{"type":"string"},"description":"From GET /venues."},{"name":"date","in":"path","required":true,"schema":{"type":"string","format":"date"},"example":"2026-10-03"}],"responses":{"200":{"description":"The night.","content":{"application/json":{"example":{"venueId":"v_riverside","date":"2026-10-03","peak":231,"peakAt":"2026-10-04T00:45:00.000Z","entries":612,"exits":609,"entriesBy15":{"20:00":8,"20:15":6,"20:30":11}}}}},"401":{"description":"Missing, invalid or revoked key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}},"403":{"description":"The organisation doesn’t have API access (an extra on Multi-door and Max).","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}},"404":{"description":"Nothing was counted that night."},"429":{"description":"More than 60 requests in a minute for this key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}}}}},"/counters":{"get":{"summary":"Counters","description":"Every clicker and phone in the organisation that this key’s venues cover: where it is and how it’s doing. `signal` is WiFi RSSI in dBm.","responses":{"200":{"description":"Counters.","content":{"application/json":{"example":{"counters":[{"id":"ON1-24A7C3","kind":"clicker","label":"Front door","venueId":"v_riverside","doorId":"front","lastSeenAt":"2026-10-03T23:41:02.000Z","batteryPct":74,"signal":-58,"version":"1.2.0"}]}}}},"401":{"description":"Missing, invalid or revoked key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}},"403":{"description":"The organisation doesn’t have API access (an extra on Multi-door and Max).","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}},"429":{"description":"More than 60 requests in a minute for this key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"example":{"code":"not_found","message":"No venue with that id for this key."}}}}}}}}}}