Retrieve a plan
curl --request GET \
--url https://app.kardinal.ai/api/v2/plans/{planId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kardinal.ai/api/v2/plans/{planId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.kardinal.ai/api/v2/plans/{planId}', 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://app.kardinal.ai/api/v2/plans/{planId}",
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://app.kardinal.ai/api/v2/plans/{planId}"
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://app.kardinal.ai/api/v2/plans/{planId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kardinal.ai/api/v2/plans/{planId}")
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_body{
"item": {
"id": "4cbd0ab8-282c-4b30-b981-29e1ed8a2016",
"agencyId": "BLD1234567_production",
"version": 1,
"status": {
"waitingRoom": {
"waitingVersion": 1,
"runningVersion": 1
},
"creation": {
"waitingVersion": 1,
"runningVersion": 1
},
"optimization": {
"waitingVersion": 1,
"runningVersion": 1
}
},
"tz": "Europe/Paris",
"resources": [
{
"id": "resource1",
"vehicleProfile": {
"type": "fly",
"kmph": 20
},
"workingTimeWindow": {
"begin": "2026-03-21T08:00:00+01:00",
"end": "2026-03-21T23:00:00+01:00"
}
}
],
"orders": [
{
"id": "order-1",
"stops": [
{
"type": "single",
"id": "Balard",
"position": {
"lon": 2.279424,
"lat": 48.835749
},
"kind": "pickup",
"operationDuration": "PT5M30S"
}
]
},
{
"id": "order-2",
"stops": [
{
"type": "single",
"id": "Dauphine",
"position": {
"lon": 2.274264,
"lat": 48.870087
},
"kind": "pickup",
"operationDuration": "PT5M30S"
}
]
},
{
"id": "order-3",
"stops": [
{
"type": "single",
"id": "Station-f",
"position": {
"lon": 2.370564,
"lat": 48.83476
},
"kind": "pickup",
"operationDuration": "PT5M30S"
}
]
}
]
},
"agencyId": "BLD1234567_production",
"planId": "4cbd0ab8-282c-4b30-b981-29e1ed8a2016",
"planVersion": 1
}Plan
Retrieve a plan
Returns the plan currently stored for this id, reflecting any updates applied since it was created.
GET
/
plans
/
{planId}
Retrieve a plan
curl --request GET \
--url https://app.kardinal.ai/api/v2/plans/{planId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kardinal.ai/api/v2/plans/{planId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.kardinal.ai/api/v2/plans/{planId}', 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://app.kardinal.ai/api/v2/plans/{planId}",
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://app.kardinal.ai/api/v2/plans/{planId}"
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://app.kardinal.ai/api/v2/plans/{planId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kardinal.ai/api/v2/plans/{planId}")
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_body{
"item": {
"id": "4cbd0ab8-282c-4b30-b981-29e1ed8a2016",
"agencyId": "BLD1234567_production",
"version": 1,
"status": {
"waitingRoom": {
"waitingVersion": 1,
"runningVersion": 1
},
"creation": {
"waitingVersion": 1,
"runningVersion": 1
},
"optimization": {
"waitingVersion": 1,
"runningVersion": 1
}
},
"tz": "Europe/Paris",
"resources": [
{
"id": "resource1",
"vehicleProfile": {
"type": "fly",
"kmph": 20
},
"workingTimeWindow": {
"begin": "2026-03-21T08:00:00+01:00",
"end": "2026-03-21T23:00:00+01:00"
}
}
],
"orders": [
{
"id": "order-1",
"stops": [
{
"type": "single",
"id": "Balard",
"position": {
"lon": 2.279424,
"lat": 48.835749
},
"kind": "pickup",
"operationDuration": "PT5M30S"
}
]
},
{
"id": "order-2",
"stops": [
{
"type": "single",
"id": "Dauphine",
"position": {
"lon": 2.274264,
"lat": 48.870087
},
"kind": "pickup",
"operationDuration": "PT5M30S"
}
]
},
{
"id": "order-3",
"stops": [
{
"type": "single",
"id": "Station-f",
"position": {
"lon": 2.370564,
"lat": 48.83476
},
"kind": "pickup",
"operationDuration": "PT5M30S"
}
]
}
]
},
"agencyId": "BLD1234567_production",
"planId": "4cbd0ab8-282c-4b30-b981-29e1ed8a2016",
"planVersion": 1
}Authorizations
JWT bearer token, sent as Authorization: Bearer <token>. Two kinds of token are accepted:
- A session token (1 hour), obtained through the interactive Console login flow. Used to sign in to the Console; not meant to be used against this API.
- A long-term API token (366 days), obtained once via the Console and meant to be stored by your integration. It is the credential recommended for backend use, since it does not depend on repeating the interactive login flow.
Path Parameters
Response
Plan response.
A single plan wrapped with its identifying metadata, as returned by the plan-retrieval endpoints.
Identifier of the Kardinal tenant/account the plan is scoped to, derived automatically from the access token used to make the request.
Modelling pitfall. Not a physical-depot or site partition key. A single fleet based at several physical depots is still one
Plan; do not split it into severalPlanobjects just because resources have differentdeparture/arrivalpositions.
Pattern:
^BLD[0-9]{7}_[a-zA-Z0-9-._~:@!$,]+$Example:
"BLD1234567_production"
Was this page helpful?

