Pular para o conteúdo principal

Sessions

VoltBras is the Sender of Sessions. You see only the charges your platform started with START_SESSION.

Life of a Session​

The Session's id is created when VoltBras accepts the START_SESSION, and it appears when charging begins. A start that never reaches charging produces no Session, and VoltBras does not use PENDING.

statusWhen
ACTIVEFrom the start of charging until the charge ends, including time plugged in after charging.
COMPLETEDThe charge ended with at least 0.1 kWh. A CDR follows.
INVALIDThe charge ended with less than 0.1 kWh, or was invalidated. No total_cost, and no CDR.

COMPLETED and INVALID are final: the Session does not change after them.

  • auth_method is COMMAND, and cdr_token and authorization_reference come from your command.
  • total_cost and charging_periods use the Tariff fixed when the command was accepted.
  • Each price component is rounded to the currency's minor unit, and total_cost is the sum of the rounded components.

A full charge​

Without Receiver endpoints, you get the same objects with GET /2.2.1/sessions and GET /2.2.1/cdrs.

Examples​

These two examples show the same charge, with a Tariff of 2.50 per session, 1.99 per kWh, and 30.00 per hour after charging stops. An ACTIVE Session:

{
"country_code": "BR",
"party_id": "EXA",
"id": "8c2f4b6e-1d3a-4f57-a9b0-6e7d5c4b3a21",
"start_date_time": "2026-11-10T14:00:30.000Z",
"kwh": 4,
"cdr_token": {
"country_code": "NL",
"party_id": "EMS",
"uid": "b5e1f0c2-44aa-4c11-9d7e-1f2a3b4c5d6e",
"type": "APP_USER",
"contract_id": "NL-EMS-C12345678-X"
},
"auth_method": "COMMAND",
"authorization_reference": "auth-20261110-0001",
"location_id": "3f1c9a52-7b1e-4d0a-9c35-2a6e8f10b7d4",
"evse_uid": "96f9a7dc-ee9f-5f48-825e-7bfd1fa9b596",
"connector_id": "1",
"currency": "BRL",
"charging_periods": [
{
"start_date_time": "2026-11-10T14:00:30.000Z",
"dimensions": [
{
"type": "ENERGY",
"volume": 4
},
{
"type": "TIME",
"volume": 0.075
}
],
"tariff_id": "cpc-87921a519b4c7d7e2f0b6e39ba76d6c4"
}
],
"total_cost": {
"excl_vat": 10.46,
"incl_vat": 10.46
},
"status": "ACTIVE",
"last_updated": "2026-11-10T14:05:05.000Z"
}

The same Session at the end: 9.6 kWh and 3 minutes plugged in after charging. The total is 2.50 + 19.10 + 1.50.

{
"country_code": "BR",
"party_id": "EXA",
"id": "8c2f4b6e-1d3a-4f57-a9b0-6e7d5c4b3a21",
"start_date_time": "2026-11-10T14:00:30.000Z",
"end_date_time": "2026-11-10T14:15:00.000Z",
"kwh": 9.6,
"cdr_token": {
"country_code": "NL",
"party_id": "EMS",
"uid": "b5e1f0c2-44aa-4c11-9d7e-1f2a3b4c5d6e",
"type": "APP_USER",
"contract_id": "NL-EMS-C12345678-X"
},
"auth_method": "COMMAND",
"authorization_reference": "auth-20261110-0001",
"location_id": "3f1c9a52-7b1e-4d0a-9c35-2a6e8f10b7d4",
"evse_uid": "96f9a7dc-ee9f-5f48-825e-7bfd1fa9b596",
"connector_id": "1",
"currency": "BRL",
"charging_periods": [
{
"start_date_time": "2026-11-10T14:00:30.000Z",
"dimensions": [
{
"type": "ENERGY",
"volume": 4.42
},
{
"type": "TIME",
"volume": 0.0833
}
],
"tariff_id": "cpc-87921a519b4c7d7e2f0b6e39ba76d6c4"
},
{
"start_date_time": "2026-11-10T14:05:30.000Z",
"dimensions": [
{
"type": "ENERGY",
"volume": 4.13
},
{
"type": "TIME",
"volume": 0.0834
}
],
"tariff_id": "cpc-87921a519b4c7d7e2f0b6e39ba76d6c4"
},
{
"start_date_time": "2026-11-10T14:10:30.000Z",
"dimensions": [
{
"type": "ENERGY",
"volume": 1.05
},
{
"type": "TIME",
"volume": 0.025
}
],
"tariff_id": "cpc-87921a519b4c7d7e2f0b6e39ba76d6c4"
},
{
"start_date_time": "2026-11-10T14:12:00.000Z",
"dimensions": [
{
"type": "ENERGY",
"volume": 0
},
{
"type": "PARKING_TIME",
"volume": 0.05
}
],
"tariff_id": "cpc-87921a519b4c7d7e2f0b6e39ba76d6c4"
}
],
"total_cost": {
"excl_vat": 23.1,
"incl_vat": 23.1
},
"status": "COMPLETED",
"last_updated": "2026-11-10T14:15:05.000Z"
}

Pull​

GET /2.2.1/sessions lists your Sessions, 100 per page by default and at most 1000. date_from is required: without it the answer has status 2001.

Updates sent to you​

When your platform declares a sessions endpoint with the role RECEIVER, VoltBras checks for changes every 5 seconds and sends:

PUT {your sessions endpoint}/{country_code}/{party_id}/{session_id}

The body is always the whole Session. VoltBras does not send PATCH, and a send is not repeated.

Charging preferences​

Charging preferences are not supported: PUT /2.2.1/sessions/{session_id}/charging_preferences gets HTTP 404 with status 2001.