Endpoints
Get job status
Check the current status of an optimization job.
Poll this endpoint after submitting a route via POST /planner/v2. Status values:
queued— waiting to be processedrunning— optimization in progresssucceeded— route optimized, retrieve result withGET /planner/optimizations/{optimization_id}/resultnot_drivable— route cannot be completed with the given parametersfailed— an error occurredcanceled— job was canceled
GET
/
planner
/
jobs
/
{job_id}
Get job status
curl --request GET \
--url https://api.fryte.com/planner/jobs/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fryte.com/planner/jobs/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fryte.com/planner/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fryte.com/planner/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.fryte.com/planner/jobs/{job_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fryte.com/planner/jobs/{job_id}",
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;
}HttpResponse<String> response = Unirest.get("https://api.fryte.com/planner/jobs/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fryte.com/planner/jobs/{job_id}"
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))
}val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.fryte.com/planner/jobs/{job_id}")
.get()
.addHeader("Authorization", "Bearer <token>")
.build()
val response = client.newCall(request).execute(){
"job_id": "c3f1c944-a44c-4c07-ab52-7df7ba94024a",
"optimization_id": 7658,
"status": "succeeded",
"tour_id": 7615,
"vehicle_id": "010160700001"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
HybridAuthBearerHTTPBearer
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Job identifier returned by POST /planner/v2.
Query Parameters
Tenant ID
Response
Successful Response
Response body for GET /planner/jobs/{job_id}, mirroring the optimizer's job schema.
Job identifier (UUID).
Current job status.
Available options:
queued, running, succeeded, not_drivable, failed, canceled Tour identifier.
Optimization identifier.
Vehicle identifier.
⌘I
Get job status
curl --request GET \
--url https://api.fryte.com/planner/jobs/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fryte.com/planner/jobs/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fryte.com/planner/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fryte.com/planner/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.fryte.com/planner/jobs/{job_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fryte.com/planner/jobs/{job_id}",
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;
}HttpResponse<String> response = Unirest.get("https://api.fryte.com/planner/jobs/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fryte.com/planner/jobs/{job_id}"
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))
}val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.fryte.com/planner/jobs/{job_id}")
.get()
.addHeader("Authorization", "Bearer <token>")
.build()
val response = client.newCall(request).execute(){
"job_id": "c3f1c944-a44c-4c07-ab52-7df7ba94024a",
"optimization_id": 7658,
"status": "succeeded",
"tour_id": 7615,
"vehicle_id": "010160700001"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}