List Routes
GET
/routes
Get list of routes.
Roles
Users with the following roles may access this endoint:
Admin
ClientCustomer
CrmUser
Dispatcher
Driver
ThirdPartyDispatcher
ThirdPartyDriver
Breaking Changes
No breaking changes.
Request
- Sample Request
- Sample Response
GET /routes/
Authorization: Bearer {your-auth-token}
Content-Type: application/json
x-tenant-id: {your-tenant-id}
Access-Control-Allow-Headers: Authorization, Accept, X-TENANT-ID, Content-Type
Access-Control-Allow-Methods: GET
Access-Control-Allow-Origin: *
Allow: GET
Content-Length: 7507
Content-Type: application/json
Date: Sat, 20 Aug 2022 01:43:26 GMT
Server: WSGIServer/0.2 CPython/3.9.5
X-API-VERSION: 2019/02/08
X-REQUEST-ID: 72999233-ed67-498d-8e56-a9ae8532ea2b
{
"current_limit": 100,
"current_page": 1,
"results": [
{
"id": 6,
"interface_color": "#FF2600",
"location_id": 2,
"name": "Daily SL Route"
},
{
"id": 1007,
"interface_color": "#0433FF",
"location_id": 2,
"name": "Daily FL Truck"
},
{
"id": 1010,
"interface_color": null,
"location_id": 3,
"name": "Monday Route"
},
{
"id": 1017,
"interface_color": null,
"location_id": 5,
"name": "Monday"
},
{
"id": 1019,
"interface_color": null,
"location_id": 8,
"name": "Friday15"
},
{
"id": 1020,
"interface_color": null,
"location_id": 8,
"name": "Tuesday11"
},
{
"id": 1021,
"interface_color": null,
"location_id": 8,
"name": "Thursday14"
},
{
"id": 1022,
"interface_color": null,
"location_id": 8,
"name": "Monday11"
},
{
"id": 1023,
"interface_color": null,
"location_id": 8,
"name": "Friday14"
},
{
"id": 1024,
"interface_color": null,
"location_id": 8,
"name": "Friday 10"
},
{
"id": 1025,
"interface_color": null,
"location_id": 8,
"name": "Monday10"
},
{
"id": 1026,
"interface_color": null,
"location_id": 8,
"name": "Monday15"
},
{
"id": 1027,
"interface_color": null,
"location_id": 8,
"name": "Wednesday10"
},
{
"id": 1028,
"interface_color": null,
"location_id": 8,
"name": "Wednesday15"
},
{
"id": 1029,
"interface_color": null,
"location_id": 8,
"name": "Thursday10"
},
{
"id": 1030,
"interface_color": null,
"location_id": 8,
"name": "Tuesday10"
},
{
"id": 1031,
"interface_color": null,
"location_id": 8,
"name": "Monday14"
},
{
"id": 1032,
"interface_color": null,
"location_id": 8,
"name": "Tuesday15"
},
{
"id": 1033,
"interface_color": null,
"location_id": 8,
"name": "WednesdayD214"
},
{
"id": 1034,
"interface_color": null,
"location_id": 8,
"name": "WednesdayD114"
},
{
"id": 1035,
"interface_color": null,
"location_id": 8,
"name": "Thursday11"
},
{
"id": 1036,
"interface_color": null,
"location_id": 8,
"name": "Friday11"
},
{
"id": 1037,
"interface_color": null,
"location_id": 8,
"name": "Tuesday14"
},
{
"id": 1038,
"interface_color": null,
"location_id": 8,
"name": "Thursday15"
},
{
"id": 1039,
"interface_color": null,
"location_id": 8,
"name": "Wednesday11"
},
{
"id": 1040,
"interface_color": null,
"location_id": 8,
"name": "Friday10"
},
{
"id": 1050,
"interface_color": null,
"location_id": 9,
"name": "Monday14"
},
{
"id": 1051,
"interface_color": null,
"location_id": 9,
"name": "Wednesday10"
},
{
"id": 1052,
"interface_color": null,
"location_id": 9,
"name": "Thursday14"
},
{
"id": 1053,
"interface_color": null,
"location_id": 9,
"name": "Thursday15"
},
{
"id": 1054,
"interface_color": null,
"location_id": 9,
"name": "Friday15"
},
{
"id": 1055,
"interface_color": null,
"location_id": 9,
"name": "Friday 10"
},
{
"id": 1056,
"interface_color": null,
"location_id": 9,
"name": "WednesdayD214"
},
{
"id": 1057,
"interface_color": null,
"location_id": 9,
"name": "Tuesday14"
},
{
"id": 1058,
"interface_color": null,
"location_id": 9,
"name": "Tuesday10"
},
{
"id": 1059,
"interface_color": null,
"location_id": 9,
"name": "Monday11"
},
{
"id": 1060,
"interface_color": null,
"location_id": 9,
"name": "Tuesday15"
},
{
"id": 1061,
"interface_color": null,
"location_id": 9,
"name": "Monday10"
},
{
"id": 1062,
"interface_color": null,
"location_id": 9,
"name": "WednesdayD114"
},
{
"id": 1063,
"interface_color": null,
"location_id": 9,
"name": "Thursday10"
},
{
"id": 1064,
"interface_color": null,
"location_id": 9,
"name": "Tuesday11"
},
{
"id": 1065,
"interface_color": null,
"location_id": 9,
"name": "Friday14"
},
{
"id": 1066,
"interface_color": null,
"location_id": 9,
"name": "Friday11"
},
{
"id": 1067,
"interface_color": null,
"location_id": 9,
"name": "Wednesday15"
},
{
"id": 1068,
"interface_color": null,
"location_id": 9,
"name": "Monday15"
},
{
"id": 1069,
"interface_color": null,
"location_id": 9,
"name": "Thursday11"
},
{
"id": 1070,
"interface_color": null,
"location_id": 9,
"name": "Wednesday11"
},
{
"id": 1071,
"interface_color": null,
"location_id": 9,
"name": "Friday10"
},
{
"id": 1072,
"interface_color": null,
"location_id": 10,
"name": "Monday14"
},
{
"id": 1073,
"interface_color": null,
"location_id": 10,
"name": "Wednesday10"
},
{
"id": 1074,
"interface_color": null,
"location_id": 10,
"name": "Thursday14"
},
{
"id": 1075,
"interface_color": null,
"location_id": 10,
"name": "Thursday15"
},
{
"id": 1076,
"interface_color": null,
"location_id": 10,
"name": "Friday15"
},
{
"id": 1077,
"interface_color": null,
"location_id": 10,
"name": "Friday 10"
},
{
"id": 1078,
"interface_color": null,
"location_id": 10,
"name": "WednesdayD214"
},
{
"id": 1079,
"interface_color": null,
"location_id": 10,
"name": "Tuesday14"
},
{
"id": 1080,
"interface_color": null,
"location_id": 10,
"name": "Tuesday10"
},
{
"id": 1081,
"interface_color": null,
"location_id": 10,
"name": "Monday11"
},
{
"id": 1082,
"interface_color": null,
"location_id": 10,
"name": "Tuesday15"
},
{
"id": 1083,
"interface_color": null,
"location_id": 10,
"name": "Monday10"
},
{
"id": 1084,
"interface_color": null,
"location_id": 10,
"name": "WednesdayD114"
},
{
"id": 1085,
"interface_color": null,
"location_id": 10,
"name": "Thursday10"
},
{
"id": 1086,
"interface_color": null,
"location_id": 10,
"name": "Tuesday11"
},
{
"id": 1087,
"interface_color": null,
"location_id": 10,
"name": "Friday14"
},
{
"id": 1088,
"interface_color": null,
"location_id": 10,
"name": "Friday11"
},
{
"id": 1089,
"interface_color": null,
"location_id": 10,
"name": "Wednesday15"
},
{
"id": 1090,
"interface_color": null,
"location_id": 10,
"name": "Monday15"
},
{
"id": 1091,
"interface_color": null,
"location_id": 10,
"name": "Thursday11"
},
{
"id": 1092,
"interface_color": null,
"location_id": 10,
"name": "Wednesday11"
},
{
"id": 1105,
"interface_color": null,
"location_id": 11,
"name": "WednesdayD114"
},
{
"id": 1131,
"interface_color": null,
"location_id": 2,
"name": "Daily RL Route"
},
{
"id": 1132,
"interface_color": null,
"location_id": 3,
"name": "Wednesday Route"
},
{
"id": 1134,
"interface_color": null,
"location_id": 3,
"name": "Tuesday Route"
},
{
"id": 1135,
"interface_color": "#00FF00",
"location_id": 16,
"name": "Monday WK 1 & 3"
},
{
"id": 1136,
"interface_color": "#8080FF",
"location_id": 16,
"name": "Wednesday WK 1 & 3"
},
{
"id": 1137,
"interface_color": "#FF0000",
"location_id": 16,
"name": "Friday WK 1 & 3"
},
{
"id": 1138,
"interface_color": "#FF0000",
"location_id": 16,
"name": "Friday WK 2 & 4"
},
{
"id": 1139,
"interface_color": "#00FF00",
"location_id": 16,
"name": "Monday WK 2 & 4"
},
{
"id": 1140,
"interface_color": "#8080FF",
"location_id": 16,
"name": "Wednesday WK 2 & 4"
},
{
"id": 6145,
"interface_color": null,
"location_id": 3,
"name": "All Stops (Friday)"
},
{
"id": 6146,
"interface_color": "#DEEF05",
"location_id": 13,
"name": "Cheese Route"
},
{
"id": 6147,
"interface_color": null,
"location_id": 13,
"name": "Bread Route"
},
{
"id": 6149,
"interface_color": null,
"location_id": 2,
"name": "Weekend with Zone"
},
{
"id": 6150,
"interface_color": null,
"location_id": 2,
"name": "Morning no Zone"
},
{
"id": 6151,
"interface_color": null,
"location_id": 2,
"name": "Sunday with Zone"
},
{
"id": 6152,
"interface_color": null,
"location_id": 2,
"name": "Afternoon no Zone"
},
{
"id": 7151,
"interface_color": null,
"location_id": 2,
"name": "Saturday with Zone"
},
{
"id": 7153,
"interface_color": null,
"location_id": 2,
"name": "Sunday Route"
},
{
"id": 8153,
"interface_color": null,
"location_id": 1,
"name": "Weekly Route"
},
{
"id": 8155,
"interface_color": null,
"location_id": 3,
"name": "Test Import"
},
{
"id": 8156,
"interface_color": null,
"location_id": 3,
"name": "Test Route"
},
{
"id": 8157,
"interface_color": null,
"location_id": 3,
"name": "Thursday Route"
}
],
"total_count": 92,
"total_pages": 1
}
Path Parameters
No path parameters.
Query Parameters
No query parameters.
Request Headers
Refer to StandardRequestHeadersModel for more details.
authorization
String, Required
Authorization header (bearer with access token). See the Authentication Guide to get started.
- Matches ^bearer [a-z0-9-_=]+.[a-z0-9-_=]+.?[a-z0-9-_.+/=]*$
- No longer than 256 characters.
- At least 1 characters long.
x-api-version
String, Optional
Request identifier.
- At least 1 and no more than 64 characters.
- Must be a valid API version string (2019/02/08, 2021/04/07, 2021/05/07, 2021/08/02, 2021/11/04, 2023/04/19).
x-tenant-id
Integer, Required
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.
Request Body
No request body
Response
Response Headers
Refer to StandardResponseHeadersModel for more details.
x-api-version
String
Request identifier.
- At least 1 and no more than 64 characters.
- Must be a valid API version string (2019/02/08, 2021/04/07, 2021/05/07, 2021/08/02, 2021/11/04, 2023/04/19).
x-request-id
String
Request identifier.
- Valid UUID.
Response Body
Refer to RouteListModel for more details.
current_limit
Integer
Maximun number of results per page.
- Less than or equal to 1000.
- Greater than or equal to 1.
current_page
Integer
Paged results page index (starting from 1).
- Less than or equal to 10000.
- Greater than or equal to 1.
results
Array[RouteModel]
Refer to RouteModel.
total_count
Integer
Paged results total viewable records.
- Less than or equal to 100000.
- Greater than or equal to 0.
total_pages
Integer
Paged results total pages.
- Less than or equal to 1000.
- Greater than or equal to 0.
Code Samples
- cURL
- Python
- CSharp 2.0
curl --request GET --include \
--header "Authorization: Bearer {your-auth-token}" \
--header "Content-Type: application/json" \
--header "x-tenant-id: {your-tenant-id}" \
127.0.0.1:8003/routes
import requests, json
response = requests.get(
'http://localhost:8003/routes',
headers={
'Authorization': 'Bearer {your-auth-token}',
'Content-Type': 'application/json',
'x-tenant-id': '{your-tenant-id}'
},
parameters={
}
)
results = json.loads(response.text)
print(results)
using System;
using System.Net;
using System.Collections.Specialized;
namespace CROSoftware
{
public class DemoClient
{
static public void Main ()
{
WebClient client = new WebClient();
// URL
String url = "/routes";
// Headers
client.Headers.Add("Authorization", "Bearer {your-auth-token}");
client.Headers.Add("Content-Type", "application/json");
client.Headers.Add("x-tenant-id", "{your-tenant-id}");
string json = client.DownloadString(url);
Console.WriteLine(json);
}
}
}