Update Asset
DevelopingPOST
/empeo/api/v1/assets/updateRequest
Header Params
Authorization
string
optional
Example:
Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwN0I2RTQ3QTU1MzkxOTdDQ0Y2NzlDNTVEODFFNDQ1RTE2NUQ2QkVSUzI1NiIsInR5cCI6ImF0K2p3dCIsIng1dCI6InNIdHVSNlZUa1pmTTlubkZYWUhrUmVGbDFyNCJ9.eyJuYmYiOjE2OTE0MDQ1NzUsImV4cCI6MTY5MTQwODE3NSwiaXNzIjoiaHR0cHM6Ly9sb2dpbi5nb2ZpdmUuY28udGgiLCJhdWQiOlsiR09GSVZFLkFQSSIsIklNQy5BUEkiXSwiY2xpZW50X2lkIjoiRW1wZW9BdXRoZW4tT3BlbkFwaSIsInN1YiI6IjE5ZTRlZDVjLWJhNTktNDAzMi05OTUyLWYzYzQ3YWFlODUzOCIsImF1dGhfdGltZSI6MTY5MTQwNDU3NSwiaWRwIjoibG9jYWwiLCJDbGllbnRJZCI6IkVtcGVvQXV0aGVuLU9wZW5BcGkiLCJyb2xlIjoiIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiY2hhaXRoYXdhdC55YUBnbG9iYWwua29tYXRzdSIsInNpZCI6IjYzRkI4M0E5OUVGNkY3NUQ4OUFDQjc5MDIwRDc5MUI3IiwiaWF0IjoxNjkxNDA0NTc1LCJzY29wZSI6WyJHT0ZJVkUuQVBJIiwiSU1DLkFQSSIsIm9wZW5pZCIsInByb2ZpbGUiLCJvZmZsaW5lX2FjY2VzcyJdLCJhbXIiOlsicHdkIl19.VZzigCC7Znq9XGwbka1uXkKquWwuapah5GyhKZaiFFeaKW-yWYt76vodQt72RMmDQxA21MN8pYqbF2MkQlFAvP0yw9IyzpEzYsxs_0fCDWqSAQenmrJ_9o8pkX-Rc89MQvmQJBNOg0dFsYGm2W441KTK43JgP1LUIC-CPhELj3jAHNQqe6PF3j0xAl7D-fZYdbqQXI890gD0PAf8E3za4yPVsf31DV7ies3vwE8x74S5WD8sFD8R9bMC0iKmaZ_YHd4JWswF4iwiDTmifST7iKAdGizeYWXfYPC9EZD5d3GOnX_hRby2QDfuXtg1ec9esVunuYfklupTvabxiFWebw
Ocp-Apim-Subscription-Key
string
optional
Example:
20ed4158ed784b1da077647b263ccf6e
Body Params application/json
assetCodeRefId
string
optional
null or non-existent code = add, existing code = edit
newAssetCodeRefId
string
optional
New code value to edit asset code
name
string
required
assetCategoryId
integer
required
datePurchase
string
required
require if HasWarranty is true
employeeRefId
string
required
Ref ID of the owner employee
companyName
string
required
Company name of the owner employee
serialNo
string
optional
branchId
integer
optional
cost
number
optional
remark
string
optional
tagNames
string
optional
Asset tag names, separated by comma ( , )
hasWarranty
boolean
optional
default = false
monthOfWarranty
integer
optional
require if HasWarranty is true
isCommon
boolean
optional
default = false
Example
{
"assetCodeRefId": "Asset001",
"newAssetCodeRefId": "Asset002",
"name": "MacBook Air 13",
"assetCategoryId": 23452,
"companyName": "Gofive",
"employeeRefId": "8888",
"serialNo": "EP3600",
"branchId": 0,
"cost": 4999,
"remark": "MacBook Air 13: M1 chip 8C CPU/7C GPU/8GB/256GB - Gold-2020 MacBook Air พลังหนักๆ บนความบางเบา โน้ตบุ๊คที่บางและเบาที่สุดของเรา วันนี้พลิกโฉมใหม่หมดในทุกด้าน ด้วยชิพ Apple M1 ที่ทำให้มี CPU เร็วขึ้นสูงสุด 3.5 เท่า และ GPU เร็วขึ้นสูงสุด 5 เท่า รวมทั้ง Neural Engine ที่ล้ำหน้าที่สุดของเรา",
"tagNames": "ไอที",
"hasWarranty": true,
"monthOfWarranty": 12,
"datePurchase": "2024-08-12 14:35:42",
"isCommon": false
}
Request samples
Responses
Success(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
status
object
required
code
string
required
description
string
required
data
object
required
message
string
required
result
boolean
required
Example
{
"status": {
"code": "1000",
"description": "Success"
},
"data": {
"message": "Asset added successfully.",
"result": true
}
}
Last modified: 2 months ago