curl --request GET \
--url https://{company}.datatruck.io/api/v1/openapi/orders/ \
--header 'Authorization: <api-key>'import requests
url = "https://{company}.datatruck.io/api/v1/openapi/orders/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://{company}.datatruck.io/api/v1/openapi/orders/', 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://{company}.datatruck.io/api/v1/openapi/orders/",
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: <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://{company}.datatruck.io/api/v1/openapi/orders/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://{company}.datatruck.io/api/v1/openapi/orders/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{company}.datatruck.io/api/v1/openapi/orders/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 150,
"next": "<string>",
"previous": "<string>",
"results": [
{
"id": 12345,
"status": "In Progress",
"created_datetime": "2025-02-06T12:00:00Z",
"tags": [
{
"name": "Urgent"
}
],
"stops": [
{
"id": 123,
"order": 123,
"stop_type": "pickup",
"location": {
"id": 123,
"company": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"contact_name": "<string>",
"place_name": "<string>",
"latitude": 33.749,
"longitude": -84.388,
"is_active": true
},
"reference_id": "REF-001",
"proof_of_delivery": "<string>",
"ready_time_start_date": "2023-11-07T05:31:56Z",
"ready_time_end_date": "2023-11-07T05:31:56Z",
"note": "<string>"
}
],
"equipment_type": "Refrigerated",
"equipment_type_child": [
"Chilled Storage"
],
"estimated_mile": "1200.50",
"estimated_time": 10,
"eta_detail": {
"on_time": true,
"eta_datetime": "2023-11-07T05:31:56Z"
},
"trip": {
"id": 123,
"status": "assigned",
"trip_id": "TR-002489-01",
"mile": "574.31",
"empty_mile": "0.00",
"total_load_pay": "148.17",
"carrier__name": "<string>",
"driver__full_name": "<string>",
"team_driver__full_name": "<string>",
"truck__unit_number": "<string>",
"pickup": {
"id": 123,
"company": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"contact_name": "<string>",
"place_name": "<string>",
"latitude": 33.749,
"longitude": -84.388,
"is_active": true
},
"delivery": {
"id": 123,
"company": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"contact_name": "<string>",
"place_name": "<string>",
"latitude": 33.749,
"longitude": -84.388,
"is_active": true
},
"settlement": {
"settlement__status": "<string>",
"settlement__settlement_number": "<string>",
"settlement__is_sent": true
}
},
"batch_orders": {
"invoice_number": "<string>",
"is_sent": true,
"batch": {
"batch_number": "<string>",
"status": "<string>"
}
},
"assigned_driver_n_truck": {
"driver_full_name": "<string>",
"truck_unit_number": "<string>"
},
"assigned_carrier": "<string>",
"is_flagged": false,
"documents": [
{
"file_type": "rate_confirmation",
"file_link": "https://storage.example.com/docs/rc-12345.pdf",
"uploaded_at": "2025-02-06T12:00:00Z",
"uploaded_by": "John Doe"
}
],
"load_id": "LD-987654",
"shipment_id": "SHIP-123456",
"load_pay": "5000.00",
"total_miles": "1500.75",
"created_by__full_name": "John Doe",
"total_other_pay": "200.00",
"total_pay": "5200.00",
"per_mile_revenue": "3.25",
"dispatcher__full_name": "Alice Johnson",
"customer__company_name": "ABC Logistics",
"mc_number__company_name": "XYZ Carriers",
"office__office_name": "Dallas Office",
"pickup_appointment_time": "2025-02-06T08:30:00Z",
"delivery_appointment_time": "2025-02-07T15:00:00Z",
"pickup_time": "2025-02-06T09:00:00Z",
"delivery_time": "2025-02-07T16:30:00Z",
"transportation_mode": "Truckload",
"driver_requirements": [
"<string>"
],
"additional_equipments": [
"<string>"
],
"freight_requirements": [
"<string>"
],
"freight_requirements_min_temperature": "2.0",
"freight_requirements_max_temperature": "8.0",
"flagging_reason": null
}
]
}{
"error": 123,
"message": "<string>"
}Get Loads List
Retrieve a paginated list of loads (orders) with related stops, trips, tags, documents, and ETA details.
curl --request GET \
--url https://{company}.datatruck.io/api/v1/openapi/orders/ \
--header 'Authorization: <api-key>'import requests
url = "https://{company}.datatruck.io/api/v1/openapi/orders/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://{company}.datatruck.io/api/v1/openapi/orders/', 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://{company}.datatruck.io/api/v1/openapi/orders/",
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: <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://{company}.datatruck.io/api/v1/openapi/orders/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://{company}.datatruck.io/api/v1/openapi/orders/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{company}.datatruck.io/api/v1/openapi/orders/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 150,
"next": "<string>",
"previous": "<string>",
"results": [
{
"id": 12345,
"status": "In Progress",
"created_datetime": "2025-02-06T12:00:00Z",
"tags": [
{
"name": "Urgent"
}
],
"stops": [
{
"id": 123,
"order": 123,
"stop_type": "pickup",
"location": {
"id": 123,
"company": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"contact_name": "<string>",
"place_name": "<string>",
"latitude": 33.749,
"longitude": -84.388,
"is_active": true
},
"reference_id": "REF-001",
"proof_of_delivery": "<string>",
"ready_time_start_date": "2023-11-07T05:31:56Z",
"ready_time_end_date": "2023-11-07T05:31:56Z",
"note": "<string>"
}
],
"equipment_type": "Refrigerated",
"equipment_type_child": [
"Chilled Storage"
],
"estimated_mile": "1200.50",
"estimated_time": 10,
"eta_detail": {
"on_time": true,
"eta_datetime": "2023-11-07T05:31:56Z"
},
"trip": {
"id": 123,
"status": "assigned",
"trip_id": "TR-002489-01",
"mile": "574.31",
"empty_mile": "0.00",
"total_load_pay": "148.17",
"carrier__name": "<string>",
"driver__full_name": "<string>",
"team_driver__full_name": "<string>",
"truck__unit_number": "<string>",
"pickup": {
"id": 123,
"company": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"contact_name": "<string>",
"place_name": "<string>",
"latitude": 33.749,
"longitude": -84.388,
"is_active": true
},
"delivery": {
"id": 123,
"company": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"contact_name": "<string>",
"place_name": "<string>",
"latitude": 33.749,
"longitude": -84.388,
"is_active": true
},
"settlement": {
"settlement__status": "<string>",
"settlement__settlement_number": "<string>",
"settlement__is_sent": true
}
},
"batch_orders": {
"invoice_number": "<string>",
"is_sent": true,
"batch": {
"batch_number": "<string>",
"status": "<string>"
}
},
"assigned_driver_n_truck": {
"driver_full_name": "<string>",
"truck_unit_number": "<string>"
},
"assigned_carrier": "<string>",
"is_flagged": false,
"documents": [
{
"file_type": "rate_confirmation",
"file_link": "https://storage.example.com/docs/rc-12345.pdf",
"uploaded_at": "2025-02-06T12:00:00Z",
"uploaded_by": "John Doe"
}
],
"load_id": "LD-987654",
"shipment_id": "SHIP-123456",
"load_pay": "5000.00",
"total_miles": "1500.75",
"created_by__full_name": "John Doe",
"total_other_pay": "200.00",
"total_pay": "5200.00",
"per_mile_revenue": "3.25",
"dispatcher__full_name": "Alice Johnson",
"customer__company_name": "ABC Logistics",
"mc_number__company_name": "XYZ Carriers",
"office__office_name": "Dallas Office",
"pickup_appointment_time": "2025-02-06T08:30:00Z",
"delivery_appointment_time": "2025-02-07T15:00:00Z",
"pickup_time": "2025-02-06T09:00:00Z",
"delivery_time": "2025-02-07T16:30:00Z",
"transportation_mode": "Truckload",
"driver_requirements": [
"<string>"
],
"additional_equipments": [
"<string>"
],
"freight_requirements": [
"<string>"
],
"freight_requirements_min_temperature": "2.0",
"freight_requirements_max_temperature": "8.0",
"flagging_reason": null
}
]
}{
"error": 123,
"message": "<string>"
}API Url
https://{company_name}.datatruck.io/api/v1/openapi/orders/
https://companyx.datatruck.io/api/v1/openapi/orders/
Sample request
curl --request GET \
--url https://{company_name}.datatruck.io/api/v1/openapi/orders/ \
--header "Authorization: Token cc92174571ac12f386e5657b187d39bb210f3270a837730125ed4029a44fsdfasd" \
--header "Content-Type: application/json"
Sample response
{
"count": 150,
"next": "https://companyx.datatruck.io/api/v1/openapi/orders/?page=2",
"previous": null,
"results": [
{
"id": 2489,
"load_id": "T-111QT34XS",
"shipment_id": "DT-002489",
"status": "dispatched",
"load_pay": "148.17",
"total_miles": "574.31",
"created_datetime": "2023-10-11T13:42:54.456045Z",
"created_by__full_name": "Super Admin",
"total_other_pay": "122.00",
"total_pay": "270.17",
"per_mile_revenue": "0.26",
"tags": [{"name": "AUTOBOT"}],
"dispatcher__full_name": "Alice Johnson",
"customer__company_name": "ABC Logistics",
"mc_number__company_name": "Updated Test Mc Number",
"office__office_name": null,
"pickup_appointment_time": "2023-10-08T20:00:00Z",
"delivery_appointment_time": "2023-10-11T23:14:00Z",
"pickup_time": "2023-10-08T20:00:00Z",
"delivery_time": "2023-10-11T23:14:00Z",
"stops": [
{
"id": 101,
"order": 2489,
"stop_type": "pickup",
"location": {
"id": 1348,
"company": "DWA9",
"address1": "3711 142nd Ave E, Sumner, WA 98390, USA",
"city": "Sumner",
"state": "Washington",
"zip_code": "98390",
"latitude": 47.203,
"longitude": -122.229,
"is_active": true
},
"reference_id": "REF-001",
"proof_of_delivery": null
}
],
"is_flagged": false,
"flagging_reason": null,
"documents": [
{
"file_type": "rate_confirmation",
"file_link": "https://storage.example.com/docs/rc-2489.pdf",
"uploaded_by": "Super Admin",
"uploaded_at": "2023-10-11T13:50:00Z"
}
],
"trip": {
"id": 1913,
"status": "assigned",
"trip_id": "TR-002489-01",
"mile": "574.31",
"empty_mile": "0.00",
"total_load_pay": "148.17",
"carrier__name": null,
"driver__full_name": "John Smith",
"team_driver__full_name": null,
"truck__unit_number": "2105",
"pickup": {
"id": 1348,
"company": "DWA9",
"address1": "3711 142nd Ave E",
"city": "Sumner",
"state": "Washington",
"zip_code": "98390",
"latitude": 47.203,
"longitude": -122.229,
"is_active": true
},
"delivery": null,
"settlement": null
},
"batch_orders": null,
"eta_detail": {"on_time": true, "eta_datetime": null}
}
]
}
Filtering
Pass a JSON-encoded array to thefilter query parameter. Each object in the array has three keys:
| Key | Description |
|---|---|
column | ORM field path (e.g. status, load_pay, delivery_time) |
value | The filter value |
contains | Operator (see table below) |
Supported operators
| Operator | Description | Example value |
|---|---|---|
is | Exact match | "booked" |
is_not | Exclude exact match | "cancelled" |
is_in | Match any in list | ["booked","dispatched"] |
is_not_in | Exclude all in list | ["cancelled"] |
contains | Case-insensitive substring | "logistics" |
before | Less than or equal | "2024-07-10T23:59:59Z" |
after | Greater than or equal | "2024-06-26T00:00:00Z" |
greater_than | Greater than or equal (numeric) | "1000" |
less_than | Less than or equal (numeric) | "5000" |
between | Numeric range (comma-separated) | "1000,5000" |
between_datetime | Datetime range (comma-separated ISO) | "2024-06-26T00:00:00Z,2024-07-10T23:59:59Z" |
isnull | Is null check | "true" or "false" |
today | Matches today’s date | (any value) |
exclude | Exclude exact match | "booked" |
exclude_in | Exclude all in list | ["booked","dispatched"] |
Examples
Filter by status:?filter=[{"column":"status","value":"booked","contains":"is"}]
?filter=[{"column":"delivery_time","value":"2024-06-26T00:00:00.000Z,2024-07-10T23:59:59.000Z","contains":"between_datetime"}]
?filter=[{"column":"delivery_time","value":"2024-06-26T00:00:00.000Z","contains":"after"}]
?filter=[{"column":"status","value":"booked","contains":"is"},{"column":"load_pay","value":"1000,5000","contains":"between"}]
Ordering
Use theordering query parameter with an ORM field path. Prefix with - for descending order.
?ordering=-created_datetime
?ordering=load_pay
Authorizations
Query Parameters
Page number for paginated results.
1
Number of results per page (max 25, default 10).
x <= 2510
ORM field path to order by. Prefix with - for descending order (e.g. -created_datetime, load_pay, status).
"-created_datetime"
JSON-encoded array of filter objects. Each object has column (ORM field path), value, and contains (operator). Supported operators: is, is_not, is_in, is_not_in, contains, before, after, greater_than, less_than, between, between_datetime, isnull, today, exclude, exclude_in. Example: [{"column":"status","value":"booked","contains":"is"},{"column":"load_pay","value":"1000,5000","contains":"between"}]
"[{\"column\":\"status\",\"value\":\"booked\",\"contains\":\"is\"}]"