Orders
Update order status
Moves the order exactly as the merchant would from the dashboard — stock, history and customer notices included.
PATCH
https://elmatajer.com/api/v1/vendor/orders/{id}/statusPermission:
orders.writePath parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The order id. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
status | string | Yes | pending, processing, shipped, delivered, cancelled or returned.
|
Request
curl -X PATCH "https://elmatajer.com/api/v1/vendor/orders/4904/status" \
-H "Api-Key: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"status":"shipped"}'
const res = await fetch("https://elmatajer.com/api/v1/vendor/orders/4904/status", {
method: "PATCH",
headers: {
"Api-Key": process.env.ELMATAJER_API_KEY,
"Accept": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify({
"status": "shipped"
})
});
const data = await res.json();
$ch = curl_init("https://elmatajer.com/api/v1/vendor/orders/4904/status");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Api-Key: " . getenv('ELMATAJER_API_KEY'), "Accept: application/json", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'status' => 'shipped'
]),
]);
$data = json_decode(curl_exec($ch), true);
Response 200
{
"status": "ok",
"data": {
"id": 4904,
"order_number": "IOY539",
"status": 3,
"status_type": 3,
"status_label": "Shipped",
"payment_status": 1,
"payment_type": 1,
"order_type": 1,
"customer": {
"name": "Mona Adel",
"email": "mona@example.com",
"mobile": "+201012345678"
},
"address": {
"line": "12 Tahrir St, Dokki",
"building": "Building 4, flat 2",
"landmark": "Next to the pharmacy"
},
"totals": {
"sub_total": 120,
"delivery_charge": 30,
"discount_amount": 0,
"tips": 0,
"grand_total": 150,
"currency": "EGP",
"currency_code": "EGP"
},
"items_count": 1,
"items": [
{
"id": 3038,
"item_id": 22511,
"name": "Building blocks set",
"image": "https://cdn.elmatajer.com/…/blocks.webp",
"sku": "BLK-01",
"qty": 1,
"price": 120,
"variant": null,
"extras": null,
"line_total": 120
}
],
"notes": null,
"created_at": "2026-11-03T18:00:16+02:00"
}
}
Only the next allowed steps are accepted — anything else answers 422 status_not_changed with the reason (the order's next_steps lists them):
| From | Can move to |
|---|---|
pending |
processing, cancelled |
processing |
shipped, cancelled, back to pending |
shipped |
delivered, returned |
delivered |
returned |
cancelled |
pending (reopen) |
returned |
— (final) |
Cash on delivery is marked paid on delivered. A connected shipping carrier moves the order by itself (picked up → shipped, delivered → delivered, returned → returned).