List routes
curl --request GET \
--url https://api.jitra.app/public/v1/routes \
--header 'x-api-key: <api-key>'import requests
url = "https://api.jitra.app/public/v1/routes"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.jitra.app/public/v1/routes', 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://api.jitra.app/public/v1/routes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.jitra.app/public/v1/routes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jitra.app/public/v1/routes")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jitra.app/public/v1/routes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"result": [
{
"id": 9,
"name": "Distribution Route A",
"description": "Primary city route",
"color": "#FF6600",
"deviation": 50,
"points": [
{
"location": [
106.8,
-6.2
],
"order": 1
}
],
"coordinates": [
[
[
[
106.8,
-6.2
]
]
]
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"statusCode": 401,
"errorCode": "ERR999",
"message": "Unauthorized",
"timestamp": "2026-05-17T01:00:00.000Z"
}{
"statusCode": 429,
"errorCode": "ERR999",
"message": "ThrottlerException: Too Many Requests",
"timestamp": "2026-05-17T01:00:00.000Z"
}Endpoints
Read Routes
Mengembalikan semua Route, urutan point, dan geometri rute yang tersedia untuk Organization.
GET
/
routes
List routes
curl --request GET \
--url https://api.jitra.app/public/v1/routes \
--header 'x-api-key: <api-key>'import requests
url = "https://api.jitra.app/public/v1/routes"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.jitra.app/public/v1/routes', 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://api.jitra.app/public/v1/routes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.jitra.app/public/v1/routes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jitra.app/public/v1/routes")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jitra.app/public/v1/routes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"result": [
{
"id": 9,
"name": "Distribution Route A",
"description": "Primary city route",
"color": "#FF6600",
"deviation": 50,
"points": [
{
"location": [
106.8,
-6.2
],
"order": 1
}
],
"coordinates": [
[
[
[
106.8,
-6.2
]
]
]
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"statusCode": 401,
"errorCode": "ERR999",
"message": "Unauthorized",
"timestamp": "2026-05-17T01:00:00.000Z"
}{
"statusCode": 429,
"errorCode": "ERR999",
"message": "ThrottlerException: Too Many Requests",
"timestamp": "2026-05-17T01:00:00.000Z"
}Otorisasi
ApiKeyAuthBearerAuth
Organization API key issued from Jitra (Organization → API Key).
Respons
Route list.
Contoh:
200
Hide child attributes
Hide child attributes
Route ID.
Contoh:
9
Route name.
Contoh:
"Distribution Route A"
Route description.
Contoh:
"Primary city route"
Display color (hex).
Contoh:
"#FF6600"
Allowed deviation from the route geometry, typically in meters.
Contoh:
50
Nested route geometry as stored by the service ([lng, lat][][][], similar to a GeoJSON MultiLineString).
Geographic coordinate as [longitude, latitude].
Required array length:
2 elementsContoh:
[106.8, -6.2]
Record creation timestamp.
Last update timestamp.
