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

Example เพิ่มสินค้าและตัวเลือกสินค้า

ตัวอย่างการเพิ่มสินค้าและตัวเลือกสินค้าครั้งแรก


Sandbox
Method: POST
URL: http://queue.bento-sandbox.com/api/product


Production
Method: POST
URL: http://queue.bento-sandbox.com/api/product


Header:
Authorization: Bearer {access_token} // access token ที่ได้รับจากการ authenticate


Body ตัวอย่าง


{
"images": [
"**image_url**"
],
"name": "มาม่าโจ๊กคัพรสไข่เค็ม แพ็ค 3",
"active": 1,
"price": 50.00,
"store_id":**store_id**
"variant": [
{
"name": "ชื่อ variant 1",
"price": "50.00",
"default": 1,
"sku": "123456",
"barcode": "8859126000508",
"stock": 1000
},
{
"name": "ชื่อ variant 2",
"price": "50.00",
"default": 0,
"sku": "987654",
"barcode": "8959126000614",
"stock": 10
}
]
}





*** default 1 คือสินค้าหลักสำหรับเริ่มต้น สินค้าชิ้นที่เหลือต้องเป็น default 0



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

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

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

ยกเลิก

ขอบคุณ!