{"openapi":"3.1.0","info":{"title":"UK Bin Collection API","description":"Look up bin collection schedules for UK councils","version":"1.0.0"},"paths":{"/api/v1/addresses/{postcode}":{"get":{"summary":"Addresses","operationId":"addresses_api_v1_addresses__postcode__get","parameters":[{"name":"postcode","in":"path","required":true,"schema":{"type":"string","title":"Postcode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/council/{postcode}":{"get":{"summary":"Council Lookup","operationId":"council_lookup_api_v1_council__postcode__get","parameters":[{"name":"postcode","in":"path","required":true,"schema":{"type":"string","title":"Postcode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouncilLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lookup/{uprn}":{"get":{"summary":"Lookup","operationId":"lookup_api_v1_lookup__uprn__get","parameters":[{"name":"uprn","in":"path","required":true,"schema":{"type":"string","title":"Uprn"}},{"name":"council","in":"query","required":true,"schema":{"type":"string","title":"Council"}},{"name":"postcode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postcode"}},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/calendar/{uprn}":{"get":{"summary":"Calendar","operationId":"calendar_api_v1_calendar__uprn__get","parameters":[{"name":"uprn","in":"path","required":true,"schema":{"type":"string","title":"Uprn"}},{"name":"council","in":"query","required":true,"schema":{"type":"string","title":"Council"}},{"name":"postcode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postcode"}},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/councils":{"get":{"summary":"List Councils","operationId":"list_councils_api_v1_councils_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CouncilInfo"},"type":"array","title":"Response List Councils Api V1 Councils Get"}}}}}}},"/api/v1/health":{"get":{"summary":"Health","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/HealthEntry"},"type":"array","title":"Response Health Api V1 Health Get"}}}}}}},"/api/v1/status":{"get":{"summary":"System Status","operationId":"system_status_api_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemHealth"}}}}}}},"/api/v1/metrics":{"get":{"summary":"Metrics","operationId":"metrics_api_v1_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/report":{"post":{"summary":"Report Wrong","operationId":"report_wrong_api_v1_report_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddressLookupResponse":{"properties":{"postcode":{"type":"string","title":"Postcode"},"addresses":{"items":{"$ref":"#/components/schemas/AddressResult"},"type":"array","title":"Addresses"}},"type":"object","required":["postcode","addresses"],"title":"AddressLookupResponse"},"AddressResult":{"properties":{"uprn":{"type":"string","title":"Uprn"},"full_address":{"type":"string","title":"Full Address"},"postcode":{"type":"string","title":"Postcode"}},"type":"object","required":["uprn","full_address","postcode"],"title":"AddressResult"},"CollectionItem":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"type":{"type":"string","title":"Type"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"}},"type":"object","required":["date","type"],"title":"CollectionItem"},"CouncilInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"},"params":{"items":{"type":"string"},"type":"array","title":"Params"}},"type":"object","required":["id","name","url","params"],"title":"CouncilInfo"},"CouncilLookupResponse":{"properties":{"postcode":{"type":"string","title":"Postcode"},"council_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Council Id"},"council_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Council Name"}},"type":"object","required":["postcode"],"title":"CouncilLookupResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthEntry":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"last_success":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Success"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"error_count":{"type":"integer","title":"Error Count","default":0}},"type":"object","required":["id","name","status"],"title":"HealthEntry"},"LookupResponse":{"properties":{"uprn":{"type":"string","title":"Uprn"},"council":{"type":"string","title":"Council"},"cached":{"type":"boolean","title":"Cached","default":false},"cached_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cached At"},"collections":{"items":{"$ref":"#/components/schemas/CollectionItem"},"type":"array","title":"Collections"}},"type":"object","required":["uprn","council","collections"],"title":"LookupResponse"},"ReportRequest":{"properties":{"postcode":{"type":"string","title":"Postcode"},"address":{"type":"string","title":"Address"},"uprn":{"type":"string","title":"Uprn"},"council":{"type":"string","title":"Council"},"collections":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Collections"}},"type":"object","required":["postcode","address","uprn","council","collections"],"title":"ReportRequest"},"SystemHealth":{"properties":{"status":{"type":"string","title":"Status"},"scraper_count":{"type":"integer","title":"Scraper Count"},"postcode_lookup":{"type":"boolean","title":"Postcode Lookup"},"lad_lookup":{"type":"boolean","title":"Lad Lookup"},"redis_connected":{"type":"boolean","title":"Redis Connected"},"rate_limiting_active":{"type":"boolean","title":"Rate Limiting Active"}},"type":"object","required":["status","scraper_count","postcode_lookup","lad_lookup","redis_connected","rate_limiting_active"],"title":"SystemHealth"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}