Skip to main content
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,
  "cod": [
    [
      "<string>"
    ]
  ],
  "number_of_packages": 123,
  "description": "<string>",
  "notes": "<string>",
  "return_reason": "<string>"
}
'
{
  "order_id": "179",
  "reference_id": "123",
  "is_exchange": "false",
  "workflow": "STANDARD",
  "tracking_link": "https://prod.parceltracer.app/tracking/xxxxxxx-yyyyyy",
  "is_critical": "true",
  "merchant_location": 1,
  "cod": [
    [
      "LBP",
      "2000.00"
    ],
    [
      "USD",
      "50.50"
    ]
  ],
  "number_of_packages": 1,
  "description": "",
  "notes": "",
  "return_reason": "",
  "delivery_state": "CREATED",
  "payment_state": "UNPAID",
  "merchant_invoice": null,
  "customer": {
    "id": 9707,
    "name": "Joelle",
    "phone_number": "+96131234567",
    "secondary_phone_number": null,
    "email": ""
  },
  "customer_location": {
    "id": 9689,
    "area": {
      "id": 55,
      "name_en": "Balde",
      "name_ar": "بلدي",
      "lat": 34.56076,
      "long": 36.14491,
      "district": "Akkar",
      "maps_link": "http://maps.google.com/maps?q=34.56076,36.14491"
    },
    "directions": ""
  }
}

Authorizations

X-Api-Key
string
header
required

Path Parameters

order_id
integer
required

Body

reference_id
string

Reference ID of the order, for internal tracking by the shop.

is_critical
boolean

Mark the order as critical for prioritized handling.

cod
string[][]

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 elements
number_of_packages
integer

Number of packages in the order.

description
string

Optional description of the order contents.

notes
string

Customer-visible notes about the order.

return_reason
string

Applicable if the order is a return. Reason for the return.

Response

Successful patch

order_id
string | null
required
resolved_customer
object
required
resolved_customer_location
object
required
merchant_location
integer
required
delivery_fee
string[][]
required

Delivery fees charged on the delivery operation. Irrelevant in case of RETURN orders.

Required array length: 2 elements
delivery_state
enum<string>
required
  • CREATED - Created
  • PICKUP_REQUESTED - Pickup Requested
  • PICKUP_ASSIGNED - Pickup Assigned
  • SCANNED_FOR_PICKUP - Scanned for Pickup
  • PICKED_UP - Picked Up
  • AT_WAREHOUSE - At Warehouse
  • DELIVERY_ASSIGNED - Delivery Assigned
  • SCANNED_FOR_DELIVERY - Scanned For Delivery
  • PICKED_UP_FOR_DELIVERY - Picked Up For Delivery
  • IN_TRANSIT - In Transit
  • DELIVERED - Delivered
  • AWAITING_RETURN - Awaiting Return
  • CANCELLED - Cancelled
  • DELIVERED_AT_WAREHOUSE - Delivered At Warehouse
Available options:
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
payment_state
string
required
merchant_invoice
integer | null
required
reference_id
string
Maximum string length: 40
is_exchange
boolean
workflow
enum<string>
  • STANDARD - Standard
  • RETURN - Return
Available options:
STANDARD,
RETURN
is_critical
boolean
cod
string[][]

Total amount to be collected upon delivery. Example: [['USD', '123.5']]

Required array length: 2 elements
number_of_packages
integer
Required range: 1 <= x <= 99
description
string
Maximum string length: 300
notes
string
return_reason
string
Maximum string length: 300