{
 "openapi":"3.0.3",
 "info":{"title":"Jimo KE Maps customer API","version":"0.1.0","description":"Coordinates are longitude,latitude. Navigation permission is required for search and route. Browser keys require an allowed origin/referrer. Server keys are for trusted backends. Authentication and provider quotas are separate."},
 "servers":[{"url":"/","description":"Your deployed Jimo Maps host"}],
 "security":[{"JimoApiKey":[]}],
 "components":{"securitySchemes":{"JimoApiKey":{"type":"apiKey","in":"header","name":"X-JimoMaps-Key"}},"schemas":{"Error":{"type":"object","properties":{"status":{"type":"integer"},"detail":{"type":"string"}}},"Access":{"type":"object","properties":{"map":{"type":"boolean"},"navigation":{"type":"boolean"},"dailyLimit":{"type":"integer"},"remaining":{"type":"integer"}}},"Location":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"coordinates":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number"},"description":"[longitude,latitude]"}}}},"responses":{"BadRequest":{"description":"Invalid input"},"Unauthorized":{"description":"Missing, invalid, expired or revoked key"},"Forbidden":{"description":"Origin or navigation permission denied; revoked browser origins may also return 403"},"Limited":{"description":"Daily quota or provider throttle. Honor Retry-After when supplied."},"Unavailable":{"description":"Database or provider unavailable"}}},
 "paths":{
  "/api/map/access":{"get":{"operationId":"getAccess","summary":"Read key permissions and remaining quota; does not consume quota","responses":{"200":{"description":"Key capabilities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Access"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}},
  "/api/map/config":{"get":{"operationId":"getMapConfig","summary":"Read the configured tile source and attribution","responses":{"200":{"description":"Source configuration","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/Limited"}}}},
  "/api/map/locations":{"get":{"operationId":"getPublicLocations","summary":"Read up to 1000 public locations","responses":{"200":{"description":"Public locations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Location"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/Limited"},"503":{"$ref":"#/components/responses/Unavailable"}}}},
  "/api/map/layers":{"get":{"operationId":"getPublicLayers","summary":"Read up to 100 public GeoJSON layers","responses":{"200":{"description":"Array of {id,name,geoJson}","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"geoJson":{"type":"object"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/Limited"}}}},
  "/api/map/search":{"get":{"operationId":"searchPlaces","summary":"Search places; navigation-enabled key required","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":200},"example":"Nairobi"}],"responses":{"200":{"description":"Photon GeoJSON FeatureCollection, up to 5 results","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/Limited"},"502":{"$ref":"#/components/responses/Unavailable"}}}},
  "/api/map/route":{"get":{"operationId":"getDrivingRoute","summary":"Calculate a driving route; navigation-enabled key required","parameters":[{"name":"start","in":"query","required":true,"schema":{"type":"string"},"example":"36.8219,-1.2921","description":"longitude,latitude"},{"name":"end","in":"query","required":true,"schema":{"type":"string"},"example":"36.814,-1.265","description":"longitude,latitude; must differ from start"}],"responses":{"200":{"description":"OSRM response: check code=Ok and routes before use. Distance metres; duration seconds; geometry GeoJSON.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/Limited"},"502":{"$ref":"#/components/responses/Unavailable"}}}}
 }
}
