Sessions
Start session
Starts a charging session remotely. The request validates the station, charger, connector, and connector availability. If the supplied customerId does not exist, the API creates a minimal customer record before sending a start command to the charger. Optional auth_reference lets callers correlate this request with the session created later by the charger. A 200 response means the command was accepted for delivery; it does not confirm that charging has begun.
POST
/
sessions
/
start
Start session
curl --request POST \
--url https://{host}/v1/sessions/start \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"stationId": "<string>",
"chargerId": "<string>",
"connectorId": 2,
"customerId": "<string>",
"auth_reference": "<string>"
}
'import requests
url = "https://{host}/v1/sessions/start"
payload = {
"stationId": "<string>",
"chargerId": "<string>",
"connectorId": 2,
"customerId": "<string>",
"auth_reference": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stationId: '<string>',
chargerId: '<string>',
connectorId: 2,
customerId: '<string>',
auth_reference: '<string>'
})
};
fetch('https://{host}/v1/sessions/start', 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://{host}/v1/sessions/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'stationId' => '<string>',
'chargerId' => '<string>',
'connectorId' => 2,
'customerId' => '<string>',
'auth_reference' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/v1/sessions/start"
payload := strings.NewReader("{\n \"stationId\": \"<string>\",\n \"chargerId\": \"<string>\",\n \"connectorId\": 2,\n \"customerId\": \"<string>\",\n \"auth_reference\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/v1/sessions/start")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"stationId\": \"<string>\",\n \"chargerId\": \"<string>\",\n \"connectorId\": 2,\n \"customerId\": \"<string>\",\n \"auth_reference\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/sessions/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"stationId\": \"<string>\",\n \"chargerId\": \"<string>\",\n \"connectorId\": 2,\n \"customerId\": \"<string>\",\n \"auth_reference\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Body
application/json
Was this page helpful?
Start session
curl --request POST \
--url https://{host}/v1/sessions/start \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"stationId": "<string>",
"chargerId": "<string>",
"connectorId": 2,
"customerId": "<string>",
"auth_reference": "<string>"
}
'import requests
url = "https://{host}/v1/sessions/start"
payload = {
"stationId": "<string>",
"chargerId": "<string>",
"connectorId": 2,
"customerId": "<string>",
"auth_reference": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stationId: '<string>',
chargerId: '<string>',
connectorId: 2,
customerId: '<string>',
auth_reference: '<string>'
})
};
fetch('https://{host}/v1/sessions/start', 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://{host}/v1/sessions/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'stationId' => '<string>',
'chargerId' => '<string>',
'connectorId' => 2,
'customerId' => '<string>',
'auth_reference' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/v1/sessions/start"
payload := strings.NewReader("{\n \"stationId\": \"<string>\",\n \"chargerId\": \"<string>\",\n \"connectorId\": 2,\n \"customerId\": \"<string>\",\n \"auth_reference\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/v1/sessions/start")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"stationId\": \"<string>\",\n \"chargerId\": \"<string>\",\n \"connectorId\": 2,\n \"customerId\": \"<string>\",\n \"auth_reference\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/sessions/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"stationId\": \"<string>\",\n \"chargerId\": \"<string>\",\n \"connectorId\": 2,\n \"customerId\": \"<string>\",\n \"auth_reference\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}
.png?fit=max&auto=format&n=Q9Mj_7gZzDeQpRZZ&q=85&s=81619203ea2696cfd7251205cfbc5afc)