Update Order Status (Admin)
Update the status of an order by an admin. Status progression: "4" → "5" → "6".
Endpoint
Authentication
Required (Admin role)
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | Order ID |
Request Body
No body required. Status is automatically advanced to the next stage.
Response
Success (200 OK)
Returns the updated order:
{
"id": 1,
"user_id": 5,
"store_id": 3,
"product_variant_id": 10,
"quantity": 2,
"price": 75.00,
"currency_name": "AZN",
"payment_status": "1",
"status": "5",
"user": {...},
"store": {...},
"address": {...},
"product_variant": {...},
"created": "2025-01-15T10:30:00Z"
}
Error Responses
Order Not Found (404)
Missing ID Parameter (400)
Example Request
curl -X PUT "https://api.luxmart.site/v1/products/order/admin/?id=1" \
-H "Authorization: Token your_access_token"
Notes
- Order must have successful payment (
payment_status: "1") - Status progression:
- "4" (Shipped) → "5" (Delivered)
- "5" (Delivered) → "6" (Completed)
- Only orders with status "4" or "5" can be updated by admin
- Status "6" is the final status and cannot be changed