{"openapi":"3.1.0","info":{"title":"EV Route Planner API","version":"1.0.0","description":"Plan an EV road trip with charging stops, and look up chargers. These are the endpoints the embeddable planner itself calls. No API key and no sign-in: every endpoint is public and rate-limited per caller IP. Every error response is JSON with a single `error` string that is safe to show to a person."},"servers":[{"url":"/","description":"Current host"}],"security":[],"tags":[{"name":"Planning","description":"Trip plans with charging stops."},{"name":"Chargers","description":"Charger search and charger details (Open Charge Map data)."},{"name":"Operations","description":"Health checks."}],"paths":{"/api/plan":{"post":{"operationId":"planTrip","summary":"Plan a trip","tags":["Planning"],"description":"Geocodes the origin, destination and any waypoints, routes between them, finds chargers along the way that the chosen vehicle can plug into, and returns three plans: `optimal` (shortest total time), `fewer` and `fewest` (fewer charging stops). Routes and chargers are cached for 7 days per origin/destination pair, so repeat trips are fast. Set `ephemeralPlan: true` for a driver-started update that must not read or write the route cache.\n\nSend `Accept: application/x-ndjson` to stream the answer instead: one JSON object per line, in order `route`, `chargers`, `plan` (each with a `stage` field and the same fields as the combined response), so the route can be drawn before the charging plan is ready. In a stream, a failure after the response has started arrives as a final `{\"stage\":\"error\",\"error\":\"...\"}` line with status 200.","x-rate-limit":"20 plan units per 5 minutes per IP. A request costs 1 unit plus 1 per waypoint. Trips that need new routing also draw on the free providers' shared daily quotas; when those run out the response is a 429 naming the daily limit.","x-cors":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequest"},"example":{"originQuery":"Los Angeles, CA","destinationQuery":"Las Vegas, NV","vehicleModelId":"tesla:model3:2024:lr:awd","startSoCPercent":90,"minSoCAtChargerPercent":10,"minSoCAtDestinationPercent":10}}}},"responses":{"200":{"description":"The trip plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"},"example":{"origin":{"lat":34.05,"lon":-118.24,"displayName":"Los Angeles, Los Angeles County, California, United States"},"destination":{"lat":36.17,"lon":-115.15,"displayName":"Las Vegas, Clark County, Nevada, United States"},"waypoints":[],"route":{"coordinates":[[-118.24,34.05],[-115.15,36.17]],"edges":[{"distanceKm":0.05,"durationHours":0,"elevationGainM":0.75,"elevationLossM":0,"cumulativeDistanceKm":0.05}],"totalDistanceKm":434.89,"totalDurationHours":4.48,"elevationAvailable":true,"usingFallbackRouting":false,"elevations":[100.75,101.5]},"chargers":[{"id":"ocm-97637","name":"Baker, Ca Supercharger","lat":35.26,"lon":-116.08,"distanceAlongRouteKm":283.45,"maxPowerKw":250,"networkName":"Tesla (Tesla-only charging)","stallCount":40,"connections":[{"plugType":"NACS","powerKw":150},{"plugType":"NACS","powerKw":250}],"source":"openchargemap"}],"plan":{"optimal":{"objective":"optimal","feasible":true,"stops":[{"chargerId":"ocm-97637","chargerName":"Baker, Ca Supercharger","plugType":"NACS","distanceAlongRouteKm":283.45,"arrivalSoCPercent":20.57,"departureSoCPercent":50,"chargeDurationMinutes":13.87,"arrivalTripTimeHours":2.92}],"waypoints":[],"totalDriveTimeHours":4.48,"totalChargeTimeHours":0.23,"totalTripTimeHours":4.71,"finalArrivalSoCPercent":11.22},"fewer":{"objective":"fewer","feasible":true,"stops":[{"chargerId":"ocm-97637","chargerName":"Baker, Ca Supercharger","plugType":"NACS","distanceAlongRouteKm":283.45,"arrivalSoCPercent":20.57,"departureSoCPercent":50,"chargeDurationMinutes":13.87,"arrivalTripTimeHours":2.92}],"waypoints":[],"totalDriveTimeHours":4.48,"totalChargeTimeHours":0.23,"totalTripTimeHours":4.71,"finalArrivalSoCPercent":11.22},"fewest":{"objective":"fewest","feasible":true,"stops":[{"chargerId":"ocm-97637","chargerName":"Baker, Ca Supercharger","plugType":"NACS","distanceAlongRouteKm":283.45,"arrivalSoCPercent":20.57,"departureSoCPercent":50,"chargeDurationMinutes":13.87,"arrivalTripTimeHours":2.92}],"waypoints":[],"totalDriveTimeHours":4.48,"totalChargeTimeHours":0.23,"totalTripTimeHours":4.71,"finalArrivalSoCPercent":11.22}},"batteryProfiles":{"optimal":[{"cumulativeDistanceKm":0,"socPercent":90},{"cumulativeDistanceKm":434.89,"socPercent":11.22}],"fewer":[{"cumulativeDistanceKm":0,"socPercent":90},{"cumulativeDistanceKm":434.89,"socPercent":11.22}],"fewest":[{"cumulativeDistanceKm":0,"socPercent":90},{"cumulativeDistanceKm":434.89,"socPercent":11.22}]},"steepGradientSegment":null,"legElevationEffects":{"optimal":[{"fromKm":0,"toKm":283.45,"elevationGainM":2111.42,"elevationLossM":1929.5,"extraConsumptionPercent":12.64},{"fromKm":283.45,"toKm":434.89,"elevationGainM":1497.83,"elevationLossM":1160.5,"extraConsumptionPercent":17.76}],"fewer":[{"fromKm":0,"toKm":283.45,"elevationGainM":2111.42,"elevationLossM":1929.5,"extraConsumptionPercent":12.64},{"fromKm":283.45,"toKm":434.89,"elevationGainM":1497.83,"elevationLossM":1160.5,"extraConsumptionPercent":17.76}],"fewest":[{"fromKm":0,"toKm":283.45,"elevationGainM":2111.42,"elevationLossM":1929.5,"extraConsumptionPercent":12.64},{"fromKm":283.45,"toKm":434.89,"elevationGainM":1497.83,"elevationLossM":1160.5,"extraConsumptionPercent":17.76}]},"weatherNote":null,"planningOutsideTempC":20}},"application/x-ndjson":{"schema":{"$ref":"#/components/schemas/PlanStreamEvent"}}}},"400":{"description":"The request is malformed: a required field is missing, the vehicle id is unknown, there are more than 5 waypoints, an address could not be found, or the combined route is too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Could not find a location for \"Atlantis\"."}}}},"422":{"description":"There is no driving route between these places (for example, to Hawaii). Retrying gives the same answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"No driving route between Los Angeles, CA and Honolulu, HI."}}}},"429":{"description":"Either this caller's rate limit, or a routing/charger provider's free daily quota, has been reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Try again in a few minutes."}}}},"500":{"description":"An unexpected error in this app. Details are in the server log, never in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Something went wrong planning this trip. Please try again."}}}},"503":{"description":"A routing, charger or geocoding provider is down or timed out. Try again in a few minutes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"The trip-planning service is temporarily unavailable upstream. Please try again in a few minutes."}}}}}}},"/api/chargers":{"get":{"operationId":"listChargersInArea","summary":"Chargers in a map area","tags":["Chargers"],"description":"Every charger inside a bounding box, for a map layer. Below zoom 6 it returns an empty list with `zoomTooLow: true` and calls nothing upstream. Results are capped at 500; `cappedByResultLimit` says when the cap was hit, so zooming in shows the rest.","x-rate-limit":"Charged per map tile the area covers that is not already cached on the server: 120 tiles per minute and 80 tiles per day per IP. Areas that are fully cached are free. A shared daily Open Charge Map budget also applies; when it runs out the response is a 429.","x-cors":false,"parameters":[{"name":"minLon","in":"query","required":true,"description":"West edge.","schema":{"type":"number","minimum":-180,"maximum":180},"example":-116.2},{"name":"minLat","in":"query","required":true,"description":"South edge.","schema":{"type":"number","minimum":-90,"maximum":90},"example":35.2},{"name":"maxLon","in":"query","required":true,"description":"East edge. Must be greater than `minLon`.","schema":{"type":"number","minimum":-180,"maximum":180},"example":-116},{"name":"maxLat","in":"query","required":true,"description":"North edge. Must be greater than `minLat`.","schema":{"type":"number","minimum":-90,"maximum":90},"example":35.3},{"name":"zoom","in":"query","required":true,"description":"The map's current zoom level.","schema":{"type":"number"},"example":12}],"responses":{"200":{"description":"Chargers in the area.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaChargersResponse"},"example":{"chargers":[{"id":"ocm-97637","name":"Baker, Ca Supercharger","lat":35.26,"lon":-116.08,"maxPowerKw":250,"networkName":"Tesla (Tesla-only charging)","stallCount":40,"plugTypes":["NACS"],"address":"71808 Baker BLVD, Baker, CA","costText":"$0.26/kWh; other tariffs for older cars","source":"openchargemap"}],"cappedByResultLimit":false,"zoomTooLow":false}}}},"400":{"description":"A parameter is missing, not a number, or the box is inverted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"minLon, minLat, maxLon, maxLat and zoom are required."}}}},"429":{"description":"This caller's tile limit, or the shared daily Open Charge Map budget, has been reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Try again shortly."}}}},"502":{"description":"Open Charge Map failed or timed out.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Could not load chargers for this area."}}}}}}},"/api/chargers/amenities":{"get":{"operationId":"getChargerAmenities","summary":"Nearby station amenities","tags":["Chargers"],"description":"Amenities within 200 metres of a station from OpenRouteService POIs with one OpenStreetMap Overpass fallback, looked up after planning. An unknown status means neither source confirmed a result; an empty known list means no matching amenities were listed.","x-rate-limit":"12 per minute per IP, plus a shared 1,000-per-day amenities budget.","x-cors":true,"parameters":[{"name":"lat","in":"query","required":true,"description":"Station latitude in degrees.","schema":{"type":"number","minimum":-90,"maximum":90}},{"name":"lon","in":"query","required":true,"description":"Station longitude in degrees.","schema":{"type":"number","minimum":-180,"maximum":180}}],"responses":{"200":{"description":"Nearby amenity categories or an explicit unknown status.","content":{"application/json":{"schema":{"type":"object","required":["amenities"],"properties":{"amenities":{"type":"object","required":["status","categories"],"properties":{"status":{"type":"string","enum":["known","unknown"]},"categories":{"type":"array","items":{"type":"string","enum":["restrooms","food","lodging","shops","parking"]}}}}}}}}},"400":{"description":"Coordinates are missing or outside valid ranges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Invalid coordinates."}}}},"429":{"description":"The caller's minute budget was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Try again shortly."}}}}}}},"/api/chargers/{id}":{"get":{"operationId":"getCharger","summary":"One charger's details","tags":["Chargers"],"description":"The full record for one charger: address, network, pricing text, connectors, status, photos and user comments. Use the `id` from a plan or area response. Known details are retained in the shared server cache and dated if old; browser caching depends on amenity confidence.","x-rate-limit":"30 per minute and 150 per day per IP, counted only for an upstream Open Charge Map call. A shared 600-per-day budget also applies; cached results cost neither budget.","x-cors":true,"parameters":[{"name":"id","in":"path","required":true,"description":"A charger id as returned by the other endpoints, `ocm-` followed by digits.","schema":{"type":"string"},"example":"ocm-97637"}],"responses":{"200":{"description":"The charger.","headers":{"Cache-Control":{"description":"Known amenities: public, max-age=3600, stale-while-revalidate=21600. Unknown amenities: no-store.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargerDetailResponse"},"example":{"charger":{"id":"ocm-97637","name":"Baker, Ca Supercharger","lat":35.262655,"lon":-116.08074,"networkName":"Tesla (Tesla-only charging)","address":"71808 Baker BLVD, Baker, CA, 92309-0000","usageType":"Public","usageCost":"$0.26/kWh; other tariffs for older cars","statusTitle":"Operational","isOperational":true,"dateLastVerified":"2024-06-06T12:05:00Z","detailFetchedAt":"2026-11-30T12:00:00Z","stallCount":40,"connections":[{"title":"NACS / Tesla Supercharger","plugType":"NACS","powerKw":250,"quantity":24,"currentType":"DC","status":"Operational"}],"photos":[],"comments":[],"sourceUrl":"https://openchargemap.org/site/poi/details/97637"}}}}},"202":{"description":"Full details did not arrive within five seconds; the lookup continues in the background.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Full charger details are still loading. Try again shortly."}}}},"400":{"description":"The id is not an `ocm-<digits>` id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Unknown charger id."}}}},"404":{"description":"Open Charge Map has no charger with this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Charger not found."}}}},"429":{"description":"This caller's limit, or the shared daily Open Charge Map budget, has been reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Try again shortly."}}}},"503":{"description":"Open Charge Map is temporarily unavailable and no known detail was cached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Full charger details are temporarily unavailable."}}}}}}},"/api/health":{"get":{"operationId":"getHealth","summary":"Health check","tags":["Operations"],"description":"Confirms the app is up and its database answers. Calls no outside provider, so it is cheap enough to poll; the scheduled uptime check uses it every 15 minutes.","x-rate-limit":"None.","x-cors":false,"responses":{"200":{"description":"The app and its database are up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"},"example":{"ok":true}}}},"503":{"description":"The database did not answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"},"example":{"ok":false}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"What went wrong, safe to show to a person."}}},"Health":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"}}},"PlanRequest":{"type":"object","required":["originQuery","destinationQuery","vehicleModelId","startSoCPercent","minSoCAtChargerPercent","minSoCAtDestinationPercent"],"properties":{"originQuery":{"type":"string","description":"Where the trip starts: an address or place name."},"destinationQuery":{"type":"string","description":"Where the trip ends."},"vehicleModelId":{"type":"string","description":"Which car, from the built-in catalogue.","enum":["tesla:model3:2024:lfp:rwd","tesla:model3:2024:lr:awd","tesla:modely:2024:lr:awd","tesla:models:2024:lr","tesla:modelx:2024:lr-awd","tesla:cybertruck:2024:awd","ford:mache:2023:premium-er:rwd","ford:f150lightning:2023:er","chevrolet:equinoxev:2024:2lt:fwd","chevrolet:blazerev:2024:2lt:awd","chevrolet:boltev:2023","hyundai:ioniq5:2024:se-lr:rwd","hyundai:ioniq6:2024:se-lr:rwd","kia:ev6:2024:lr:rwd","kia:ev9:2024:lr:rwd","kia:niroev:2024:wind:fwd","rivian:r1s:2024:dual-large","rivian:r1t:2025:dual-large","nissan:ariya:2023:venture-plus:fwd","volkswagen:id4:2023:pro:rwd","bmw:i4:2023:edrive40","bmw:ix:2024:xdrive50","chevrolet:bolteuv:2023","polestar:polestar2:2024:lr-single","audi:q4etron:2023:quattro","hyundai:konaelectric:2024","nissan:leaf:2023:sv-plus","mercedes-benz:eqs:2024:450plus:sedan","lucid:air:2024:pure:rwd","cadillac:lyriq:2024:rwd","honda:prologue:2024:ex:awd","toyota:bz4x:2024:xle:fwd","subaru:solterra:2024:premium:awd"]},"startSoCPercent":{"type":"number","description":"Battery at departure, 0-100."},"minSoCAtChargerPercent":{"type":"number","description":"Never arrive at a charger below this battery level."},"minSoCAtDestinationPercent":{"type":"number","description":"Arrive at the destination with at least this much battery."},"relativeSpeedPercent":{"type":"number","default":100,"description":"Drive faster or slower than the speed limit, as a percentage of it."},"outsideTempC":{"type":"number","description":"Outside temperature in Celsius. Defaults to a seasonal estimate."},"useWeatherForecast":{"type":"boolean","default":false,"description":"Use forecast temperature along the route instead of `outsideTempC`. A dated departure enables this automatically."},"departureAt":{"type":"string","description":"Departure date and clock time with an explicit UTC offset. Forecast samples are taken at approximate drive-time arrival along the route; unavailable portions use the manual or seasonal temperature."},"ephemeralPlan":{"type":"boolean","default":false,"description":"Skip route-cache reads and writes for this request, including its coordinates."},"batteryHealthPercent":{"type":"number","default":100,"description":"Usable capacity as a percentage of new."},"realConsumptionWhPerKm":{"type":"number","description":"The driver's own measured consumption, overriding the model's."},"maxChargeLimitPercent":{"type":"number","minimum":1,"maximum":100,"default":100,"description":"Never charge above this battery level at a stop."},"chargerFilters":{"$ref":"#/components/schemas/ChargerFilters"},"avoidTollways":{"type":"boolean","default":false},"avoidHighways":{"type":"boolean","default":false},"avoidFerries":{"type":"boolean","default":false},"avoidBorders":{"type":"boolean","default":false},"waypoints":{"type":"array","maxItems":5,"description":"Up to 5 stops between origin and destination, in order.","items":{"$ref":"#/components/schemas/Waypoint"}},"includeRoundTrip":{"type":"boolean","default":false,"description":"Also check whether the driver can get home from the destination without charging there first, using the return leg's own route, elevation and available forecast weather. Adds one more routing lookup."},"excludedChargerIds":{"type":"array","maxItems":20,"description":"Charger ids the driver explicitly replaced; the optimizer will not select them again.","items":{"type":"string"}}}},"ChargerFilters":{"type":"object","description":"Which chargers the planner may use.","properties":{"preferredNetworks":{"type":"array","maxItems":50,"items":{"type":"string"},"description":"Network names, as in a charger's `networkName`."},"networkFilterMode":{"type":"string","enum":["include","exclude"],"description":"Use only `preferredNetworks`, or avoid them."},"minStallCount":{"type":"number","minimum":0},"minChargerPowerKw":{"type":"number","minimum":0}}},"Waypoint":{"type":"object","description":"Give either `query` (any address) or `pinnedCharger` (a charger to stop at).","properties":{"query":{"type":"string","description":"An address or place name."},"pinnedCharger":{"$ref":"#/components/schemas/Charger"},"targetSoCPercent":{"type":"number","default":100,"description":"Charge up to this level at a pinned charger."},"dwellMinutes":{"type":"number","description":"Time spent at an address stop, added to the trip time."}}},"GeocodedPlace":{"type":"object","required":["lat","lon","displayName"],"properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"displayName":{"type":"string"}}},"Route":{"type":"object","required":["coordinates","edges","totalDistanceKm","totalDurationHours","elevationAvailable","usingFallbackRouting","elevations"],"properties":{"coordinates":{"type":"array","description":"The route line as [lon, lat] pairs.","items":{"type":"array","items":{"type":"number"}}},"edges":{"type":"array","description":"One entry per pair of consecutive coordinates.","items":{"type":"object","properties":{"distanceKm":{"type":"number"},"durationHours":{"type":"number"},"elevationGainM":{"type":"number"},"elevationLossM":{"type":"number"},"cumulativeDistanceKm":{"type":"number"}}}},"totalDistanceKm":{"type":"number"},"totalDurationHours":{"type":"number","description":"Driving time, without charging."},"elevationAvailable":{"type":"boolean","description":"False when every elevation provider failed and the plan assumed flat ground."},"usingFallbackRouting":{"type":"boolean","description":"True when the backup routing provider was used."},"elevations":{"type":"array","description":"Metres, one per coordinate.","items":{"type":"number"}}}},"Charger":{"type":"object","required":["id","name","lat","lon","maxPowerKw"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"distanceAlongRouteKm":{"type":"number"},"maxPowerKw":{"type":"number","minimum":0},"networkName":{"type":"string"},"address":{"type":"string"},"hours":{"type":"string"},"priceText":{"type":"string"},"lastConfirmed":{"type":"string"},"sources":{"type":"array","items":{"type":"string","enum":["openchargemap","afdc"]}},"fieldSources":{"type":"object","additionalProperties":{"type":"string","enum":["openchargemap","afdc","mixed"]}},"stallCount":{"type":["integer","null"]},"connections":{"type":"array","items":{"type":"object","properties":{"plugType":{"$ref":"#/components/schemas/PlugType"},"powerKw":{"type":"number"}}}},"source":{"type":"string","enum":["openchargemap","afdc","mock"]}}},"PlugType":{"type":"string","enum":["CCS","NACS","CHAdeMO"]},"ChargingStop":{"type":"object","properties":{"chargerId":{"type":"string"},"chargerName":{"type":"string"},"plugType":{"$ref":"#/components/schemas/PlugType"},"distanceAlongRouteKm":{"type":"number"},"arrivalSoCPercent":{"type":"number"},"departureSoCPercent":{"type":"number"},"chargeDurationMinutes":{"type":"number"},"chargingSessionMinutes":{"type":"number","description":"Actual plugged-in minutes; chargeDurationMinutes may also include stop overhead."},"arrivalTripTimeHours":{"type":"number","description":"Elapsed trip time on arrival here."}}},"TripPlan":{"type":"object","required":["objective","feasible","stops","waypoints","totalDriveTimeHours","totalChargeTimeHours","totalTripTimeHours","finalArrivalSoCPercent"],"properties":{"objective":{"type":"string","enum":["optimal","fewer","fewest"]},"feasible":{"type":"boolean","description":"False when no plan meets the battery limits; see `warning`."},"stops":{"type":"array","description":"Charging stops, in order.","items":{"$ref":"#/components/schemas/ChargingStop"}},"waypoints":{"type":"array","description":"Where the trip passes each address waypoint.","items":{"type":"object","properties":{"distanceAlongRouteKm":{"type":"number"},"dwellMinutes":{"type":"number"},"arrivalTripTimeHours":{"type":"number"},"socPercent":{"type":"number"}}}},"totalDriveTimeHours":{"type":"number"},"totalChargeTimeHours":{"type":"number"},"totalTripTimeHours":{"type":"number"},"finalArrivalSoCPercent":{"type":"number"},"totalDwellTimeHours":{"type":"number"},"speedAdjustment":{"type":"object","description":"Present when driving slower would make the trip possible.","properties":{"suggestedRelativeSpeedPercent":{"type":"number"},"message":{"type":"string"}}},"warning":{"type":"object","properties":{"reason":{"type":"string"},"shortfallPercent":{"type":"number"}}}}},"PlanResponse":{"type":"object","required":["origin","destination","waypoints","route","chargers","plan"],"properties":{"origin":{"$ref":"#/components/schemas/GeocodedPlace"},"destination":{"$ref":"#/components/schemas/GeocodedPlace"},"waypoints":{"type":"array","description":"Where each requested waypoint geocoded to.","items":{"$ref":"#/components/schemas/GeocodedPlace"}},"route":{"$ref":"#/components/schemas/Route"},"chargers":{"type":"array","description":"Every charger found along the route, before plug filtering.","items":{"$ref":"#/components/schemas/Charger"}},"plan":{"type":"object","description":"The three plans, one per objective.","required":["optimal","fewer","fewest"],"properties":{"optimal":{"$ref":"#/components/schemas/TripPlan"},"fewer":{"$ref":"#/components/schemas/TripPlan"},"fewest":{"$ref":"#/components/schemas/TripPlan"}}},"batteryProfiles":{"type":"object","description":"Battery level along the route for each plan, for a chart.","required":["optimal","fewer","fewest"],"properties":{"optimal":{"type":"array","items":{"type":"object","properties":{"cumulativeDistanceKm":{"type":"number"},"socPercent":{"type":"number"}}}},"fewer":{"type":"array","items":{"type":"object","properties":{"cumulativeDistanceKm":{"type":"number"},"socPercent":{"type":"number"}}}},"fewest":{"type":"array","items":{"type":"object","properties":{"cumulativeDistanceKm":{"type":"number"},"socPercent":{"type":"number"}}}}}},"steepGradientSegment":{"type":["object","null"],"description":"The longest steep climb on the route, if any.","properties":{"fromKm":{"type":"number"},"toKm":{"type":"number"},"avgGradePercent":{"type":"number"},"extraConsumptionPercent":{"type":"number"}}},"legElevationEffects":{"type":"object","description":"Climb and descent per leg between stops, for each plan.","required":["optimal","fewer","fewest"],"properties":{"optimal":{"type":"array","items":{"type":"object","properties":{"fromKm":{"type":"number"},"toKm":{"type":"number"},"elevationGainM":{"type":"number"},"elevationLossM":{"type":"number"},"extraConsumptionPercent":{"type":"number"}}}},"fewer":{"type":"array","items":{"type":"object","properties":{"fromKm":{"type":"number"},"toKm":{"type":"number"},"elevationGainM":{"type":"number"},"elevationLossM":{"type":"number"},"extraConsumptionPercent":{"type":"number"}}}},"fewest":{"type":"array","items":{"type":"object","properties":{"fromKm":{"type":"number"},"toKm":{"type":"number"},"elevationGainM":{"type":"number"},"elevationLossM":{"type":"number"},"extraConsumptionPercent":{"type":"number"}}}}}},"weatherNote":{"type":["object","null"],"description":"The most notable forecast temperature, when `useWeatherForecast` is on.","properties":{"locationLabel":{"type":"string"},"distanceAlongRouteKm":{"type":"number"},"tempC":{"type":"number"},"extraEnergyPercent":{"type":"number"}}},"weatherCoverage":{"type":"string","enum":["complete","partial","unavailable"],"description":"Coverage of the five route weather samples. Missing forecast segments use the manual or seasonal temperature."},"batteryInsights":{"type":"object","description":"Elevation-and-battery highlights for each plan: major summits and the lowest predicted battery point.","required":["optimal","fewer","fewest"],"properties":{"optimal":{"type":"object","properties":{"summits":{"type":"array","description":"Major named-by-position summits, with predicted battery at each.","items":{"type":"object","properties":{"cumulativeDistanceKm":{"type":"number"},"elevationM":{"type":"number"},"socPercent":{"type":"number"}}}},"lowestPoint":{"type":"object","description":"The lowest predicted battery anywhere on the route, and where.","properties":{"cumulativeDistanceKm":{"type":"number"},"socPercent":{"type":"number"}}}}},"fewer":{"type":"object","properties":{"summits":{"type":"array","description":"Major named-by-position summits, with predicted battery at each.","items":{"type":"object","properties":{"cumulativeDistanceKm":{"type":"number"},"elevationM":{"type":"number"},"socPercent":{"type":"number"}}}},"lowestPoint":{"type":"object","description":"The lowest predicted battery anywhere on the route, and where.","properties":{"cumulativeDistanceKm":{"type":"number"},"socPercent":{"type":"number"}}}}},"fewest":{"type":"object","properties":{"summits":{"type":"array","description":"Major named-by-position summits, with predicted battery at each.","items":{"type":"object","properties":{"cumulativeDistanceKm":{"type":"number"},"elevationM":{"type":"number"},"socPercent":{"type":"number"}}}},"lowestPoint":{"type":"object","description":"The lowest predicted battery anywhere on the route, and where.","properties":{"cumulativeDistanceKm":{"type":"number"},"socPercent":{"type":"number"}}}}}}},"regenSummary":{"type":"object","description":"Route-wide climb/regen energy effect (one value, shared across every plan - it depends only on the route and vehicle).","properties":{"totalClimbWh":{"type":"number"},"totalRegenRecoveredWh":{"type":"number"},"netElevationWh":{"type":"number","description":"Positive: terrain cost energy overall. Negative: net descent saved energy."}}},"reserveTradeoff":{"type":["object","null"],"description":"A third trade-off beside stop count: the `optimal` plan re-run with a higher destination reserve, and the actual difference in time, stops and arrival battery.","properties":{"moreReservePlan":{"$ref":"#/components/schemas/TripPlan"},"comparison":{"type":"object","properties":{"extraTimeMinutes":{"type":"number"},"extraStops":{"type":"integer"},"extraArrivalSoCPercent":{"type":"number"},"identical":{"type":"boolean","description":"True when the higher-reserve plan changes nothing."}}}}},"roundTrip":{"type":["object","null"],"description":"Present only when the request set `includeRoundTrip`.","properties":{"feasibleWithoutCharging":{"type":"boolean"},"arrivalSoCPercent":{"type":"number"},"lowestSoCPercent":{"type":"number"},"requiredDepartureSoCPercent":{"type":"number"},"possibleWithFullCharge":{"type":"boolean"},"additionalChargeNeededPercent":{"type":"number"}}},"roundTrips":{"type":"object","description":"Return-route battery checks for each outbound objective, using that objective's arrival battery. roundTrip is the optimal check for compatibility.","properties":{"optimal":{"type":"object"},"fewer":{"type":"object"},"fewest":{"type":"object"}}},"roundTripStatus":{"type":"string","enum":["available","unavailable","not-applicable"],"description":"Present when a round-trip check was requested. The check may be unavailable even when the outbound plan succeeds."},"roundTripWeatherCoverage":{"type":"string","enum":["complete","partial","unavailable"],"description":"Weather coverage on the independently routed return leg, when weather-aware planning is enabled."},"roundTripElevationAvailable":{"type":"boolean","description":"Whether elevation was available on the independently routed return leg."},"planningOutsideTempC":{"type":"number","description":"The temperature actually used by the energy model, including forecast mode."}}},"PlanStreamEvent":{"type":"object","required":["stage"],"description":"One line of the NDJSON stream. `route` carries origin, destination, waypoints and route; `chargers` carries chargers; `plan` carries the remaining fields of the combined response; `error` carries error.","properties":{"stage":{"type":"string","enum":["route","chargers","plan","error"]}},"additionalProperties":true},"AreaCharger":{"type":"object","required":["id","name","lat","lon","maxPowerKw","plugTypes","source"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"maxPowerKw":{"type":"number"},"networkName":{"type":"string"},"stallCount":{"type":["integer","null"]},"plugTypes":{"type":"array","items":{"$ref":"#/components/schemas/PlugType"}},"address":{"type":"string"},"costText":{"type":"string"},"source":{"type":"string","enum":["openchargemap"]}}},"AreaChargersResponse":{"type":"object","required":["chargers","cappedByResultLimit","zoomTooLow"],"properties":{"chargers":{"type":"array","items":{"$ref":"#/components/schemas/AreaCharger"}},"cappedByResultLimit":{"type":"boolean"},"zoomTooLow":{"type":"boolean"}}},"ChargerDetailResponse":{"type":"object","required":["charger"],"properties":{"charger":{"$ref":"#/components/schemas/ChargerDetail"}}},"ChargerDetail":{"type":"object","required":["id","name","lat","lon","connections","photos","comments","sourceUrl"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"networkName":{"type":"string"},"networkUrl":{"type":"string"},"address":{"type":"string"},"phone":{"type":"string"},"usageType":{"type":"string"},"usageCost":{"type":"string"},"accessComments":{"type":"string","description":"Free text; where Open Charge Map records opening hours."},"generalComments":{"type":"string"},"statusTitle":{"type":"string"},"isOperational":{"type":"boolean"},"dateLastVerified":{"type":"string"},"detailFetchedAt":{"type":"string","description":"When this full Open Charge Map record was last fetched."},"dateLastStatusUpdate":{"type":"string"},"stallCount":{"type":"integer"},"connections":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"plugType":{"$ref":"#/components/schemas/PlugType"},"powerKw":{"type":"number"},"quantity":{"type":"integer"},"currentType":{"type":"string"},"status":{"type":"string"}}}},"photos":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"thumbnailUrl":{"type":"string"},"caption":{"type":"string"},"credit":{"type":"string"},"dateCreated":{"type":"string"}}}},"comments":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"rating":{"type":"integer","minimum":1,"maximum":5},"userName":{"type":"string"},"commentType":{"type":"string"},"dateCreated":{"type":"string"}}}},"sourceUrl":{"type":"string","description":"The charger's page on openchargemap.org."},"amenities":{"type":"object","description":"Nearby amenities from OpenRouteService POIs, OpenStreetMap (Overpass), or explicit Open Charge Map notes. status is \"unknown\" when the lookup wasn't attempted or failed - never treat that as \"none nearby\".","required":["status","categories"],"properties":{"status":{"type":"string","enum":["known","unknown"]},"categories":{"type":"array","items":{"type":"string","enum":["restrooms","food","lodging","shops","parking"]}}}}}}}}}