Authorization: Bearer ********************
{
"products": [
{
"productCode": "<string>", // Required if no product sku
"productBarcode": "<string>",
"productName": "<string>", // Required
"productDescription": "<string>",
"category": "<string>", // Required
"subCategory": "<string>",
"sub_SubCategory": "<string>",
"cost": 0.0, // Required
"prices": [
{
"priceTierName": "<string>", // Required
"regularPrice": 0.0, // Required
"salePrice": 0.0,
"vatValue": 0.0,
"useDefaultVat" : true
}
], // Required
"productUnitName": "<string>", // Required
"productWeight": 0.0,
"productWeightUnit": "<string>",
"productTag": ["string"],
"productImage": [
"<string>"
],
"trackInventory": true, // Required
"qty": 0,
"lowStockAlert": 0,
"useWarranty": false, // Required
"timeWarrantyValue": 0,
"timeWarrantyUnit": "<string>", // [y = year ,m = month ,d = day]
"warrantyNote": "<string>",
"visibility": true, // Required
"active": true, // Required
"brandName": "<string>",
"productVariant": [
{
"productCode": "<string>", // Required
"productName": "<string>", // Required
"productBarcode": "<string>",
"productDescription": "<string>",
"cost": 0.0,
"prices": [
{
"priceTierName": "<string>",
"regularPrice": 0.0,
"salePrice": 0.0,
"vat": 0.0
}
], // Required
"productImage": [
"<string>"
],
"qty": 0,
"lowStockAlert": 0,
"active": "<boolean>", // Required
"attribute": [
{
"attributeName": "<string>", // Required
"attributeValueName": "<string>" // Required
}
] // Required
}
]
}
]
}
curl --location --request POST 'https://api.gofive.co.th/v3/Products' \
--header 'Ocp-Apim-Subscription-Key: <Your Subscription-Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"products": [
{
"productCode": "<string>", // Required if no product sku
"productBarcode": "<string>",
"productName": "<string>", // Required
"productDescription": "<string>",
"category": "<string>", // Required
"subCategory": "<string>",
"sub_SubCategory": "<string>",
"cost": 0.0, // Required
"prices": [
{
"priceTierName": "<string>", // Required
"regularPrice": 0.0, // Required
"salePrice": 0.0,
"vatValue": 0.0,
"useDefaultVat" : true
}
], // Required
"productUnitName": "<string>", // Required
"productWeight": 0.0,
"productWeightUnit": "<string>",
"productTag": ["string"],
"productImage": [
"<string>"
],
"trackInventory": true, // Required
"qty": 0,
"lowStockAlert": 0,
"useWarranty": false, // Required
"timeWarrantyValue": 0,
"timeWarrantyUnit": "<string>", // [y = year ,m = month ,d = day]
"warrantyNote": "<string>",
"visibility": true, // Required
"active": true, // Required
"brandName": "<string>",
"productVariant": [
{
"productCode": "<string>", // Required
"productName": "<string>", // Required
"productBarcode": "<string>",
"productDescription": "<string>",
"cost": 0.0,
"prices": [
{
"priceTierName": "<string>",
"regularPrice": 0.0,
"salePrice": 0.0,
"vat": 0.0
}
], // Required
"productImage": [
"<string>"
],
"qty": 0,
"lowStockAlert": 0,
"active": "<boolean>", // Required
"attribute": [
{
"attributeName": "<string>", // Required
"attributeValueName": "<string>" // Required
}
] // Required
}
]
}
]
}'
สถานะของ Business Code ถ้า
Success = 1000
Error 1 ตัว = 4001
Error มากกว่า 1 ตัว = 4002
หรือเป็น Subcode ที่ต้องการจะแสดงเพื่อสื่อความหมายของ Error โดย subcode จะเป็นตัวเดียวกับ business error code หรือไม่ก็ได้ เพื่อความสะดวกในการแสดงผล
{
"status": {
"code": "1000",
"description": "Success"
},
"data": {
"ticketId": 284
}
}