Orders
List and create orders for the authenticated merchant.
GET
/api/ordersList orders with pagination and optional search.
Auth: Bearer (user session)
Query
| Field | Type | Description |
|---|---|---|
page | number | Page number. |
limit | number | Items per page. |
search | string | Search term. |
POST
/api/ordersCreate an order with line items.
Auth: Bearer (user session)
Body
| Field | Type | Description |
|---|---|---|
customer_idrequired | string | Customer id. |
total_amountrequired | number | Order total. |
itemsrequired | array | Line items: product_id, quantity, unit_price, optional variant_* fields. |
platform | string | Source platform (default direct). |
shipping_address | string | Shipping address. |
payment_method | string | Payment method label. |
notes | string | Internal notes. |
customer_phone | string | Customer phone. |
Example request
{
"customer_id": "uuid",
"total_amount": 598,
"platform": "whatsapp",
"items": [
{ "product_id": "uuid", "quantity": 2, "unit_price": 299 }
]
}