POST
/
v1.0.0
/
users
/
{userId}
/
vehicles
/
{vehicleId}
/
commands
/
charging-schedule
Submit command for vehicle charging schedule
curl --request POST \
  --url https://api.energy-hub.io/v1.0.0/users/{userId}/vehicles/{vehicleId}/commands/charging-schedule \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "schedules": [
    {
      "type": "CHARGE",
      "stateOfChargeTarget": 80,
      "location": {
        "latitude": 50.770774,
        "longitude": -126.104965
      },
      "chargeRateMax": 12,
      "days": [
        "MONDAY"
      ],
      "start": "12:00",
      "end": "18:00"
    }
  ]
}'
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "PENDING",
"type": "CHARGING_START",
"userId": "896f9d5a-b618-48a2-98ae-957059bf1bc9",
"deviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
Charging Schedules are only supported for BMW, MINI and Tesla vehicles.

Authorizations

X-API-KEY
string
header
required

API key used for authorization and authentication.

Path Parameters

vehicleId
string<uuid>
required

Vehicle ID

Body

application/json

New schedule be to set. UTC expected.

Response

200
application/json

Successful operation

The response is of type object.