Sản phẩm — Cập nhật định mức combo

Cập nhật cấu thành (BOM) cho biến thể combo/sản phẩm ghép.

Xem Markdown

Cập nhật danh sách sản phẩm cấu thành cho một biến thể combo.

Endpoint

MethodEndpointMô tả
POST/api/v1/shops/{shop_id}/variations/update_composite_productĐịnh mức sản phẩm ghép

Tham số

Tham sốVị tríKiểuBắt buộcMô tả
shop_idđường dẫnstringCóID cửa hàng
variation_idthânstringCóBiến thể combo
composite_productsthânobject[]CóThành phần cấu thành

Kiểm thử tại chỗ

POSThttps://pos.hitechcloud.vn/api/v1/shops/{shop_id}/variations/update_composite_product

Nhập tham số và API Key rồi bấm Gửi thử. Key không được lưu lại.

Tham số đường dẫn
Body
cURL mẫu (POST)
curl -X POST "https://pos.hitechcloud.vn/api/v1/shops/shop_0a1b2c3d/variations/update_composite_product" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "variation_id": "var_1001",
  "composite_products": [
    {
      "variation_id": "var_2001",
      "quantity": 2
    }
  ]
}'
Phản hồi mẫu
{
  "status": "success",
  "data": {
    "variation_id": "var_1001"
  }
}