Jobs
Update a job
PUT /dn/jobs/update modifies a single job by its DO number. Provide do_number, optional date and type, and a data object with the fields to change.
PUT
/
dn
/
jobs
/
update
Update a job
curl --request PUT \
--url https://app.detrack.com/api/v2/dn/jobs/update \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"do_number": "DO-10001",
"date": "2026-09-15",
"type": "Delivery",
"data": {
"notify_email": "updated@example.com"
}
}
'import requests
url = "https://app.detrack.com/api/v2/dn/jobs/update"
payload = {
"do_number": "DO-10001",
"date": "2026-09-15",
"type": "Delivery",
"data": { "notify_email": "updated@example.com" }
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
do_number: 'DO-10001',
date: '2026-09-15',
type: 'Delivery',
data: {notify_email: 'updated@example.com'}
})
};
fetch('https://app.detrack.com/api/v2/dn/jobs/update', 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/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'do_number' => 'DO-10001',
'date' => '2026-09-15',
'type' => 'Delivery',
'data' => [
'notify_email' => 'updated@example.com'
]
]),
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/update"
payload := strings.NewReader("{\n \"do_number\": \"DO-10001\",\n \"date\": \"2026-09-15\",\n \"type\": \"Delivery\",\n \"data\": {\n \"notify_email\": \"updated@example.com\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.detrack.com/api/v2/dn/jobs/update")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"do_number\": \"DO-10001\",\n \"date\": \"2026-09-15\",\n \"type\": \"Delivery\",\n \"data\": {\n \"notify_email\": \"updated@example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.detrack.com/api/v2/dn/jobs/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"do_number\": \"DO-10001\",\n \"date\": \"2026-09-15\",\n \"type\": \"Delivery\",\n \"data\": {\n \"notify_email\": \"updated@example.com\"\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"
}
]
}
}{
"code": "invalid_json_format"
}{
"code": "invalid_key",
"message": "Invalid key"
}{
"code": "forbidden"
}{
"code": "not_found",
"message": "Could not find job with this DO number"
}{
"code": "conflict",
"message": "Could not acquire lock for this job"
}{
"code": "validation_failed",
"message": "Validation Failed",
"errors": [
{
"field": "do_number",
"codes": [
"can't be blank"
]
}
]
}Use the Update Job endpoint to modify fields of an existing job. You must provide
do_number to identify the job. You can also supply date and type to narrow the match. Place all fields you want to change inside the data object.
For what status, primary_job_status, and tracking_status mean, see Status fields.
See also Retrieve job, Create job, and Delete job.Authorizations
Your Detrack API key, from Integrations > API Key in the dashboard.
Body
application/json
Response
The updated job.
A delivery or collection job. Only the most-used fields are listed; the API returns more.
Show child attributes
Show child attributes
Update a job
curl --request PUT \
--url https://app.detrack.com/api/v2/dn/jobs/update \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"do_number": "DO-10001",
"date": "2026-09-15",
"type": "Delivery",
"data": {
"notify_email": "updated@example.com"
}
}
'import requests
url = "https://app.detrack.com/api/v2/dn/jobs/update"
payload = {
"do_number": "DO-10001",
"date": "2026-09-15",
"type": "Delivery",
"data": { "notify_email": "updated@example.com" }
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
do_number: 'DO-10001',
date: '2026-09-15',
type: 'Delivery',
data: {notify_email: 'updated@example.com'}
})
};
fetch('https://app.detrack.com/api/v2/dn/jobs/update', 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/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'do_number' => 'DO-10001',
'date' => '2026-09-15',
'type' => 'Delivery',
'data' => [
'notify_email' => 'updated@example.com'
]
]),
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/update"
payload := strings.NewReader("{\n \"do_number\": \"DO-10001\",\n \"date\": \"2026-09-15\",\n \"type\": \"Delivery\",\n \"data\": {\n \"notify_email\": \"updated@example.com\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.detrack.com/api/v2/dn/jobs/update")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"do_number\": \"DO-10001\",\n \"date\": \"2026-09-15\",\n \"type\": \"Delivery\",\n \"data\": {\n \"notify_email\": \"updated@example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.detrack.com/api/v2/dn/jobs/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"do_number\": \"DO-10001\",\n \"date\": \"2026-09-15\",\n \"type\": \"Delivery\",\n \"data\": {\n \"notify_email\": \"updated@example.com\"\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"
}
]
}
}{
"code": "invalid_json_format"
}{
"code": "invalid_key",
"message": "Invalid key"
}{
"code": "forbidden"
}{
"code": "not_found",
"message": "Could not find job with this DO number"
}{
"code": "conflict",
"message": "Could not acquire lock for this job"
}{
"code": "validation_failed",
"message": "Validation Failed",
"errors": [
{
"field": "do_number",
"codes": [
"can't be blank"
]
}
]
}