Quote Charge Session

POST/v1/sessions/quote

Read-only — moves no money. Returns the price of a full charge for the vehicle currently plugged into the given charger/connector, and the driver's current sub-wallet balance, so your app can decide whether to offer a full or reduced charge.

Auth

Authorization: Bearer <driver token>, minted via Mint Driver Token.

Request parameters

FieldTypeRequiredDescription
chargerIdstringYesThe LotGrids charger the driver is at — this is exactly what the charger's QR code encodes.
connectorIdstringYesWhich connector/nozzle on that charger the vehicle is plugged into. The QR code only encodes chargerId, so call Get Charger Connectors first and let the driver pick from the result.
driverEmailstringYesMust match the email your driver token was minted for.

Example request

curl https://api.lotgrids.com/v1/sessions/quote \
  -X POST \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "chargerId": "chg_04af1c",
    "connectorId": "conn_02",
    "driverEmail": "adaeze.driver@fleetco.com"
  }'

Example success response

200 OK
{
  "fleetDriver": true,
  "quotedAmount": 18500,
  "kwhNeeded": 37,
  "pricePerKwh": 500,
  "currency": "NGN",
  "subWalletBalance": 12000,
  "socPercent": 41,
  "vehicleModel": "Nissan Leaf (40 kWh)"
}

In this example the driver's balance (₦12,000) is less than the full-charge quote (₦18,500) — your app should offer the driver the option to charge only as much as ₦12,000 covers, then send that reduced amount to Start Charge Session.

Manual chargers

Some chargers have no hardware telemetry to price a quote from — an on-site operator sends one manually instead. For these, this endpoint returns a different shape with no price yet:

200 OK
{
  "fleetDriver": true,
  "awaitingOperatorQuote": true,
  "sessionId": "sess_9f3ac2e1"
}

A session has already been created (pending_quote) so the operator can find and price it. Wait for a charge.quoted webhook (see Webhooks) — it carries the price and the same sessionId — then call Confirm Session Payment, not Start Charge Session, which is automated-chargers-only.

Error responses

401 token_expired
{ "error": { "code": "token_expired", "message": "Driver token expired." } }
403 token_scope_mismatch
{ "error": { "code": "token_scope_mismatch", "message": "This token cannot act on a different driver's wallet." } }
404 charger_not_found
{ "error": { "code": "charger_not_found", "message": "No charger chg_04af1c." } }
404 connector_not_found
{ "error": { "code": "connector_not_found", "message": "No connector conn_02 on charger chg_04af1c." } }
409 connector_busy
{ "error": { "code": "connector_busy", "message": "This connector is busy right now — try the other one or again shortly." } }