curl --request GET \
--url https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyGet charge schedule execution
Returns the recorded state of a previously issued charge schedule create or delete request, identified by its execution id. The response includes data.attributes.action (“create” or “delete”) so callers can distinguish which operation the record describes. The execution of any operation issued by the calling application can be read, regardless of the user or vehicle it was issued for. Every charge schedule response includes this endpoint’s URL in data.links.self, so follow that link to check an operation’s status, or to follow the operation named in meta.blockingOperation of an OPERATION_IN_PROGRESS error.
When a request returns 202, its Location header holds this endpoint’s URL, and its outcome is available only here. Poll this endpoint every Retry-After seconds until status.value is no longer PENDING. Every operation reaches a final status, so this loop always ends. Today that takes at most about 5 minutes from meta.executedAt, but the limit may change, so don’t rely on a fixed timeout. If meta.requestId no longer matches the one you received, the execution now describes a newer operation, and yours has finished.
A status.value of EXPIRED means the operation didn’t record a result within the time allowed, so the outcome is unknown: it may or may not have taken effect on the vehicle. It no longer blocks other requests, so you can retry it.
An execution is kept for at least 30 days after its most recent operation. After it is removed, this endpoint returns 404.
curl --request GET \
--url https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vehicle.api.smartcar.com/v3/charge-schedule-executions/{executionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyAuthorizations
Path Parameters
Response
Schedule execution response
Response to a charge schedule create or delete request. data.attributes.action identifies the operation ("create" or "delete"). data.attributes.scheduleId is the id of the schedule: for a create, it appears once the schedule has been created successfully; for a delete, it is the id from the request path. data.links.self contains the URL of this execution resource.
Was this page helpful?

