API Reference

Orders

List and create orders for the authenticated merchant.

GET/api/orders

List orders with pagination and optional search.

Auth: Bearer (user session)

Query

FieldTypeDescription
pagenumberPage number.
limitnumberItems per page.
searchstringSearch term.
POST/api/orders

Create an order with line items.

Auth: Bearer (user session)

Body

FieldTypeDescription
customer_idrequiredstringCustomer id.
total_amountrequirednumberOrder total.
itemsrequiredarrayLine items: product_id, quantity, unit_price, optional variant_* fields.
platformstringSource platform (default direct).
shipping_addressstringShipping address.
payment_methodstringPayment method label.
notesstringInternal notes.
customer_phonestringCustomer phone.

Example request

{
  "customer_id": "uuid",
  "total_amount": 598,
  "platform": "whatsapp",
  "items": [
    { "product_id": "uuid", "quantity": 2, "unit_price": 299 }
  ]
}