Update Order
PUT
Updates an order’s status. Use this to mark orders as shipped, delivered, completed, cancelled, or refunded.
/orders/Authentication
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer YOUR_API_TOKEN | Yes |
Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The order ID |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
status | integer | No | New status code (1-6) |
Status Codes
| Code | Status |
|---|---|
1 | Awaiting Payment |
2 | Under Review |
3 | In Progress |
4 | Completed |
5 | Cancelled |
6 | Refunded |
Example Request
curl -X PUT "https://merchant-api.rmz.gg/shawarma/orders/78901" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status": 3}'
const response = await fetch("https://merchant-api.rmz.gg/shawarma/orders/78901", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({ status: 3 })
});
const data = await response.json();
import requests
response = requests.put(
"https://merchant-api.rmz.gg/shawarma/orders/78901",
headers={
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
},
json={"status": 3}
)
data = response.json()
$ch = curl_init("https://merchant-api.rmz.gg/shawarma/orders/78901");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_API_TOKEN",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["status" => 3]));
$response = json_decode(curl_exec($ch), true);
Success Response
{
"message": "Order Has Been Updates",
"data": null,
"api": "rmz.shawarma",
"timestamp": 1699999999
}
Error Responses
| Code | Description |
|---|---|
400 | Invalid status transition |
401 | Unauthorized — invalid or missing token |
404 | Order not found |
422 | Validation error — invalid status value |

