{"openapi":"3.1.0","info":{"title":"PostalLens SG Data Portal","description":"Public, no-auth access to the PostalLens open-data corpus: resolve any Singapore postal code to a point, then ask what is around it.","version":"0.1.0"},"paths":{"/v1/health":{"get":{"summary":"Health","operationId":"health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/stats":{"get":{"summary":"Stats","operationId":"stats_v1_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/sources":{"get":{"summary":"List Sources","operationId":"list_sources_v1_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/resolve":{"get":{"summary":"Resolve","operationId":"resolve_v1_resolve_get","parameters":[{"name":"postal","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"6-digit Singapore postal code","title":"Postal"},"description":"6-digit Singapore postal code"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Alias for postal","title":"Q"},"description":"Alias for postal"},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Bypass the local cache and re-geocode","default":false,"title":"Refresh"},"description":"Bypass the local cache and re-geocode"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/rings":{"get":{"summary":"Rings","description":"Counts per search radius, per category — the cheapest possible read.","operationId":"rings_v1_rings_get","parameters":[{"name":"postal","in":"query","required":true,"schema":{"type":"string","description":"6-digit Singapore postal code","title":"Postal"},"description":"6-digit Singapore postal code"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/nearby":{"get":{"summary":"Nearby","operationId":"nearby_v1_nearby_get","parameters":[{"name":"postal","in":"query","required":true,"schema":{"type":"string","description":"6-digit Singapore postal code","title":"Postal"},"description":"6-digit Singapore postal code"},{"name":"radius","in":"query","required":false,"schema":{"type":"integer","maximum":3000,"minimum":50,"description":"Search radius in metres","default":800,"title":"Radius"},"description":"Search radius in metres"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restrict to one category","title":"Category"},"description":"Restrict to one category"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/report/{postal}":{"get":{"summary":"Report","operationId":"report_v1_report__postal__get","parameters":[{"name":"postal","in":"path","required":true,"schema":{"type":"string","title":"Postal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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"}}}}