- 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
Update Product Stock
PUT
https://api.gofive.co.th/v1/products/stock
**สามารถอัพเดท product ที่ inactive ได้
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Header Params
Content-Type
string
optional
Example:
application/json
Ocp-Apim-Subscription-Key
string
optional
Example:
<Your Subscription-Key>
Body Params application/json
array of:
productCode
string
required
qty
integer
required
Example
[
{
"productCode": "A001",
"qty": 20
},
{
"productCode": "A002",
"qty": 20
},
{
"productCode": "A003",
"qty": 20
}
]
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 PUT 'https://api.gofive.co.th/v1/products/stock' \
--header 'Ocp-Apim-Subscription-Key: <Your Subscription-Key>' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"productCode": "A001",
"qty": 20
},
{
"productCode": "A002",
"qty": 20
},
{
"productCode": "A003",
"qty": 20
}
]'
Responses
🟢200Success
application/json
Body
data
array [object {4}]
required
productCode
string
required
qty
integer
required
isSuccess
boolean
required
error
object
required
statusCode
integer
required
httpStatusCode
integer
required
Examples
{
"data": [
{
"productCode": "A001",
"qty": 30,
"isSuccess": true
},
{
"productCode": "A002",
"qty": 50,
"isSuccess": false,
"error": {
"description": "product code not found"
}
},
{
"productCode": "",
"qty": 10,
"isSuccess": false,
"error": {
"description": "require product code"
}
}
],
"statusCode": 1000,
"httpStatusCode": 200
}
🟠400Bad Request
🟠401User authentication required V2.