list orders

This commit is contained in:
Phuoc Nguyen
2025-11-24 16:25:54 +07:00
parent 354df3ad01
commit 75d6507719
24 changed files with 1004 additions and 982 deletions

View File

@@ -233,7 +233,19 @@ class ApiConstants {
/// Returns: { "message": { "file_url": "...", "file_name": "...", ... } }
static const String uploadFile = '/upload_file';
/// Get user's orders
/// Get list of orders (requires sid and csrf_token)
/// POST /api/method/building_material.building_material.api.sales_order.get_list
/// Body: { "limit_start": 0, "limit_page_length": 0 }
/// Returns: { "message": [...] }
static const String getOrdersList = '/building_material.building_material.api.sales_order.get_list';
/// Get order details (requires sid and csrf_token)
/// POST /api/method/building_material.building_material.api.sales_order.get_detail
/// Body: { "name": "SAL-ORD-2025-00058-1" }
/// Returns: { "message": {...} }
static const String getOrderDetail = '/building_material.building_material.api.sales_order.get_detail';
/// Get user's orders (legacy endpoint - may be deprecated)
/// GET /orders?status={status}&page={page}&limit={limit}
static const String getOrders = '/orders';