Quản lý sản phẩm (PIM)Biến thể sản phẩm

Product Variant Object

Cấu trúc đối tượng biến thể sản phẩm.

Schema

{
  "company_id": 1,
  "creator_id": 1,
  "id": 101,
  "product_id": 10,
  "sku": "IP15-BLUE-256",
  "barcode": "8930000000017",
  "display_name": "iPhone 15 - Xanh - 256GB",
  "note": "",
  "compare_price": 27000000,
  "min_stock": 0,
  "is_serial_tracked": 0,
  "length": 0,
  "width": 0,
  "height": 0,
  "weight": 200,
  "uuid": "uuid-string",
  "option_values": [
    {
       "option_id": 1,
       "value_id": 5
       // ...
    }
  ],
  "external_id": "EXT-VAR-001",
  "price": 25000000,
  "price_by_uom": [
    {
      "uom_id": 0, // 0 = Base Unit
      "value": 25000000,
      "min_quantity": 0
    },
    {
      "uom_id": 2, // Box
      "value": 24500000,
      "min_quantity": 10
    }
  ],
  "photo_gallery_file_id_list": [501, 502],
  "photo_gallery_file_list": [
    {
      "id": 501,
      "url": "https://example.com/variant-blue.jpg"
      // ... File Object
    }
  ],
  "combo_data": [],
  "is_bom_kit": 0,
  "bom": [],
  "display_order": 1,
  "status": 3,
  "date_created": 1600000000,
  "date_modified": 1600000000,
  "price_by_policy": [] 
}

Field Descriptions

Tên trườngKiểu dữ liệuMô tả
idintegerID biến thể
product_idintegerID sản phẩm cha
skustringMã SKU
barcodestringMã vạch
display_namestringTên hiển thị của biến thể
notestringGhi chú
compare_priceintegerGiá so sánh (giá gốc trước giảm, VNĐ)
min_stockintegerTồn kho tối thiểu
is_serial_trackedintegerQuản lý theo số serial (1: Có, 0: Không)
length, width, height, weightintegerKích thước và cân nặng
uuidstringMã UUID của biến thể
external_idstringMã đồng bộ từ hệ thống ngoài
priceintegerGiá cơ bản (VNĐ)
price_by_uomarrayGiá theo đơn vị tính (UOM)
option_valuesarrayGiá trị thuộc tính cấu thành biến thể (Màu, Size...)
photo_gallery_file_id_listarrayDanh sách ID hình ảnh của biến thể
photo_gallery_file_listarrayDanh sách hình ảnh của biến thể
combo_dataarrayDữ liệu combo (nếu có)
is_bom_kitintegerLà bộ kit BOM (1: Có, 0: Không)
bomarrayDanh sách thành phần BOM
display_orderintegerThứ tự hiển thị
price_by_policyarrayGiá theo chính sách giá (rỗng trong API danh sách biến thể)
statusintegerTrạng thái (3: Active, 5: Archived)
date_createdintegerThời gian tạo
date_modifiedintegerThời gian cập nhật

On this page