Orders API
Handle checkout flows, manage order history, and control payment state transitions.
POST
/client/v1/ordersCreate Order
Initiate a new purchase. Requires authenticated user session.
Request BodyJSON
itemsRequired · Array
List of product variant IDs and quantities.
shipping_address_idRequired · String
ID of the customer's saved address.
gatewayRequired · String
Payment gateway code (e.g., cod, zalopay).
GET
/client/v1/orders/:idOrder Detail
Track order status, items, and payment information.
Request BodyJSON
idRequired · String
The 10-digit numeric ID of the order.
POST
/client/v1/orders/cancelCancel Order
Request cancellation of an order. Only allowed for 'draft' or 'open' orders.
Request BodyJSON
idRequired · String
The 10-digit numeric ID of the order.
reasonOptional · String
Optional reason for cancellation.