Update asset
PATCH
/api/assets/{id}
const url = 'http://localhost:3000/api/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {cookie: 'session=<session>', 'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/api/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --cookie session=<session> \ --data '{}'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
Request Body required
Section titled “Request Body required ” Media type application/json
Any subset of the asset create body
object
Example generated
{}Responses
Section titled “ Responses ”Asset updated
Media type application/json
object
data
object
id
required
string format: uuid
name
required
string
assetTag
string
serialNumber
string
status
required
string
condition
string
categoryId
string format: uuid
categoryName
string
categorySlug
string
manufacturerId
string format: uuid
manufacturerName
string
siteId
string format: uuid
siteName
string
locationId
string format: uuid
locationName
string
purchaseOrderId
string format: uuid
purchasedAt
string format: date-time
warrantyUntil
string format: date-time
purchasePrice
Numeric(10,2) serialised as string
string
notes
string
currentAssignee
object
id
string format: uuid
fullName
string
email
string
personId
string format: uuid
userId
string format: uuid
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"}