Orders API
List Orders
GET /ec/v1/orders
Requires admin authentication.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | int | 1 | Page number |
per_page | int | 20 | Items per page |
status | string | — | Filter by status |
customer_id | int | — | Filter by customer |
date_from | string | — | ISO date start |
date_to | string | — | ISO date end |
Response
{
"success": true,
"data": {
"items": [
{
"id": 101,
"order_number": "ORD-00101",
"status": "processing",
"customer": {
"id": 5,
"name": "John Doe",
"email": "john@example.com"
},
"items": [
{
"product_id": 1,
"title": "Product Name",
"quantity": 2,
"price": "29.99",
"total": "59.98"
}
],
"subtotal": "59.98",
"shipping_total": "5.00",
"tax_total": "15.60",
"total": "80.58",
"payment_method": "viva_wallet",
"created_at": "2026-03-01T14:22:00Z"
}
],
"total": 45,
"pages": 3
}
}
Get Single Order
GET /ec/v1/orders/{id}
Returns full order details including items, addresses, payment info, and status history.
Update Order Status
PATCH /ec/v1/orders/{id}
Body
{
"status": "shipped",
"tracking_number": "ACS1234567890",
"note": "Shipped via ACS Express"
}
Customer Orders
GET /ec/v1/orders/my
Returns orders for the currently authenticated customer (no admin required).