- Introduction
- Activity
- Authentication API
- Customer
- Case
- Deal
- Employee
- Expense
- Product
- Create Or Update ProductsPOST
- Get a Product TicketGET
- Get Products With Take & StatusPOST
- Get a Product by ProductCodeGET
- Get Product GroupsGET
- Get Product PropertiesGET
- Get Products By FilterPOST
- Verify Serial Number POST
- /v3/Products/serials/statusGET
- Create or Update Codeguard ProductsPOST
- Update Product StockPUT
- /v1/products/unitsGET
- /v1/products/units CopyGET
- Quotation
- SalesOrder
- Webhooks
- Task
- Setting
Create Or Update Products
POST
https://api.gofive.co.th/v3/Products
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Header Params
Content-Type
string
required
Example:
application/json
Ocp-Apim-Subscription-Key
string
required
Example:
<Your Subscription-Key>
Body Params application/json
products
array [object {25}]
required
productCode
string
required
productBarcode
string
optional
productName
string
required
productDescription
string
optional
category
string
required
subCategory
string
optional
sub_SubCategory
string
optional
cost
number
required
prices
array [object {5}]
required
productUnitName
string
required
productWeight
number
optional
productWeightUnit
string
optional
productTag
array[string]
optional
productImage
array[string]
optional
trackInventory
boolean
required
qty
integer
optional
lowStockAlert
integer
optional
useWarranty
boolean
required
timeWarrantyValue
integer
optional
timeWarrantyUnit
string
optional
warrantyNote
string
optional
visibility
boolean
required
active
boolean
required
productVariant
array [object {11}]
optional
brandName
string
optional
Example
{
"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
}
]
}
]
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
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
}
]
}
]
}'
Responses
🟢200Success
application/json
Body
status
object
required
code
string
required
สถานะของ Business Code ถ้า
Success = 1000
Error 1 ตัว = 4001
Error มากกว่า 1 ตัว = 4002
หรือเป็น Subcode ที่ต้องการจะแสดงเพื่อสื่อความหมายของ Error โดย subcode จะเป็นตัวเดียวกับ business error code หรือไม่ก็ได้ เพื่อความสะดวกในการแสดงผล
description
string
required
data
object
required
ticketId
integer
required
Example
{
"status": {
"code": "1000",
"description": "Success"
},
"data": {
"ticketId": 284
}
}
🟠401Unauthorized
🟠400Bad Request
🔴500Server Error
🟠401User authentication required V2.
Modified at 2024-01-09 09:12:20