curl --request PATCH \
--url https://app.trelica.com/api/assets/v1/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "Deployed",
"assignedToEmail": "john.doe@example.com",
"locationName": "London, UK",
"customFields": {
"user_department": "Engineering"
}
}
'{
"id": "646fcb4fb829ba9df2a94471",
"status": "Deployed",
"statusType": "Deployed",
"hardwareVendor": "Apple Inc.",
"modelName": "MacBook Pro (16-inch, 2021)",
"serialNumber": "KOGITG04P5",
"assetTag": "A0000002",
"purchasedDate": "2016-03-06T00:00:00Z",
"warrantyExpirationDate": "2017-03-06T00:00:00Z",
"lifespanExpirationDate": "2019-03-06T00:00:00Z",
"assignedTo": {
"userId": "6a127db661b442c1afdd77611ad99824",
"name": "Joshua Burns",
"email": "joshua.burns@example.com"
},
"assignedToEmail": "joshua.burns@example.com",
"netPrice": 1615,
"netPriceCurrency": "USD",
"platform": "Mac",
"isEncrypted": false,
"customFields": {
"user_department": "Engineering",
"user_ram_gb": 32,
"user_accessories": [
"Charger",
"Dock"
]
},
"createdBy": {
"userId": "b1fb51a7c13f4cbf832b304348c8270e",
"name": "System",
"email": "admin@example.com"
},
"createdDtm": "2023-05-25T20:55:43.048Z",
"lastModifiedBy": {
"userId": "b1fb51a7c13f4cbf832b304348c8270e",
"name": "System",
"email": "admin@example.com"
},
"lastModifiedDtm": "2024-05-27T01:03:26.679Z"
}Update selected details of a device
Partially updates a device: only the fields present in the request body are changed. Omitting
a field leaves it untouched, whereas sending an explicit null clears it. At least one
field must be supplied.
Required scope: Assets.Write (Write access to devices)
curl --request PATCH \
--url https://app.trelica.com/api/assets/v1/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "Deployed",
"assignedToEmail": "john.doe@example.com",
"locationName": "London, UK",
"customFields": {
"user_department": "Engineering"
}
}
'{
"id": "646fcb4fb829ba9df2a94471",
"status": "Deployed",
"statusType": "Deployed",
"hardwareVendor": "Apple Inc.",
"modelName": "MacBook Pro (16-inch, 2021)",
"serialNumber": "KOGITG04P5",
"assetTag": "A0000002",
"purchasedDate": "2016-03-06T00:00:00Z",
"warrantyExpirationDate": "2017-03-06T00:00:00Z",
"lifespanExpirationDate": "2019-03-06T00:00:00Z",
"assignedTo": {
"userId": "6a127db661b442c1afdd77611ad99824",
"name": "Joshua Burns",
"email": "joshua.burns@example.com"
},
"assignedToEmail": "joshua.burns@example.com",
"netPrice": 1615,
"netPriceCurrency": "USD",
"platform": "Mac",
"isEncrypted": false,
"customFields": {
"user_department": "Engineering",
"user_ram_gb": 32,
"user_accessories": [
"Charger",
"Dock"
]
},
"createdBy": {
"userId": "b1fb51a7c13f4cbf832b304348c8270e",
"name": "System",
"email": "admin@example.com"
},
"createdDtm": "2023-05-25T20:55:43.048Z",
"lastModifiedBy": {
"userId": "b1fb51a7c13f4cbf832b304348c8270e",
"name": "System",
"email": "admin@example.com"
},
"lastModifiedDtm": "2024-05-27T01:03:26.679Z"
}Authorizations
OAuth 2.0. Obtain an access token via the Client Credentials or Authorization Code flow, then send it as Authorization: Bearer <token>.
Path Parameters
The device's SaaS Manager ID.
Body
Selected device fields to update. Omitted fields are left unchanged; fields set to null are cleared.
The device's status, e.g. Deployed
A description of the device
Assign the device to a person by email address. Pass null to unassign.
Assign the device to a location by name (a location is found or created). Pass null to clear.
The serial number
The asset tag
(ISO format) The purchase date
(ISO format) The disposal date
(ISO format) The warranty expiration date
(ISO format) The end of the device's useful life
(ISO format) The date the device was enrolled
The net price, in the currency given by netPriceCurrency
The ISO currency code for netPrice
Notes about the device
Whether the device's storage is encrypted
The device's operating system platform
Mac, Windows, iOS, Android, ChromeOS, Linux The operating system version
Custom field values to set, keyed by the field's lookup key
Show child attributes
Show child attributes
The device name
Response
OK
An asset (device)
The asset's SaaS Manager ID. Supply to replace an existing asset.
The asset's external ID, sourced from the integration that imported it.
The device's status. This is the status's reference ID; custom statuses are prefixed user_. Defaults to New on creation.
The base status the device's status maps to. Custom statuses always map to one of these.
New, ReadyToDeploy, Deployed, OutForRepair, Retired The hardware vendor (manufacturer). Required when creating an asset.
The model name. Required when creating an asset.
The asset type, e.g. Laptop
The serial number
A description of the asset, sourced from integrations.
The device name, sourced from integrations.
The asset tag
(ISO format) The purchase date
(ISO format) The disposal date
(ISO format) The warranty expiration date
(ISO format) The end of the asset's useful life
Notes about the asset
The person the asset is assigned to. To set the assignee, use assignedToEmail.
Show child attributes
Show child attributes
Assign the asset to a person by email address. Pass null to unassign.
The net price, in the currency given by netPriceCurrency
The ISO currency code for netPrice. Defaults to your base currency.
(ISO format) The date the asset was enrolled
The timestamp of the asset's last sync from an integration.
The asset's operating system platform
Mac, Windows, iOS, Android, ChromeOS, Linux The operating system version
Whether the asset's storage is encrypted
Custom field values, keyed by the field's lookup key. Each value is the field's value directly: a string (text/single-select), a number, an ISO-8601 date, an array of strings (multi-select), or a link object ({ href, description }).
Show child attributes
Show child attributes
The user that created the asset record
Show child attributes
Show child attributes
The timestamp for when the asset record was created
The user that last modified the asset record
Show child attributes
Show child attributes
The timestamp for when the asset record was last modified
The asset's location. To set the location, use locationName.
Show child attributes
Show child attributes
Assign the asset to a location by name (a location is found or created). Pass null to clear.
Was this page helpful?