OVIRO LogoOVIRO
Quản lý nhóm sản phẩmBộ sưu tập sản phẩm

Cập nhật bộ sưu tập

Cập nhật thông tin một bộ sưu tập sản phẩm

Endpoint

PUT /v1/productcollections/:id

Request Body

Gửi các trường cần cập nhật (tương tự API Tạo mới).

TrườngKiểuBắt buộcMô tả
company_idintID công ty
creator_idintID người thao tác
namestringTên bộ sưu tập (duy nhất)
typeintKhôngLoại (1: Auto, 3: Manual)
descriptionstringKhôngMô tả
external_idstringKhôngID tham chiếu ngoài
statusintKhông1 (Active), 3 (Disabled)
avatar_file_id_listarrayKhôngDanh sách ID ảnh đại diện
product_id_listarrayKhôngDanh sách ID sản phẩm (Manual)
auto_ruleobjectKhôngCấu hình rule tự động (Auto)
seo_urlstringKhôngURL SEO (duy nhất)
seo_titlestringKhôngTitle SEO
seo_meta_descriptionstringKhôngMeta Description
seo_meta_keywordstringKhôngMeta Keyword
seo_graph_file_idintKhôngẢnh SEO Graph
seo_canonicalstringKhôngCanonical URL
seo_optionsobjectKhôngTùy chọn SEO

Ví dụ JSON

{
    "company_id": 1,
    "creator_id": 10,
    "name": "Bộ sưu tập mùa đông 2024",
    "type": 3,
    "description": "Cập nhật mô tả mới",
    "external_id": "",
    "status": 1,
    "avatar_file_id_list": [],
    "product_id_list": [101, 102, 105, 200],
    "auto_rule": {},
    "seo_url": "bo-suu-tap-mua-dong-2024",
    "seo_title": "Bộ sưu tập mùa đông",
    "seo_meta_description": "",
    "seo_meta_keyword": "",
    "seo_graph_file_id": 0,
    "seo_canonical": "",
    "seo_options": {}
}

Response Schema

HTTP 200 - OK

Trả về ProductCollection 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_requireTên bộ sưu tập không được để trống
error_name_existedTên bộ sưu tập đã tồn tại
error_seo_url_existedSEO URL đã 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