OVIRO LogoOVIRO
Quản lý nhóm sản phẩmThuộc tính sản phẩm

Cập nhật tùy chọn

Cập nhật thông tin một loại tùy chọn biến thể

Endpoint

PUT /v1/productoptions/:id

Request Body

TrườngKiểuBắt buộcMô tả
company_idintID công ty
creator_idintID người thao tác
namestringTên tùy chọn (Duy nhất)
typeintLoại dữ liệu (1: Color, 3: Text)
display_orderintKhôngThứ tự hiển thị
layout_namestringKhôngTên layout tùy chỉnh
layout_identifierstringKhôngID định danh layout tùy chỉnh
layout_typeintKhôngKiểu hiển thị (1, 3, 5, 7)
layout_hide_disabled_valueintKhông1: Ẩn giá trị không khả dụng

Ví dụ JSON

{
    "company_id": 1,
    "creator_id": 10,
    "name": "Chất liệu cập nhật",
    "type": 3,
    "display_order": 3,
    "layout_name": "Custom Layout",
    "layout_identifier": "custom_layout",
    "layout_type": 5,
    "layout_hide_disabled_value": 1
}

Response Schema

HTTP 200 - OK

Trả về ProductOption Object sau khi cập nhật.

Error Codes

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

Mã lỗiMô tả
error_name_is_requiredTên tùy chọn không được để trống
error_name_existedTên tùy chọn đã tồn tại
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