Skip to content

Update asset

PATCH
/api/assets/{id}
curl --request PATCH \
--url http://localhost:3000/api/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Content-Type: application/json' \
--cookie session=<session> \
--data '{}'
id
required
string format: uuid
Media type application/json

Any subset of the asset create body

object
Example generated
{}

Asset updated

Media type application/json
object
data
object
id
required
string format: uuid
name
required
string
assetTag
string
nullable
serialNumber
string
nullable
status
required
string
Allowed values: active spare maintenance retired decommissioned lost stolen
condition
string
default: good
categoryId
string format: uuid
nullable
categoryName
string
nullable
categorySlug
string
nullable
manufacturerId
string format: uuid
nullable
manufacturerName
string
nullable
siteId
string format: uuid
nullable
siteName
string
nullable
locationId
string format: uuid
nullable
locationName
string
nullable
purchaseOrderId
string format: uuid
nullable
purchasedAt
string format: date-time
nullable
warrantyUntil
string format: date-time
nullable
purchasePrice

Numeric(10,2) serialised as string

string
nullable
notes
string
nullable
currentAssignee
object
id
string format: uuid
fullName
string
nullable
email
string
nullable
personId
string format: uuid
nullable
userId
string format: uuid
nullable
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{
"data": {
"status": "active",
"condition": "good"
}
}

No fields to update

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}

Not authenticated

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}

Asset not found

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}