บทความเกี่ยวกับ: BentoWeb API

ขั้นตอนการสร้าง Product ประเภท Attribute (Type 3)

  1. ใช้ API เพื่อสร้าง Product โดย ระบุ type มีค่าเป็น 3


Sandbox
https://app.swaggerhub.com/apis/SemanticTouch/BentoSandboxProduct/1.0.0-oas3#/Products/post_product


Production
https://app.swaggerhub.com/apis/SemanticTouch/BentowebProduct/1.0.0-oas3#/Products/post_product


Data ตัวอย่าง:

{
"name": "Product name",
"active": 0,
"price": 30,
"store_id":{store_id},
"type": 3
}


  1. ทำการ Init attribute


Sandbox
https://app.swaggerhub.com/apis/SemanticTouch/BentoSandboxProduct/1.0.0-oas3#/Products/post_product_init_attribute__product_id_


Production
https://app.swaggerhub.com/apis/SemanticTouch/BentowebProduct/1.0.0-oas3#/Products/post_product_init_attribute__product_id_


Data ตัวอย่าง:

{
"attr1name": "Colour",
"attr2name": "Size",
"store_id": {store_id}
}


  1. เพิ่มสินค้าลงใน attribute


Sandbox
https://app.swaggerhub.com/apis/SemanticTouch/BentoSandboxProduct/1.0.0-oas3#/Products/post_product_variant_set_attribute__product_id_


Product
https://app.swaggerhub.com/apis/SemanticTouch/BentowebProduct/1.0.0-oas3#/Products/post_product_variant_set_attribute__product_id_


Data ตัวอย่าง:

{
"attr1": "Blue",
"attr2": "M",
"price": 25,
"store_id": {store_id},
"stock": 100,
"barcode": "123456789",
"sku": "001a"
}


อัปเดตเมื่อ: 24/05/2024

บทความนี้เป็นประโยชน์หรือไม่?

แบ่งปันความคิดเห็นของคุณ

ยกเลิก

ขอบคุณ!