Skip to main content

Định nghĩa dữ liệu

1. Thông Tin API​

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

2. Tham số Request​

2.1. Fields​

TrườngKiểu dữ liệuMô tả
idintegerĐịnh danh
field_namestringTên trường
field_descriptionstringMô tả trường
field_htmltypestringLoại trường

2.2. Filtering (Lọc dữ liệu)​

TrườngHỗ trợKiểu dữ liệuMô tả
ideq, inintegerĐịnh danh
validis, inintegerHợp lệ hay không

2.3. Sorting (Sắp xếp dữ liệu)​

TrườngHướng
idasc, desc

2.4. Pagination (Phân trang)​

Tham sốKiểu dữ liệuMô tả
limitintegerSố bản ghi cần lấy
offsetintegerSố bản ghi cần bỏ qua

3. Response Mẫu​

{
"data": [
{
"id": 109,
"field_name": "b1",
"field_description": "B1",
"field_htmltype": "textinput"
},
{
"id": 110,
"field_name": "b2",
"field_description": "B2",
"field_htmltype": "textinput"
}
],
"has_more": false,
"offset": 0,
"limited": 20,
"sorted": {
"field_order": "ASC"
}
}

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

TrườngKiểu dữ liệuMô tả
idintegerĐịnh danh trường dữ liệu
field_namestringTên trường (dùng làm key khi truyền custom_fields)
field_descriptionstringMô tả hiển thị của trường
field_htmltypestringLoại trường (textinput, select, datetime, ...)

5. Ghi Chú​

  • API này dùng để lấy danh sách các trường dữ liệu tùy chỉnh (custom fields) của module Báo giá.
  • Giá trị field_name được sử dụng làm key khi truyền custom_fields trong API thêm mới hoặc sửa báo giá.