curl --request POST \
--url https://api.crosoftware.com/v0/routes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"location_id": 123,
"name": "<string>",
"truck_id": 123,
"auto_decline": true,
"days_interval": 123,
"end_at_lat": "<string>",
"end_at_lng": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"friday_on": true,
"interface_color": "<string>",
"last_dispatched": "2023-11-07T05:31:56Z",
"monday_on": true,
"recure_date": "2023-11-07T05:31:56Z",
"route_zone_id": 123,
"saturday_on": true,
"start_at_lat": "<string>",
"start_at_lng": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"sunday_on": true,
"thursday_on": true,
"tuesday_on": true,
"visualize_round_trip": true,
"wednesday_on": true,
"will_rollover": true
}
'import requests
url = "https://api.crosoftware.com/v0/routes"
payload = {
"location_id": 123,
"name": "<string>",
"truck_id": 123,
"auto_decline": True,
"days_interval": 123,
"end_at_lat": "<string>",
"end_at_lng": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"friday_on": True,
"interface_color": "<string>",
"last_dispatched": "2023-11-07T05:31:56Z",
"monday_on": True,
"recure_date": "2023-11-07T05:31:56Z",
"route_zone_id": 123,
"saturday_on": True,
"start_at_lat": "<string>",
"start_at_lng": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"sunday_on": True,
"thursday_on": True,
"tuesday_on": True,
"visualize_round_trip": True,
"wednesday_on": True,
"will_rollover": True
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
location_id: 123,
name: '<string>',
truck_id: 123,
auto_decline: true,
days_interval: 123,
end_at_lat: '<string>',
end_at_lng: '<string>',
end_time: '2023-11-07T05:31:56Z',
friday_on: true,
interface_color: '<string>',
last_dispatched: '2023-11-07T05:31:56Z',
monday_on: true,
recure_date: '2023-11-07T05:31:56Z',
route_zone_id: 123,
saturday_on: true,
start_at_lat: '<string>',
start_at_lng: '<string>',
start_time: '2023-11-07T05:31:56Z',
sunday_on: true,
thursday_on: true,
tuesday_on: true,
visualize_round_trip: true,
wednesday_on: true,
will_rollover: true
})
};
fetch('https://api.crosoftware.com/v0/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.crosoftware.com/v0/routes",
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([
'location_id' => 123,
'name' => '<string>',
'truck_id' => 123,
'auto_decline' => true,
'days_interval' => 123,
'end_at_lat' => '<string>',
'end_at_lng' => '<string>',
'end_time' => '2023-11-07T05:31:56Z',
'friday_on' => true,
'interface_color' => '<string>',
'last_dispatched' => '2023-11-07T05:31:56Z',
'monday_on' => true,
'recure_date' => '2023-11-07T05:31:56Z',
'route_zone_id' => 123,
'saturday_on' => true,
'start_at_lat' => '<string>',
'start_at_lng' => '<string>',
'start_time' => '2023-11-07T05:31:56Z',
'sunday_on' => true,
'thursday_on' => true,
'tuesday_on' => true,
'visualize_round_trip' => true,
'wednesday_on' => true,
'will_rollover' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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://api.crosoftware.com/v0/routes"
payload := strings.NewReader("{\n \"location_id\": 123,\n \"name\": \"<string>\",\n \"truck_id\": 123,\n \"auto_decline\": true,\n \"days_interval\": 123,\n \"end_at_lat\": \"<string>\",\n \"end_at_lng\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"friday_on\": true,\n \"interface_color\": \"<string>\",\n \"last_dispatched\": \"2023-11-07T05:31:56Z\",\n \"monday_on\": true,\n \"recure_date\": \"2023-11-07T05:31:56Z\",\n \"route_zone_id\": 123,\n \"saturday_on\": true,\n \"start_at_lat\": \"<string>\",\n \"start_at_lng\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"sunday_on\": true,\n \"thursday_on\": true,\n \"tuesday_on\": true,\n \"visualize_round_trip\": true,\n \"wednesday_on\": true,\n \"will_rollover\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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://api.crosoftware.com/v0/routes")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": 123,\n \"name\": \"<string>\",\n \"truck_id\": 123,\n \"auto_decline\": true,\n \"days_interval\": 123,\n \"end_at_lat\": \"<string>\",\n \"end_at_lng\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"friday_on\": true,\n \"interface_color\": \"<string>\",\n \"last_dispatched\": \"2023-11-07T05:31:56Z\",\n \"monday_on\": true,\n \"recure_date\": \"2023-11-07T05:31:56Z\",\n \"route_zone_id\": 123,\n \"saturday_on\": true,\n \"start_at_lat\": \"<string>\",\n \"start_at_lng\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"sunday_on\": true,\n \"thursday_on\": true,\n \"tuesday_on\": true,\n \"visualize_round_trip\": true,\n \"wednesday_on\": true,\n \"will_rollover\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crosoftware.com/v0/routes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": 123,\n \"name\": \"<string>\",\n \"truck_id\": 123,\n \"auto_decline\": true,\n \"days_interval\": 123,\n \"end_at_lat\": \"<string>\",\n \"end_at_lng\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"friday_on\": true,\n \"interface_color\": \"<string>\",\n \"last_dispatched\": \"2023-11-07T05:31:56Z\",\n \"monday_on\": true,\n \"recure_date\": \"2023-11-07T05:31:56Z\",\n \"route_zone_id\": 123,\n \"saturday_on\": true,\n \"start_at_lat\": \"<string>\",\n \"start_at_lng\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"sunday_on\": true,\n \"thursday_on\": true,\n \"tuesday_on\": true,\n \"visualize_round_trip\": true,\n \"wednesday_on\": true,\n \"will_rollover\": true\n}"
response = http.request(request)
puts response.read_body{
"auto_decline": true,
"days_interval": 123,
"end_at_lat": "<string>",
"end_at_lng": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"friday_on": true,
"id": 123,
"interface_color": "<string>",
"last_dispatched": "2023-11-07T05:31:56Z",
"location_id": 123,
"monday_on": true,
"name": "<string>",
"recure_date": "2023-11-07T05:31:56Z",
"route_zone_id": 123,
"saturday_on": true,
"start_at_lat": "<string>",
"start_at_lng": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"sunday_on": true,
"thursday_on": true,
"truck_id": 123,
"tuesday_on": true,
"visualize_round_trip": true,
"wednesday_on": true,
"will_rollover": true
}Add Route
Add a new route.
curl --request POST \
--url https://api.crosoftware.com/v0/routes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"location_id": 123,
"name": "<string>",
"truck_id": 123,
"auto_decline": true,
"days_interval": 123,
"end_at_lat": "<string>",
"end_at_lng": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"friday_on": true,
"interface_color": "<string>",
"last_dispatched": "2023-11-07T05:31:56Z",
"monday_on": true,
"recure_date": "2023-11-07T05:31:56Z",
"route_zone_id": 123,
"saturday_on": true,
"start_at_lat": "<string>",
"start_at_lng": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"sunday_on": true,
"thursday_on": true,
"tuesday_on": true,
"visualize_round_trip": true,
"wednesday_on": true,
"will_rollover": true
}
'import requests
url = "https://api.crosoftware.com/v0/routes"
payload = {
"location_id": 123,
"name": "<string>",
"truck_id": 123,
"auto_decline": True,
"days_interval": 123,
"end_at_lat": "<string>",
"end_at_lng": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"friday_on": True,
"interface_color": "<string>",
"last_dispatched": "2023-11-07T05:31:56Z",
"monday_on": True,
"recure_date": "2023-11-07T05:31:56Z",
"route_zone_id": 123,
"saturday_on": True,
"start_at_lat": "<string>",
"start_at_lng": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"sunday_on": True,
"thursday_on": True,
"tuesday_on": True,
"visualize_round_trip": True,
"wednesday_on": True,
"will_rollover": True
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
location_id: 123,
name: '<string>',
truck_id: 123,
auto_decline: true,
days_interval: 123,
end_at_lat: '<string>',
end_at_lng: '<string>',
end_time: '2023-11-07T05:31:56Z',
friday_on: true,
interface_color: '<string>',
last_dispatched: '2023-11-07T05:31:56Z',
monday_on: true,
recure_date: '2023-11-07T05:31:56Z',
route_zone_id: 123,
saturday_on: true,
start_at_lat: '<string>',
start_at_lng: '<string>',
start_time: '2023-11-07T05:31:56Z',
sunday_on: true,
thursday_on: true,
tuesday_on: true,
visualize_round_trip: true,
wednesday_on: true,
will_rollover: true
})
};
fetch('https://api.crosoftware.com/v0/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.crosoftware.com/v0/routes",
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([
'location_id' => 123,
'name' => '<string>',
'truck_id' => 123,
'auto_decline' => true,
'days_interval' => 123,
'end_at_lat' => '<string>',
'end_at_lng' => '<string>',
'end_time' => '2023-11-07T05:31:56Z',
'friday_on' => true,
'interface_color' => '<string>',
'last_dispatched' => '2023-11-07T05:31:56Z',
'monday_on' => true,
'recure_date' => '2023-11-07T05:31:56Z',
'route_zone_id' => 123,
'saturday_on' => true,
'start_at_lat' => '<string>',
'start_at_lng' => '<string>',
'start_time' => '2023-11-07T05:31:56Z',
'sunday_on' => true,
'thursday_on' => true,
'tuesday_on' => true,
'visualize_round_trip' => true,
'wednesday_on' => true,
'will_rollover' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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://api.crosoftware.com/v0/routes"
payload := strings.NewReader("{\n \"location_id\": 123,\n \"name\": \"<string>\",\n \"truck_id\": 123,\n \"auto_decline\": true,\n \"days_interval\": 123,\n \"end_at_lat\": \"<string>\",\n \"end_at_lng\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"friday_on\": true,\n \"interface_color\": \"<string>\",\n \"last_dispatched\": \"2023-11-07T05:31:56Z\",\n \"monday_on\": true,\n \"recure_date\": \"2023-11-07T05:31:56Z\",\n \"route_zone_id\": 123,\n \"saturday_on\": true,\n \"start_at_lat\": \"<string>\",\n \"start_at_lng\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"sunday_on\": true,\n \"thursday_on\": true,\n \"tuesday_on\": true,\n \"visualize_round_trip\": true,\n \"wednesday_on\": true,\n \"will_rollover\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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://api.crosoftware.com/v0/routes")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": 123,\n \"name\": \"<string>\",\n \"truck_id\": 123,\n \"auto_decline\": true,\n \"days_interval\": 123,\n \"end_at_lat\": \"<string>\",\n \"end_at_lng\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"friday_on\": true,\n \"interface_color\": \"<string>\",\n \"last_dispatched\": \"2023-11-07T05:31:56Z\",\n \"monday_on\": true,\n \"recure_date\": \"2023-11-07T05:31:56Z\",\n \"route_zone_id\": 123,\n \"saturday_on\": true,\n \"start_at_lat\": \"<string>\",\n \"start_at_lng\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"sunday_on\": true,\n \"thursday_on\": true,\n \"tuesday_on\": true,\n \"visualize_round_trip\": true,\n \"wednesday_on\": true,\n \"will_rollover\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crosoftware.com/v0/routes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": 123,\n \"name\": \"<string>\",\n \"truck_id\": 123,\n \"auto_decline\": true,\n \"days_interval\": 123,\n \"end_at_lat\": \"<string>\",\n \"end_at_lng\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"friday_on\": true,\n \"interface_color\": \"<string>\",\n \"last_dispatched\": \"2023-11-07T05:31:56Z\",\n \"monday_on\": true,\n \"recure_date\": \"2023-11-07T05:31:56Z\",\n \"route_zone_id\": 123,\n \"saturday_on\": true,\n \"start_at_lat\": \"<string>\",\n \"start_at_lng\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"sunday_on\": true,\n \"thursday_on\": true,\n \"tuesday_on\": true,\n \"visualize_round_trip\": true,\n \"wednesday_on\": true,\n \"will_rollover\": true\n}"
response = http.request(request)
puts response.read_body{
"auto_decline": true,
"days_interval": 123,
"end_at_lat": "<string>",
"end_at_lng": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"friday_on": true,
"id": 123,
"interface_color": "<string>",
"last_dispatched": "2023-11-07T05:31:56Z",
"location_id": 123,
"monday_on": true,
"name": "<string>",
"recure_date": "2023-11-07T05:31:56Z",
"route_zone_id": 123,
"saturday_on": true,
"start_at_lat": "<string>",
"start_at_lng": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"sunday_on": true,
"thursday_on": true,
"truck_id": 123,
"tuesday_on": true,
"visualize_round_trip": true,
"wednesday_on": true,
"will_rollover": true
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Version identifier (date format).
Tenant identifier. Contact CRO Software for more info if you don't already have this id. See list tenant ids for info on listing the tenants you have access to.
Body
Create new route request body model.
Location identifier.
Route name.
Truck identifier.
Auto decline.
Days interval.
Latitude.
Longitude.
Scheduled job completion date.
Friday on.
Interface color.
Last time this route had a job dispatched.
Monday on.
Recure date.
Route zone id
Saturday on.
Latitude.
Longitude.
Scheduled job completion date.
Sunday on.
Thursday on.
Tuesday on.
Visualize round trip.
Wednesday on.
Will rollover.
Response
Success
Route model.
Auto decline.
Days interval.
Latitude.
Longitude.
Scheduled job completion date.
Friday on.
Trailer record identifier.
Interface color.
Last time this route had a job dispatched.
Location identifier.
Monday on.
Route name.
Recure date.
Route zone id
Saturday on.
Latitude.
Longitude.
Scheduled job completion date.
Sunday on.
Thursday on.
Truck identifier.
Tuesday on.
Visualize round trip.
Wednesday on.
Will rollover.