Update Order
curl --request PATCH \
--url https://api.parceltracer.com/v1/external/orders/{order_id}/ \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"reference_id": "<string>",
"is_critical": true,
"is_exchange": true,
"cod": [
[
"<string>"
]
],
"number_of_packages": 123,
"description": "<string>",
"notes": "<string>",
"brand": "<string>",
"return_reason": "<string>"
}
'import requests
url = "https://api.parceltracer.com/v1/external/orders/{order_id}/"
payload = {
"reference_id": "<string>",
"is_critical": True,
"is_exchange": True,
"cod": [["<string>"]],
"number_of_packages": 123,
"description": "<string>",
"notes": "<string>",
"brand": "<string>",
"return_reason": "<string>"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference_id: '<string>',
is_critical: true,
is_exchange: true,
cod: [['<string>']],
number_of_packages: 123,
description: '<string>',
notes: '<string>',
brand: '<string>',
return_reason: '<string>'
})
};
fetch('https://api.parceltracer.com/v1/external/orders/{order_id}/', 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.parceltracer.com/v1/external/orders/{order_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'reference_id' => '<string>',
'is_critical' => true,
'is_exchange' => true,
'cod' => [
[
'<string>'
]
],
'number_of_packages' => 123,
'description' => '<string>',
'notes' => '<string>',
'brand' => '<string>',
'return_reason' => '<string>'
]),
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://api.parceltracer.com/v1/external/orders/{order_id}/"
payload := strings.NewReader("{\n \"reference_id\": \"<string>\",\n \"is_critical\": true,\n \"is_exchange\": true,\n \"cod\": [\n [\n \"<string>\"\n ]\n ],\n \"number_of_packages\": 123,\n \"description\": \"<string>\",\n \"notes\": \"<string>\",\n \"brand\": \"<string>\",\n \"return_reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.parceltracer.com/v1/external/orders/{order_id}/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reference_id\": \"<string>\",\n \"is_critical\": true,\n \"is_exchange\": true,\n \"cod\": [\n [\n \"<string>\"\n ]\n ],\n \"number_of_packages\": 123,\n \"description\": \"<string>\",\n \"notes\": \"<string>\",\n \"brand\": \"<string>\",\n \"return_reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parceltracer.com/v1/external/orders/{order_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reference_id\": \"<string>\",\n \"is_critical\": true,\n \"is_exchange\": true,\n \"cod\": [\n [\n \"<string>\"\n ]\n ],\n \"number_of_packages\": 123,\n \"description\": \"<string>\",\n \"notes\": \"<string>\",\n \"brand\": \"<string>\",\n \"return_reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"order_id": "179",
"reference_id": "123",
"is_exchange": false,
"workflow": "STANDARD",
"tracking_link": "https://prod.parceltracer.app/tracking/9kQz2Lp4x",
"order_url": "https://acme.parceltracer.app/order/79",
"is_critical": true,
"merchant_location": 1,
"cod": [
[
"LBP",
"2000000.00"
],
[
"USD",
"50.50"
]
],
"delivery_fee": [
[
"USD",
"3.00"
]
],
"number_of_packages": 1,
"description": "2x T-Shirt (Size: M)",
"notes": "",
"return_reason": "",
"delivery_state": "CREATED",
"payment_state": "UNPAID",
"merchant_invoice": null,
"integration_items": [
{
"name": "T-Shirt (Size: M)",
"quantity": 2,
"price": "19.99",
"currency": "USD",
"image_url": "https://shop.example.com/img/tshirt.png",
"source_url": "https://shop.example.com/products/tshirt"
}
],
"source_url": "https://shop.example.com/orders/1042",
"statestamps": [
{
"delivery_state": "CREATED",
"payment_state": "UNPAID",
"timestamp": "2026-07-22T23:02:34.268588+03:00"
}
],
"customer": {
"id": 9707,
"name": "Joelle",
"phone_number": "+96131234567",
"secondary_phone_number": null,
"email": ""
},
"customer_location": {
"id": 9689,
"area": {
"id": 55,
"name_ar": "بلدي",
"name_en": "Balde",
"district": "Akkar",
"lat": "34.560760000000000",
"long": "36.144910000000000",
"maps_link": "http://maps.google.com/maps?q=34.56076,36.14491",
"code": "LBN0055",
"is_external": false,
"area_group": null
},
"directions": ""
}
}{
"error": "true",
"message": "Validation failed.",
"details": "workflow: \"STANDARDS\" is not a valid choice."
}{
"error": "true",
"message": "Resource not found.",
"details": "detail: Not found."
}{
"error": "true",
"message": "Unexpected error.",
"details": "Internal server error"
}Orders
Update Order
Update specific fields of an existing order.
Modifiable fields:
reference_idis_criticalis_exchange(only when the order’s workflow isSTANDARD)codnumber_of_packagesdescriptionnotesreturn_reason
Important:
- You cannot modify the order once it reaches a terminal state:
DELIVERED,DELIVERED_AT_WAREHOUSE, orCANCELLED. - Attempts to update any other fields will result in a 400 error.
PATCH
/
orders
/
{order_id}
/
Update Order
curl --request PATCH \
--url https://api.parceltracer.com/v1/external/orders/{order_id}/ \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"reference_id": "<string>",
"is_critical": true,
"is_exchange": true,
"cod": [
[
"<string>"
]
],
"number_of_packages": 123,
"description": "<string>",
"notes": "<string>",
"brand": "<string>",
"return_reason": "<string>"
}
'import requests
url = "https://api.parceltracer.com/v1/external/orders/{order_id}/"
payload = {
"reference_id": "<string>",
"is_critical": True,
"is_exchange": True,
"cod": [["<string>"]],
"number_of_packages": 123,
"description": "<string>",
"notes": "<string>",
"brand": "<string>",
"return_reason": "<string>"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference_id: '<string>',
is_critical: true,
is_exchange: true,
cod: [['<string>']],
number_of_packages: 123,
description: '<string>',
notes: '<string>',
brand: '<string>',
return_reason: '<string>'
})
};
fetch('https://api.parceltracer.com/v1/external/orders/{order_id}/', 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.parceltracer.com/v1/external/orders/{order_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'reference_id' => '<string>',
'is_critical' => true,
'is_exchange' => true,
'cod' => [
[
'<string>'
]
],
'number_of_packages' => 123,
'description' => '<string>',
'notes' => '<string>',
'brand' => '<string>',
'return_reason' => '<string>'
]),
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://api.parceltracer.com/v1/external/orders/{order_id}/"
payload := strings.NewReader("{\n \"reference_id\": \"<string>\",\n \"is_critical\": true,\n \"is_exchange\": true,\n \"cod\": [\n [\n \"<string>\"\n ]\n ],\n \"number_of_packages\": 123,\n \"description\": \"<string>\",\n \"notes\": \"<string>\",\n \"brand\": \"<string>\",\n \"return_reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.parceltracer.com/v1/external/orders/{order_id}/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reference_id\": \"<string>\",\n \"is_critical\": true,\n \"is_exchange\": true,\n \"cod\": [\n [\n \"<string>\"\n ]\n ],\n \"number_of_packages\": 123,\n \"description\": \"<string>\",\n \"notes\": \"<string>\",\n \"brand\": \"<string>\",\n \"return_reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parceltracer.com/v1/external/orders/{order_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reference_id\": \"<string>\",\n \"is_critical\": true,\n \"is_exchange\": true,\n \"cod\": [\n [\n \"<string>\"\n ]\n ],\n \"number_of_packages\": 123,\n \"description\": \"<string>\",\n \"notes\": \"<string>\",\n \"brand\": \"<string>\",\n \"return_reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"order_id": "179",
"reference_id": "123",
"is_exchange": false,
"workflow": "STANDARD",
"tracking_link": "https://prod.parceltracer.app/tracking/9kQz2Lp4x",
"order_url": "https://acme.parceltracer.app/order/79",
"is_critical": true,
"merchant_location": 1,
"cod": [
[
"LBP",
"2000000.00"
],
[
"USD",
"50.50"
]
],
"delivery_fee": [
[
"USD",
"3.00"
]
],
"number_of_packages": 1,
"description": "2x T-Shirt (Size: M)",
"notes": "",
"return_reason": "",
"delivery_state": "CREATED",
"payment_state": "UNPAID",
"merchant_invoice": null,
"integration_items": [
{
"name": "T-Shirt (Size: M)",
"quantity": 2,
"price": "19.99",
"currency": "USD",
"image_url": "https://shop.example.com/img/tshirt.png",
"source_url": "https://shop.example.com/products/tshirt"
}
],
"source_url": "https://shop.example.com/orders/1042",
"statestamps": [
{
"delivery_state": "CREATED",
"payment_state": "UNPAID",
"timestamp": "2026-07-22T23:02:34.268588+03:00"
}
],
"customer": {
"id": 9707,
"name": "Joelle",
"phone_number": "+96131234567",
"secondary_phone_number": null,
"email": ""
},
"customer_location": {
"id": 9689,
"area": {
"id": 55,
"name_ar": "بلدي",
"name_en": "Balde",
"district": "Akkar",
"lat": "34.560760000000000",
"long": "36.144910000000000",
"maps_link": "http://maps.google.com/maps?q=34.56076,36.14491",
"code": "LBN0055",
"is_external": false,
"area_group": null
},
"directions": ""
}
}{
"error": "true",
"message": "Validation failed.",
"details": "workflow: \"STANDARDS\" is not a valid choice."
}{
"error": "true",
"message": "Resource not found.",
"details": "detail: Not found."
}{
"error": "true",
"message": "Unexpected error.",
"details": "Internal server error"
}Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Cash-on-delivery amount to collect upon delivery in case of STANDARD delivery, or to be paid by shop on return for RETURN orders.Format: [['USD', '123.5']].
Can only be modified if:
- Workflow is 'STANDARD', or
- Workflow is 'RETURN' and the delivery state is 'CREATED'.
Required array length:
2 elementsResponse
Successful patch
Payment state of the order.
UNPAID- UNPAIDPENDING_PAYMENT_BY_DRIVER- PENDING_PAYMENT_BY_DRIVERPAID_BY_DRIVER- PAID_BY_DRIVERPENDING_PAYMENT_TO_MERCHANT- PENDING_PAYMENT_TO_MERCHANTPAID_TO_MERCHANT- PAID_TO_MERCHANT
Available options:
UNPAID, PENDING_PAYMENT_BY_DRIVER, PAID_BY_DRIVER, PENDING_PAYMENT_TO_MERCHANT, PAID_TO_MERCHANT Current delivery state of the order. One of: CREATED, PICKUP_REQUESTED, PICKUP_ASSIGNED, SCANNED_FOR_PICKUP, PICKED_UP, AT_WAREHOUSE, DELIVERY_ASSIGNED, SCANNED_FOR_DELIVERY, PICKED_UP_FOR_DELIVERY, IN_TRANSIT, DELIVERED, AWAITING_RETURN, CANCELLED, DELIVERED_AT_WAREHOUSE.
