Chi tiết đơn hàng
Lấy chi tiết đơn hàng
HTTP Request
[GET] /api/v6/sale_orders/{id}
Query Parameters
Fields
| Fields | Type | Description |
|---|---|---|
| id | integer | Định danh |
| order_code | string | Mã đơn hàng |
| real_amount | numeric | Tổng tiền đơn hàng |
| f_amount | numeric | Tổng tiền đã thanh toán |
| discount | numeric | Giảm giá phần trăm |
| discount_amount | numeric | Giảm giá tiền mặt |
| vat_amount | numeric | VAT tiền mặt |
| account_id | integer | Định danh khách hàng |
| account_code | string | Mã khách hàng |
| account_email | string | Email khách hàng |
| account_phone | numeric | Số điện thoại khách hàng |
| account_address | string | Địa chỉ khách hàng |
| contact_name | string | Tên liên hệ |
| contact_phone | string | Số điện thoại liên hệ |
| contact_email | string | Email liên hệ |
| order_date | string | Ngày đặt hàng định dạng (Y-m-d) |
| created_at | string | Ngày tạo định dạng (Y-m-d H:i:s) |
| updated_at | string | Ngày sửa định dạng (Y-m-d H:i:s) |
| status | integer | Trạng thái |
| status_label | string | Tên trạng thái |
| store_id | integer | Định danh kho |
| assigned_user | integer | Người thực hiện |
| assigned_user_name | string | Tên người thực hiện |
| payment_status | string | Trạng thái thanh toán (bắt buộc truyền thêm has_pay_off) |
| order_details | array | Thông tin sản phẩm trong đơn hàng |
| order_details.*.product_id | integer | Định danh sản phẩm |
| order_details.*.product_code | string | Mã sản phẩm |
| order_details.*.product_name | string | Tên sản phẩm |
| order_details.*.note | string | Mô tả sản phẩm |
| order_details.*.product_sale_off | numeric | Giảm giá sản phẩm |
| order_details.*.cash_discount | numeric | Giảm giá tiền mặt |
| order_details.*.price | numeric | Giá sản phẩm |
| order_details.*.quantity | numeric | Số lượng sản phẩm |
| order_details.*.vat | numeric | Vat sản phẩm (%) |
| order_details.*.vat_amount | numeric | Vat sản phẩm (cash) |
| custom_fields | object | Thông tin định nghĩa dữ liệu |
Example
HTTP Request
GET api/v6/sale_orders/4?fields=product_name HTTP/1.1
Host: example.getflycrm.com
Authorization: Bearer token
Status
200 OK
Response
{
"id": 4,
"order_code": "ORDER_CODE"
}