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
chargeLimit
number
required

The maximum charge limit for the vehicle at the location as a percent between 0.5 and 1.

chargingWindows
object
required

The weekday and weekend charging schedules for the vehicle at the location.

weekday
[object]
required

The charging schedule for the vehicle on weekdays (Monday - Friday).

start
string
required

The exact hour a vehicle should start charging in HH:00 e.g. 17:00.

end
string
required

The exact hour a vehicle should stop charging in HH:00 e.g. 21:00.

weekend
[object]
required

The charging schedule for the vehicle on weekends (Saturday - Sunday).

start
string
required

The exact hour a vehicle should start charging in HH:00 e.g. 17:00.

end
string
required

The exact hour a vehicle should stop charging in HH:00 e.g. 21: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.

Example Request Bodies