create order -> upload bill

This commit is contained in:
Phuoc Nguyen
2025-11-24 14:53:48 +07:00
parent 42d91a5a99
commit 354df3ad01
8 changed files with 545 additions and 71 deletions

View File

@@ -227,6 +227,12 @@ class ApiConstants {
/// Returns: { "message": { "qr_code": "...", "amount": null, "transaction_id": "...", "bank_info": {...} } }
static const String generateQrCode = '/building_material.building_material.api.v1.qrcode.generate';
/// Upload file (bill/invoice/attachment) (requires sid and csrf_token)
/// POST /api/method/upload_file
/// Form-data: { "file": File, "is_private": "1", "folder": "Home/Attachments", "doctype": "Sales Order", "docname": "SAL-ORD-2025-00058-1", "optimize": "true" }
/// Returns: { "message": { "file_url": "...", "file_name": "...", ... } }
static const String uploadFile = '/upload_file';
/// Get user's orders
/// GET /orders?status={status}&page={page}&limit={limit}
static const String getOrders = '/orders';