Skip to main content

Orders API

List Orders

GET /ec/v1/orders

Requires admin authentication.

Parameters

ParameterTypeDefaultDescription
pageint1Page number
per_pageint20Items per page
statusstringFilter by status
customer_idintFilter by customer
date_fromstringISO date start
date_tostringISO 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).