Jobs
Search jobs
Run rich filtered searches across jobs using POST /dn/jobs/search. Supports date ranges, status filters, groups, vehicles, and item-level criteria.
POST
/
dn
/
jobs
/
search
Search jobs
curl --request POST \
--url https://app.detrack.com/api/v2/dn/jobs/search \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"data": {
"type": "Delivery",
"dates": {
"from": "2026-09-01",
"to": "2026-09-30"
},
"groups": [
{
"name": "Detrack"
}
]
}
}
'import requests
url = "https://app.detrack.com/api/v2/dn/jobs/search"
payload = { "data": {
"type": "Delivery",
"dates": {
"from": "2026-09-01",
"to": "2026-09-30"
},
"groups": [{ "name": "Detrack" }]
} }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
type: 'Delivery',
dates: {from: '2026-09-01', to: '2026-09-30'},
groups: [{name: 'Detrack'}]
}
})
};
fetch('https://app.detrack.com/api/v2/dn/jobs/search', 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://app.detrack.com/api/v2/dn/jobs/search",
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([
'data' => [
'type' => 'Delivery',
'dates' => [
'from' => '2026-09-01',
'to' => '2026-09-30'
],
'groups' => [
[
'name' => 'Detrack'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.detrack.com/api/v2/dn/jobs/search"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"Delivery\",\n \"dates\": {\n \"from\": \"2026-09-01\",\n \"to\": \"2026-09-30\"\n },\n \"groups\": [\n {\n \"name\": \"Detrack\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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://app.detrack.com/api/v2/dn/jobs/search")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"type\": \"Delivery\",\n \"dates\": {\n \"from\": \"2026-09-01\",\n \"to\": \"2026-09-30\"\n },\n \"groups\": [\n {\n \"name\": \"Detrack\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.detrack.com/api/v2/dn/jobs/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"type\": \"Delivery\",\n \"dates\": {\n \"from\": \"2026-09-01\",\n \"to\": \"2026-09-30\"\n },\n \"groups\": [\n {\n \"name\": \"Detrack\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "5b22055510c92b1a046ece04",
"type": "Delivery",
"do_number": "DO-10001",
"date": "2026-09-15",
"status": "dispatched",
"primary_job_status": "dispatched",
"tracking_status": "Info received",
"attempt": 1,
"detrack_number": "DET2000001",
"tracking_number": "T0",
"order_number": "ORN12345678",
"address": "Singapore 470140",
"postal_code": "470140",
"deliver_to_collect_from": "James Li",
"phone_number": "65432178",
"notify_email": "test@example.com",
"items_count": 2,
"created_at": "2026-09-15T06:04:06.017Z",
"items": [
{
"id": "5b22055510c92b1a046ece05",
"sku": "12345678",
"description": "iPad",
"quantity": 10,
"checked": false
}
],
"milestones": [
{
"status": "info_recv",
"assign_to": null,
"reason": null,
"pod_at": "2026-09-15T06:04:06.017Z",
"created_at": "2026-09-15T06:04:06.017Z",
"user_name": "Simon"
}
]
}
],
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"code": "invalid_json_format"
}{
"code": "invalid_key",
"message": "Invalid key"
}{
"code": "forbidden"
}The search endpoint lets you query jobs with many optional filters, including date ranges, statuses, groups, vehicles, and item-level criteria. Results are paginated and include
links with next and prev URLs for easy navigation through large result sets.
For what status, primary_job_status, and tracking_status mean, see Status fields.
Pagination
Sendpage, limit, and sort as query parameters, for example POST /dn/jobs/search?page=2&limit=50. They aren’t read from inside data. The response includes links.next and links.prev when there are more pages.
For listing jobs without filters, see List jobs. For retrieving a single job by DO number, see Retrieve job.Authorizations
Your Detrack API key, from Integrations > API Key in the dashboard.
Query Parameters
Page number.
Records per page. The API doesn't cap it, but keep it to 100 or fewer.
Comma-separated fields to sort by. Prefix a field with - for descending, for example -created_at. Allowed: do_number, start_date, date, created_at, assign_to, status, job_sequence, job_time, customer. Other fields are ignored.
Body
application/json
Show child attributes
Show child attributes
Search jobs
curl --request POST \
--url https://app.detrack.com/api/v2/dn/jobs/search \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"data": {
"type": "Delivery",
"dates": {
"from": "2026-09-01",
"to": "2026-09-30"
},
"groups": [
{
"name": "Detrack"
}
]
}
}
'import requests
url = "https://app.detrack.com/api/v2/dn/jobs/search"
payload = { "data": {
"type": "Delivery",
"dates": {
"from": "2026-09-01",
"to": "2026-09-30"
},
"groups": [{ "name": "Detrack" }]
} }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
type: 'Delivery',
dates: {from: '2026-09-01', to: '2026-09-30'},
groups: [{name: 'Detrack'}]
}
})
};
fetch('https://app.detrack.com/api/v2/dn/jobs/search', 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://app.detrack.com/api/v2/dn/jobs/search",
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([
'data' => [
'type' => 'Delivery',
'dates' => [
'from' => '2026-09-01',
'to' => '2026-09-30'
],
'groups' => [
[
'name' => 'Detrack'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.detrack.com/api/v2/dn/jobs/search"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"Delivery\",\n \"dates\": {\n \"from\": \"2026-09-01\",\n \"to\": \"2026-09-30\"\n },\n \"groups\": [\n {\n \"name\": \"Detrack\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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://app.detrack.com/api/v2/dn/jobs/search")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"type\": \"Delivery\",\n \"dates\": {\n \"from\": \"2026-09-01\",\n \"to\": \"2026-09-30\"\n },\n \"groups\": [\n {\n \"name\": \"Detrack\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.detrack.com/api/v2/dn/jobs/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"type\": \"Delivery\",\n \"dates\": {\n \"from\": \"2026-09-01\",\n \"to\": \"2026-09-30\"\n },\n \"groups\": [\n {\n \"name\": \"Detrack\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "5b22055510c92b1a046ece04",
"type": "Delivery",
"do_number": "DO-10001",
"date": "2026-09-15",
"status": "dispatched",
"primary_job_status": "dispatched",
"tracking_status": "Info received",
"attempt": 1,
"detrack_number": "DET2000001",
"tracking_number": "T0",
"order_number": "ORN12345678",
"address": "Singapore 470140",
"postal_code": "470140",
"deliver_to_collect_from": "James Li",
"phone_number": "65432178",
"notify_email": "test@example.com",
"items_count": 2,
"created_at": "2026-09-15T06:04:06.017Z",
"items": [
{
"id": "5b22055510c92b1a046ece05",
"sku": "12345678",
"description": "iPad",
"quantity": 10,
"checked": false
}
],
"milestones": [
{
"status": "info_recv",
"assign_to": null,
"reason": null,
"pod_at": "2026-09-15T06:04:06.017Z",
"created_at": "2026-09-15T06:04:06.017Z",
"user_name": "Simon"
}
]
}
],
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"code": "invalid_json_format"
}{
"code": "invalid_key",
"message": "Invalid key"
}{
"code": "forbidden"
}