Skip to main content

Chi tiết báo giá

1. Thông Tin API

  • Endpoint: /api/v6.1/quote
  • Method: GET
  • Authentication: Yêu cầu X-API-KEY
  • Header:
    • X-API-KEY: <your_api_key>

2. Tham Số Request

Tham sốLoạiMô tả
fieldsstringDanh sách các trường dữ liệu cần lấy
quote_idintegerĐịnh danh báo giá cần truy vấn
quote_codestringMã báo giá cần truy vấn

Ví dụ request:

curl --location 'https://example.com/api/v6.1/quote?fields=id,quote_code,status&quote_id=66' \
--header 'X-API-KEY: YOUR_API_KEY'

3. Response

{
"id": 66,
"quote_code": "BG090720251",
"quote_date": "2025-07-09",
"end_date": "2025-07-10",
"status": 1,
"status_title": "Chờ duyệt",
"account_id": 1595,
"account_name": "Khách hàng ABC",
"account_address": "Hà Nội",
"contact_id": 1758,
"contact_name": "Liên hệ A",
"assigned_user": 1551,
"assigned_user_name": "Nhân viên A",
"quote_details": [
{
"product_id": 279,
"product_code": "SP101",
"product_name": "SP101",
"quantity": 2,
"price": 15000,
"discount": 10,
"discount_amount": 1000,
"vat": 10,
"amount": 30000
}
],
"after_vat": 0,
"discount": 10,
"discount_amount": 3300,
"vat": 10,
"vat_amount": 2970,
"amount": 30000,
"custom_fields": {}
}

4. Mô Tả Trường Dữ Liệu

4.1. Thông tin báo giá

TrườngKiểu dữ liệuMô tả
idintegerĐịnh danh
quote_codestringMã báo giá
quote_datestringNgày tạo báo giá
end_datestringNgày kết thúc
quote_numbernumericLần báo giá
project_namestringDự án
project_addressstringĐịa chỉ dự án
descriptionstringMô tả
notestringNội dung báo giá
statusnumericTrạng thái
status_titlestringTên trạng thái
amountnumericTổng tiền
created_atstringThời gian tạo
updated_atstringThời gian cập nhật
is_expirednumericĐánh dấu đã hết hạn hay chưa

4.2. Thông tin người dùng

TrườngKiểu dữ liệuMô tả
user_idnumeric/nullId người tạo
user_namestringTên người tạo
assigned_usernumericId người thực hiện
assigned_user_namestringTên người thực hiện
assigned_user_emailstringEmail người thực hiện
assigned_user_phonestringSố điện thoại người thực hiện
approval_usernumeric/nullId người duyệt
approval_user_namestringTên người duyệt

4.3. Thông tin khách hàng

TrườngKiểu dữ liệuMô tả
account_idnumericId khách hàng
account_codestringMã khách hàng
account_namestringTên khách hàng
account_managernumeric/nullId người phụ trách khách hàng
account_addressstringĐịa chỉ khách hàng
account_phonestringSố điện thoại khách hàng
contact_idnumericId liên hệ khách hàng
contact_namestringTên liên hệ khách hàng
contact_emailstringEmail liên hệ khách hàng

4.4. Thông tin sản phẩm (quote_details)

TrườngKiểu dữ liệuMô tả
quote_details.*.product_idintegerĐịnh danh sản phẩm
quote_details.*.product_codestringMã sản phẩm
quote_details.*.product_namestringTên sản phẩm
quote_details.*.descriptionstringMô tả sản phẩm
quote_details.*.unit_idnumeric/nullId đơn vị tính
quote_details.*.unit_namestringTên đơn vị tính
quote_details.*.quantitynumericSố lượng
quote_details.*.pricenumericĐơn giá
quote_details.*.discountnumericChiết khấu sản phẩm (%)
quote_details.*.discount_amountnumericChiết khấu sản phẩm ($)
quote_details.*.vatnumericVAT sản phẩm (%)
quote_details.*.vat_amountnumericVAT sản phẩm ($)
quote_details.*.amountnumericThành tiền
quote_details.*.product_imagestringẢnh sản phẩm
quote_details.*.variantsarrayBiến thể của sản phẩm
quote_details.*.itemsarrayDanh sách phụ kiện đi kèm

4.5. Thông tin tài chính

TrườngKiểu dữ liệuMô tả
after_vatenum (0,1)Chiết khấu trước/sau thuế
discountnumericChiết khấu báo giá (%)
discount_amountnumericChiết khấu báo giá ($)
vatnumericVAT báo giá (%)
vat_amountnumericVAT báo giá ($)
service_charge_after_vatenum (0,1)Phí dịch vụ trước/sau thuế
transportnumericPhí vận chuyển (%)
transport_amountnumericPhí vận chuyển ($)
installation_charge_after_discountenum (0,1)Phí lắp đặt trước/sau thuế
installationnumericPhí lắp đặt (%)
installation_amountnumericPhí lắp đặt ($)
payment_periodsarrayDanh sách kỳ thanh toán của báo giá
custom_fieldsobjectThông tin định nghĩa dữ liệu
attachmentsarrayTài liệu đính kèm

5. Ghi Chú

  • API trả về chi tiết một báo giá dựa trên một trong hai: quote_id hoặc quote_code (không gửi đồng thời).
  • Trường custom_fields chứa các dữ liệu tùy chỉnh của báo giá.