OVIRO LogoOVIRO
Quản lý nhóm sản phẩmBộ lọc sản phẩm

Tạo bộ lọc

Tạo mới một bộ lọc trong nhóm

Endpoint

POST /v1/productfilters

Quyền: setting.cms

Request Body

TrườngKiểuBắt buộcMô tả
company_idintID công ty
creator_idintID người tạo
group_idintID nhóm bộ lọc cha
labelstringKhôngNhãn hiển thị
typeintLoại bộ lọc (1, 3, 5, 9, 11, 13, 15, 17, 19)
styleintKiểu hiển thị (1, 3, 5, 7, 9, 11, 13)
object_idintKhôngID tham chiếu (ví dụ ID Attribute Group nếu type=3)
limit_selectionintKhôngGiới hạn số lượng (Mặc định 0)
selection_detailarrayKhôngCấu hình chi tiết
display_orderfloatKhôngThứ tự hiển thị

Ví dụ JSON

{
    "company_id": 1,
    "creator_id": 10,
    "group_id": 10,
    "label": "Màu sắc",
    "type": 3,
    "style": 9,
    "object_id": 5,
    "limit_selection": 0,
    "selection_detail": [],
    "display_order": 2
}

Response Schema

HTTP 201 - Created

Trả về ProductFilter Object vừa tạo.

Error Codes

Lỗi dữ liệu đầu vào. Trả về mảng các mã lỗi:

Mã lỗiMô tả
error_group_id_requiredID nhóm bộ lọc không được để trống
error_group_invalidID nhóm bộ lọc không hợp lệ hoặc không tìm thấy
error_company_id_requiredID công ty không được để trống
error_company_id_notfoundID công ty không tìm thấy
error_user1_id_requiredID người tạo không được để trống
error_user_id_notfoundID người tạo không tìm thấy

On this page