Skip to main content

Thuộc tính hàng hóa

Mô tả​

Cấu hình cột thuộc tính sản phẩm. Các API hỗ trợ:

API​


GET /api/productAttributes​

Danh sách thuộc tính hàng hóa.

GET /api/productAttributes

result là mảng thuộc tính của merchant.

Tên trườngKiểu dữ liệuMô tả
idstringId thuộc tính
namestringTên
descriptionstringMô tả
col_orderintegerThứ tự cột, từ 1 đến 10
col_namestringCột trên hàng hóa: col_1 … col_10
merchant_idstringId merchant
created_atstringThời điểm tạo
created_bystringNgười tạo
updated_atstringThời điểm cập nhật
updated_bystringNgười cập nhật
Response Body
{
"code": 200,
"message": "Success",
"result": [
{
"id": "{uuid}",
"name": "Size",
"description": "Kích cỡ",
"col_order": 1,
"col_name": "col_1",
"merchant_id": "{uuid}",
"created_at": "2026-10-13T09:00:00",
"created_by": "merchant_user",
"updated_at": null,
"updated_by": null
}
]
}

POST /api/productAttributes​

Tạo / cập nhật danh sách thuộc tính (body: mảng object).

Request Body​

Tên trườngKiểu dữ liệuMô tảBắt buộc
[]object[]Mảng thuộc tínhCó
[].idstringId — có thì updateKhông
[].namestringTên (tối đa 50)Có
[].descriptionstringMô tả (tối đa 255)Có
[].col_orderintegerThứ tự cột 1–10Không

POST /api/productAttributes

Request Body
[
{ "name": "Size", "description": "Kích cỡ", "col_order": 1 }
]
Response Body
{
"code": 200,
"message": "Success",
"result": true
}