POST
/
vehicles
/
{id}
/
{make}
/
charge
/
schedule
curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/schedule" \
-H "Authorization: Bearer {token}" \
-X "POST" \
-H "Content-Type: application/json" \
-d '{"type": "START_TIME", "enable": true, "time": "23:30"}'
{
  "departureTime": {
    "enabled": false,
    "time": null
  },
  "startTime": {
    "enabled": true,
    "time": "18:30"
  }
}

This endpoint is currently available for tesla

Permission

control_charge

Request

Path

id
string
required

The vehicle ID of the vehicle you are making a request to.

make
string
required

The make of the vehicle you are making a request to.

Body

type
string
required

The type of schedule you want to set.

START_TIME

When plugged in, the vehicle will delay starting a charging session until this time in HH:mm.

DEPARTURE_TIME

When plugged in, the vehicle may delay starting a charging session as long as it can reach its charge limit by this time in HH:mm.

enabled
boolean
required

Enables or disables the specified charging schedule.

time
string
required

The time for the provided schedule type in HH:mm.

curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/schedule" \
-H "Authorization: Bearer {token}" \
-X "POST" \
-H "Content-Type: application/json" \
-d '{"type": "START_TIME", "enable": true, "time": "23:30"}'

Response

departureTime
object

The departure time configuration for the charging schedule.

startTime
object

The start time configuration for the charging schedule.

{
  "departureTime": {
    "enabled": false,
    "time": null
  },
  "startTime": {
    "enabled": true,
    "time": "18:30"
  }
}