HomeUser GuidesAPI Reference
Get Started
HomeAPI Reference
Authentication
Branches
Contact Groups
Contacts
Conversations
Error HandlingInvoices
Messages
Orders
Rate LimitingSDKs & Code ExamplesTemplatesTicketsAPI VersioningWABA NumbersWebhooks
User GuideAPI ReferenceGet OrderUpdate Order

Update Order

Update order status and information

Reading time: 1 minute

Update Order

Update order status and information.

PUT{{base_url}}/orders/{id}

Path Parameters

ParameterTypeRequiredDescription
idintegerYesOrder ID

Query Parameters

ParameterTypeRequiredDescription
phone_number_idstringYesPhone number ID of the sender

Request Body (JSON)

ParameterTypeRequiredDescriptionDefault
admin_notesstringNoCustom admin notes-
statusstringNoNew order status-
payment_statusstringNoPayment status: paid or unpaidunpaid
shipping_datestringNoShipping date (YYYY-MM-DD)-
delivery_datestringNoDelivery date (YYYY-MM-DD)-
branch_idstringNoBranch ID-

Status Update: You can update order status progressively (pending → accepted → shipped → delivered → completed).

Example Request

Example Requestbash
curl -X PUT "{{base_url}}/orders/1?phone_number_id=123456" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Awal-Signature-256: sha256=abc..." \
-H "X-Timestamp: 1704124800" \
-H "X-Domain: your-workspace" \
-H "X-Client-ID: your-client-id" \
-d '{
  "admin_notes": "Shipped via express courier",
  "status": "shipped",
  "payment_status": "paid",
  "shipping_date": "2024-01-20",
  "delivery_date": "2024-01-25",
  "branch_id": "1"
}'

Example Response

Response200 OK
{
"status": true,
"message": "Order updated successfully",
"data": {
  "id": 1,
  "order_number": "ORD-2024-001",
  "status": "shipped",
  "payment_status": "paid",
  "shipping_date": "2024-01-20",
  "delivery_date": "2024-01-25",
  "admin_notes": "Shipped via express courier",
  "updated_at": "2024-01-20T14:30:00Z"
}
}

Use Cases

Track Order from Start to Finish

// 1. Accept order
await updateOrder(orderId, {
  status: "accepted",
  payment_status: "paid"
});
 
// 2. Ship order
await updateOrder(orderId, {
  status: "shipped",
  shipping_date: "2024-01-20"
});
 
// 3. Deliver order
await updateOrder(orderId, {
  status: "delivered",
  delivery_date: "2024-01-25"
});
 
// 4. Complete order
await updateOrder(orderId, {
  status: "completed"
});

Filter Orders by Status

# Pending orders
GET /orders?status=pending&phone_number_id=123456
 
# Shipped orders
GET /orders?status=shipped&phone_number_id=123456
 
# Completed orders
GET /orders?status=completed&phone_number_id=123456

Error Codes

CodeDescriptionCauseSolution
400Bad RequestInvalid dataCheck sent data
404Not FoundOrder not foundCheck order ID
422Validation ErrorValidation errorReview error message

Related

← Back to Orders
View Guide
View