Skip to main content
POST
/
charging_sessions
Initiate a charging session
curl --request POST \
  --url https://api.chargeapi.co/v1/charging_sessions \
  --header 'Content-Type: application/json' \
  --data '{
  "charging_station": "<string>",
  "connector": "<string>",
  "driver": "<string>",
  "vehicle": "<string>",
  "payment_method": "<string>",
  "session_limit": 123
}'
{
  "id": null,
  "object": null,
  "amount_due": null,
  "amount_paid": null,
  "charging_station": null,
  "connector": null,
  "country": null,
  "created": null,
  "currency": null,
  "driver": null,
  "energy_consumed": null,
  "fleet": null,
  "payment_method": null,
  "session_ended": null,
  "session_started": null,
  "status": null,
  "updated": null,
  "vehicle": null
}

Body

application/json
charging_station
string
required

ID of the station where charging will occur.

connector
string
required

ID of the specific connector to activate.

driver
string
required

ID of the driver starting the session.

vehicle
string
required

ID of the vehicle being charged.

payment_method
string
required

ID of the payment method to authorize and bill for this session.

session_limit
integer

Optional energy limit in watt-hours to auto-stop charging when reached.

Response

Charging session successfully initiated.

id
string

Unique identifier for the charging session object.

Example:

null

object
string

String representing the object’s type. Always charging_session.

Example:

null

amount_due
integer

Total cost of the charging session, in the smallest currency unit (e.g., cents).

Example:

null

amount_paid
integer

Amount already paid for the charging session, in the smallest currency unit (e.g., cents).

Example:

null

charging_station
string

ID of the charging station where the session occurred.

Example:

null

connector
string

ID of the specific connector used during the session.

Example:

null

country
string | null

Country code (ISO 3166-1 alpha-2) where the session took place.

Example:

null

created
integer

Time when the charging session was created or initialized.

Example:

null

currency
string

ISO 4217 three-letter currency code (e.g., usd).

Example:

null

driver
string

ID of the driver who initiated the session.

Example:

null

energy_consumed
integer

Amount of energy delivered during the session, in watt-hours (Wh).

Example:

null

fleet
string

ID of the fleet the driver or session is associated with.

Example:

null

payment_method
string

ID of the payment method used to pay for the session.

Example:

null

session_ended
integer | null

Time at which the charging session ended, if completed.

Example:

null

session_started
integer

Time when the session began and charging started.

Example:

null

status
enum<string>

Current status of the session.

Available options:
active,
completed,
cancelled,
failed
Example:

null

updated
integer

Time at which the session was last updated.

Example:

null

vehicle
string

ID of the vehicle's driver who initiated the session.

Example:

null