PUT
/
vehicles
/
{id}
/
{make}
/
charge
/
schedule_by_location
curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/schedule_by_location?longitude=2.3522&latitude=48.8566" \
    -H "Authorization: Bearer {token}" \
    -X "PUT" \
    -H "Content-Type: application/json" \
    -d '{chargingLocation:{"chargeLimit": 0.9, "chargingWindows": {"weekday": [{"start": "09:00", "end": "17:00"}], "weekend": [{"start": "09:00", "end": "17:00"}]}}}'
{
  "message": "Successfully sent request to vehicle",
  "status": "success"
}
This endpoint is currently available for ford and lincoln

Permission

control_charge

Request

In order to set a schedule, you must use a location from the GET Charge Schedule by Location endpoint. If the location you want to manage is not in the response, the vehicle owner has not charged at that location within the last 90 days and it has been removed from their app’s saved charging location list.
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.
Query
longitude
number
required
The longitude of a charging location from GET Charge Schedule by Location
latitude
number
required
The latitude of a charging location from GET Charge Schedule by Location
Body
chargingLocation
object
required
curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/schedule_by_location?longitude=2.3522&latitude=48.8566" \
    -H "Authorization: Bearer {token}" \
    -X "PUT" \
    -H "Content-Type: application/json" \
    -d '{chargingLocation:{"chargeLimit": 0.9, "chargingWindows": {"weekday": [{"start": "09:00", "end": "17:00"}], "weekend": [{"start": "09:00", "end": "17:00"}]}}}'

Response

message
string
If the request is successful, Smartcar will return a message.
status
string
If the request is successful, Smartcar will return success.
{
  "message": "Successfully sent request to vehicle",
  "status": "success"
}

Example Request Bodies