{"openapi":"3.1.0","info":{"title":"New Venue Radar API","version":"1.0.0","description":"New and changing licensed venues (premises licence applications) in the City of London, Bristol and Camden, matched to FSA food hygiene data. Company applicants only; applications by individuals are never published. Each record carries source_url and an attribution line. Council data reused with permission; FSA data under the Open Government Licence v3.0. Takedown/corrections: privacy@venueradar.uk. Sales/support: hello@venueradar.uk.","contact":{"name":"New Venue Radar","email":"hello@venueradar.uk","url":"https://venueradar.uk"}},"servers":[{"url":"https://api.venueradar.uk"}],"security":[{"ApiKey":[]}],"paths":{"/health":{"get":{"summary":"Service status and dataset counts","security":[],"responses":{"200":{"description":"OK"}}}},"/account":{"get":{"summary":"Your plan, usage and trial dates","responses":{"200":{"description":"Account"},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/venues":{"get":{"summary":"List venues (newest signal first)","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Capped to the plan's max page size (free 25, sandbox 10, starter 50, standard 100, trial/pro 200)."},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"council","in":"query","schema":{"type":"string","enum":["city-of-london","bristol","camden"]}},{"name":"opened_after","in":"query","schema":{"type":"string","format":"date"}},{"name":"category","in":"query","schema":{"type":"string"},"description":"Matches FSA category or activity tag (alcohol, late_night_refreshment, live_music, recorded_music, ...)"},{"name":"fsa_status","in":"query","schema":{"type":"string","enum":["registered","rated","awaiting_inspection"]}},{"name":"include_baseline","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Page of venues","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Venue"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/venues/{id}":{"get":{"summary":"One venue with its applications","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Venue"},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Outside your plan's history window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/venues.csv":{"get":{"summary":"Venues as CSV (trial and paid plans)","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Capped to the plan's max page size (free 25, sandbox 10, starter 50, standard 100, trial/pro 200)."},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"council","in":"query","schema":{"type":"string","enum":["city-of-london","bristol","camden"]}}],"responses":{"200":{"description":"CSV","content":{"text/csv":{}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan does not include CSV","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications":{"get":{"summary":"List premises licence applications","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Capped to the plan's max page size (free 25, sandbox 10, starter 50, standard 100, trial/pro 200)."},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"council","in":"query","schema":{"type":"string","enum":["city-of-london","bristol","camden"]}},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","closed","unknown","all"],"default":"all"},"description":"pending = consultation still open"},{"name":"application_type","in":"query","schema":{"type":"string","enum":["new_licence","variation"]}}],"responses":{"200":{"description":"Page of applications","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Application"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{id}":{"get":{"summary":"One application","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Application"},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Outside your plan's history window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications.csv":{"get":{"summary":"Applications as CSV (trial and paid plans)","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Capped to the plan's max page size (free 25, sandbox 10, starter 50, standard 100, trial/pro 200)."},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"council","in":"query","schema":{"type":"string","enum":["city-of-london","bristol","camden"]}}],"responses":{"200":{"description":"CSV","content":{"text/csv":{}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan does not include CSV","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"summary":"List your active webhooks","responses":{"200":{"description":"Webhooks"},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Register a webhook (trial and paid plans)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"Public https URL on port 443. Private, internal and IP-literal targets are rejected."},"events":{"type":"array","items":{"type":"string","enum":["application.created","venue.created"]}}}}}}},"responses":{"201":{"description":"Created. The secret is shown once."},"400":{"description":"Invalid or blocked URL / webhook limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan does not include webhooks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"delete":{"summary":"Delete a webhook","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/test":{"post":{"summary":"Send a signed test ping","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Delivery result"},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Or Authorization: Bearer <key>"}},"schemas":{"Error":{"type":"object","properties":{"detail":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}},"Meta":{"type":"object","properties":{"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"limit_capped":{"type":"boolean"},"plan":{"type":"string"},"history_days":{"type":["integer","null"]},"attribution":{"type":"string"}}},"Venue":{"type":"object","properties":{"id":{"type":"string"},"council":{"type":"string"},"venue_name":{"type":"string"},"address":{"type":"string"},"postcode":{"type":["string","null"]},"category":{"type":["string","null"]},"licence_activities":{"type":"array","items":{"type":"string"}},"activity_tags":{"type":"array","items":{"type":"string"}},"hours":{"type":["string","null"]},"applicant":{"type":"string"},"applicant_type":{"const":"company"},"consultation_ends":{"type":["string","null"]},"fsa_status":{"type":["string","null"]},"fsa_id":{"type":["string","null"]},"fsa_source_url":{"type":["string","null"]},"source_url":{"type":"string"},"signal_date":{"type":["string","null"]},"application_ids":{"type":"array","items":{"type":"string"}},"attribution":{"type":"string"}}},"Application":{"type":"object","properties":{"id":{"type":"string"},"council":{"type":"string"},"application_type":{"type":"string"},"venue_name":{"type":"string"},"address":{"type":"string"},"applicant":{"type":"string"},"applicant_type":{"const":"company"},"application_date":{"type":["string","null"]},"consultation_ends":{"type":["string","null"]},"status":{"type":"string"},"description":{"type":["string","null"]},"venue_id":{"type":["string","null"]},"fsa_id":{"type":["string","null"]},"source_url":{"type":"string"},"attribution":{"type":"string"}}},"WebhookEvent":{"type":"object","description":"POST body. Header X-NVR-Signature: t=<unix>,v1=hex(HMAC_SHA256(secret, '<t>.' + raw_body)). Reject if t is older than 5 minutes.","properties":{"id":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string"},"data":{"type":"object"}}}}}}