Offers

Request priced charging offers for one port and night

POST
/api/quotes

Creates the driver session cookie if absent. Each offer carries exact terms and their SHA-256 termsHash, which accept must echo.

Request Body

application/json

portId*string
Lengthlength <= 32
nightOf*string
Match^\d{4}-\d{2}-\d{2}$
plugInLocal*string

Station-local time

Match^\d{2}:\d{2}$
departLocal*string

Station-local ready-by time (next morning)

Match^\d{2}:\d{2}$
targetBatteryKWh*number

At most 2 decimals

Range0.01 <= value <= 120
spendCapCents*integer
Range100 <= value <= 50000
requiredMinSavingsCents?integer

Mandatory minimum saving versus immediate charging; accept refuses offers that save less

Range1 <= value <= 50000

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/quotes" \  -H "Content-Type: application/json" \  -d '{    "portId": "string",    "nightOf": "string",    "plugInLocal": "string",    "departLocal": "string",    "targetBatteryKWh": 0.01,    "spendCapCents": 100  }'
{  "quote": {    "quoteSetId": "string",    "stationId": "string",    "createdAtMs": 0,    "expiresAtMs": 0,    "offers": [      {        "offerId": "string",        "kind": "flex_lowest_cost",        "label": "string",        "chargeStartMs": 0,        "chargeEndMs": 0,        "listPriceCents": 0,        "priceCents": 0,        "discountCents": 0,        "energyCostCents": 0,        "operatorImprovementCents": 0,        "powerW": [          0        ],        "terms": {          "version": "string",          "quoteSetId": "string",          "offerId": "string",          "stationId": "string",          "merchantRef": "string",          "portId": "string",          "currency": "USD",          "amountCents": 0,          "listPriceCents": 0,          "targetBatteryWh": 0,          "plugInMs": 0,          "departMs": 0,          "gridStartMs": 0,          "powerW": [            0          ],          "expiresAtMs": 0        },        "termsHash": "string"      }    ],    "rejected": [      {        "kind": "string",        "reason": "string"      }    ],    "baseline": {},    "assumptions": {},    "requiredMinSavingsCents": 0  }}