Preview a journey plan before running it
curl --request POST \
--url https://chargerdojo.com/api/v1/testing/journeys/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schemaVersion": 1,
"targetId": "<string>",
"topology": {
"kind": "direct",
"profile": "core-ocpi"
},
"clock": {
"durationSeconds": 86430,
"accelerationFactor": 1800
},
"session": {
"cadenceSeconds": 43200,
"updates": [],
"jitterSeconds": 0
},
"completion": {
"cdrDelaySeconds": 0
},
"seed": "<string>"
}
'import requests
url = "https://chargerdojo.com/api/v1/testing/journeys/preview"
payload = {
"schemaVersion": 1,
"targetId": "<string>",
"topology": {
"kind": "direct",
"profile": "core-ocpi"
},
"clock": {
"durationSeconds": 86430,
"accelerationFactor": 1800
},
"session": {
"cadenceSeconds": 43200,
"updates": [],
"jitterSeconds": 0
},
"completion": { "cdrDelaySeconds": 0 },
"seed": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schemaVersion: 1,
targetId: '<string>',
topology: {kind: 'direct', profile: 'core-ocpi'},
clock: {durationSeconds: 86430, accelerationFactor: 1800},
session: {cadenceSeconds: 43200, updates: [], jitterSeconds: 0},
completion: {cdrDelaySeconds: 0},
seed: '<string>'
})
};
fetch('https://chargerdojo.com/api/v1/testing/journeys/preview', 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://chargerdojo.com/api/v1/testing/journeys/preview",
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([
'schemaVersion' => 1,
'targetId' => '<string>',
'topology' => [
'kind' => 'direct',
'profile' => 'core-ocpi'
],
'clock' => [
'durationSeconds' => 86430,
'accelerationFactor' => 1800
],
'session' => [
'cadenceSeconds' => 43200,
'updates' => [
],
'jitterSeconds' => 0
],
'completion' => [
'cdrDelaySeconds' => 0
],
'seed' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://chargerdojo.com/api/v1/testing/journeys/preview"
payload := strings.NewReader("{\n \"schemaVersion\": 1,\n \"targetId\": \"<string>\",\n \"topology\": {\n \"kind\": \"direct\",\n \"profile\": \"core-ocpi\"\n },\n \"clock\": {\n \"durationSeconds\": 86430,\n \"accelerationFactor\": 1800\n },\n \"session\": {\n \"cadenceSeconds\": 43200,\n \"updates\": [],\n \"jitterSeconds\": 0\n },\n \"completion\": {\n \"cdrDelaySeconds\": 0\n },\n \"seed\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://chargerdojo.com/api/v1/testing/journeys/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schemaVersion\": 1,\n \"targetId\": \"<string>\",\n \"topology\": {\n \"kind\": \"direct\",\n \"profile\": \"core-ocpi\"\n },\n \"clock\": {\n \"durationSeconds\": 86430,\n \"accelerationFactor\": 1800\n },\n \"session\": {\n \"cadenceSeconds\": 43200,\n \"updates\": [],\n \"jitterSeconds\": 0\n },\n \"completion\": {\n \"cdrDelaySeconds\": 0\n },\n \"seed\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chargerdojo.com/api/v1/testing/journeys/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schemaVersion\": 1,\n \"targetId\": \"<string>\",\n \"topology\": {\n \"kind\": \"direct\",\n \"profile\": \"core-ocpi\"\n },\n \"clock\": {\n \"durationSeconds\": 86430,\n \"accelerationFactor\": 1800\n },\n \"session\": {\n \"cadenceSeconds\": 43200,\n \"updates\": [],\n \"jitterSeconds\": 0\n },\n \"completion\": {\n \"cdrDelaySeconds\": 0\n },\n \"seed\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"planId": "<string>",
"planHash": "<string>",
"runAllowed": true,
"plan": {},
"expiresInSeconds": 123
},
"meta": {
"limit": 123,
"skip": 123,
"nextCursor": "<string>"
}
}{
"success": false,
"message": "<string>",
"status": "error",
"code": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"capability": "external-endpoints",
"limit": {
"id": "connections",
"used": 123,
"cap": 123
}
}{
"success": false,
"message": "<string>",
"status": "error",
"code": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"capability": "external-endpoints",
"limit": {
"id": "connections",
"used": 123,
"cap": 123
}
}{
"success": false,
"message": "<string>",
"status": "error",
"code": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"capability": "external-endpoints",
"limit": {
"id": "connections",
"used": 123,
"cap": 123
}
}{
"success": false,
"message": "<string>",
"status": "error",
"code": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"capability": "external-endpoints",
"limit": {
"id": "connections",
"used": 123,
"cap": 123
}
}Journeys
Preview a journey plan
Compile a journey into a runnable plan and save it without running it, so you can read the stages and the preflight before anything reaches your partner.
POST
/
testing
/
journeys
/
preview
Preview a journey plan before running it
curl --request POST \
--url https://chargerdojo.com/api/v1/testing/journeys/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schemaVersion": 1,
"targetId": "<string>",
"topology": {
"kind": "direct",
"profile": "core-ocpi"
},
"clock": {
"durationSeconds": 86430,
"accelerationFactor": 1800
},
"session": {
"cadenceSeconds": 43200,
"updates": [],
"jitterSeconds": 0
},
"completion": {
"cdrDelaySeconds": 0
},
"seed": "<string>"
}
'import requests
url = "https://chargerdojo.com/api/v1/testing/journeys/preview"
payload = {
"schemaVersion": 1,
"targetId": "<string>",
"topology": {
"kind": "direct",
"profile": "core-ocpi"
},
"clock": {
"durationSeconds": 86430,
"accelerationFactor": 1800
},
"session": {
"cadenceSeconds": 43200,
"updates": [],
"jitterSeconds": 0
},
"completion": { "cdrDelaySeconds": 0 },
"seed": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schemaVersion: 1,
targetId: '<string>',
topology: {kind: 'direct', profile: 'core-ocpi'},
clock: {durationSeconds: 86430, accelerationFactor: 1800},
session: {cadenceSeconds: 43200, updates: [], jitterSeconds: 0},
completion: {cdrDelaySeconds: 0},
seed: '<string>'
})
};
fetch('https://chargerdojo.com/api/v1/testing/journeys/preview', 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://chargerdojo.com/api/v1/testing/journeys/preview",
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([
'schemaVersion' => 1,
'targetId' => '<string>',
'topology' => [
'kind' => 'direct',
'profile' => 'core-ocpi'
],
'clock' => [
'durationSeconds' => 86430,
'accelerationFactor' => 1800
],
'session' => [
'cadenceSeconds' => 43200,
'updates' => [
],
'jitterSeconds' => 0
],
'completion' => [
'cdrDelaySeconds' => 0
],
'seed' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://chargerdojo.com/api/v1/testing/journeys/preview"
payload := strings.NewReader("{\n \"schemaVersion\": 1,\n \"targetId\": \"<string>\",\n \"topology\": {\n \"kind\": \"direct\",\n \"profile\": \"core-ocpi\"\n },\n \"clock\": {\n \"durationSeconds\": 86430,\n \"accelerationFactor\": 1800\n },\n \"session\": {\n \"cadenceSeconds\": 43200,\n \"updates\": [],\n \"jitterSeconds\": 0\n },\n \"completion\": {\n \"cdrDelaySeconds\": 0\n },\n \"seed\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://chargerdojo.com/api/v1/testing/journeys/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schemaVersion\": 1,\n \"targetId\": \"<string>\",\n \"topology\": {\n \"kind\": \"direct\",\n \"profile\": \"core-ocpi\"\n },\n \"clock\": {\n \"durationSeconds\": 86430,\n \"accelerationFactor\": 1800\n },\n \"session\": {\n \"cadenceSeconds\": 43200,\n \"updates\": [],\n \"jitterSeconds\": 0\n },\n \"completion\": {\n \"cdrDelaySeconds\": 0\n },\n \"seed\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chargerdojo.com/api/v1/testing/journeys/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schemaVersion\": 1,\n \"targetId\": \"<string>\",\n \"topology\": {\n \"kind\": \"direct\",\n \"profile\": \"core-ocpi\"\n },\n \"clock\": {\n \"durationSeconds\": 86430,\n \"accelerationFactor\": 1800\n },\n \"session\": {\n \"cadenceSeconds\": 43200,\n \"updates\": [],\n \"jitterSeconds\": 0\n },\n \"completion\": {\n \"cdrDelaySeconds\": 0\n },\n \"seed\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"planId": "<string>",
"planHash": "<string>",
"runAllowed": true,
"plan": {},
"expiresInSeconds": 123
},
"meta": {
"limit": 123,
"skip": 123,
"nextCursor": "<string>"
}
}{
"success": false,
"message": "<string>",
"status": "error",
"code": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"capability": "external-endpoints",
"limit": {
"id": "connections",
"used": 123,
"cap": 123
}
}{
"success": false,
"message": "<string>",
"status": "error",
"code": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"capability": "external-endpoints",
"limit": {
"id": "connections",
"used": 123,
"cap": 123
}
}{
"success": false,
"message": "<string>",
"status": "error",
"code": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"capability": "external-endpoints",
"limit": {
"id": "connections",
"used": 123,
"cap": 123
}
}{
"success": false,
"message": "<string>",
"status": "error",
"code": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"capability": "external-endpoints",
"limit": {
"id": "connections",
"used": 123,
"cap": 123
}
}Authorizations
A cdojo_... API key created in the app under Settings.
Body
application/json
Available options:
1 Available options:
first-successful-charge, rough-session, charger-reset, partner-connection, catalogue-trust, remote-start-stop, live-price-parking, reservation, cdr-desk, offline-catch-up, hub-routed-charge, book-arrive-charge, direct-terminal-payment, smart-charging-control, hub-connection-status, invalid-charging-data, custom Required string length:
1 - 64Available options:
CPO, EMSP, PTP, OTHER, SCSP Available options:
core-charging, foundation, catalogue, commands, billing, recovery, hub, booking, direct-payment, charging-profiles, hub-client-info, negative Show child attributes
Show child attributes
Available options:
2.1.1, 2.2, 2.2.1, 2.3.0 Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Required string length:
1 - 128