Assets
List assets
GET https://app.trelica.com/api/assets/v1
Scopes required:
Assets.Read
Query Parameters
limit
Integer
Maximum number of items to fetch. Defaults to 100.
after
String
Pagination token (provided by Trelica during pagination)
Headers
Authorization*
String
OAuth Bearer Token
{
"next": "https://app.trelica.com/api/assets/v1?after=<TOKEN>",
"results": [
{
"id": "646fcb4fb829ba9df2a9446f",
"status": "Deployed",
"hardwareVendor": "Philips",
"modelName": "LG 27BP450Y-B",
"serialNumber": "QYBQ83VT6F",
"assetTag": "A0000001",
"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": 340.0,
"netPriceCurrency": "USD",
"isEncrypted": false,
"customFields": {},
"createdBy": {
"userId": "b1fb51a7c13f4cbf832b304348c8270e",
"name": "System",
"email": "admin@trelica.com"
},
"createdDtm": "2023-05-25T20:55:43.032Z",
"lastModifiedBy": {
"userId": "b1fb51a7c13f4cbf832b304348c8270e",
"name": "System",
"email": "admin@trelica.com"
},
"lastModifiedDtm": "2024-05-26T01:03:25.451Z"
}
]
}Delete an asset
DELETE https://app.trelica.com/api/assets/v1/{id}
Scopes required:
Assets.Write
Query Parameters
id*
String
Trelica Asset ID
Headers
Authorization*
String
OAuth Bearer Token
Create or update an asset
PUT https://app.trelica.com/api/assets/v1
Scopes required: Assets.Write
To update an asset, pass in either a serialNumber, an externalId or an id attribute. PUT requires a full asset object to be passed. If you want to update a smaller number of fields use PATCH.
If you pass a serialNumber or an externalId, the response will include the Trelica id attribute that corresponds to the asset with the passed value.
Note: if asset field values have been provided by an integration (e.g. an end-point or MDM system), then they cannot be overridden. If you pass values for these fields, then the value will not be updated, and the value returned will be the value from the integration.
Headers
Authorization*
String
OAuth Bearer Token
Update specific fields for an asset
PATCH https://app.trelica.com/api/assets/v1/{assetId}
Scopes required: Assets.Write
Note: if asset field values have been provided by an integration (e.g. an end-point or MDM system), then they cannot be overridden. If you pass values for these fields, then the value will not be updated, and the value returned will be the value from the integration.
Headers
Authorization*
String
OAuth Bearer Token
{ "errors": { "customFields.user_custom_dropdown.0": [ "Invalid option value 'Show' - must be one of [show, hide]" ] }, "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title": "One or more validation errors occurred.", "status": 400, "extensions": { "traceId": "00-2c9c80bcccae09f0b436f578e31acb9c-5db9d2985e8d0a55-01" } }
Examples
Example filters
hardwareVendor co "Dell"
Assets from vendors starting with "Dell", e.g. "Dell Inc.", "Dell Boomi" etc.
status eq "Deployed"
Deployed assets.
customFieldValues.memoryGb gt 12
Assets where the value of the custom field 'memoryGb' is greater than 12.
not (lastSyncDtm pr)
Assets with no lastSyncDtm value.
Example body for patching an asset
Example body for creating an asset
Data structures
Asset
externalId
string
Unique identifier for the asset. This may be an internal ID from a source system.
modelName
string
Name of the asset model.
deviceName
string
Optional. Descriptive name for the asset.
status
enum
New | ReadyToDeploy | Deployed | OutForRepair | Retired
hardwareVendor
string
Name of the vendor.
serialNumber
string
Optional. Asset serial number.
assetTag
string
Optional. Asset tag.
purchasedDate
date
Optional. (ISO format) Date purchased, e.g. "2022-01-15"
disposalDate
date
Optional. (ISO format) Date asset was disposed of, e.g. "2023-01-15"
warrantyExpirationDate
date
Optional. (ISO format) Date warranty expires on asset.
lifespanExpirationDate
date
Optional. (ISO format) Date when asset is considered at end of life.
notes
string
Optional. Text notes about the asset.
assignedToEmail
string
Optional. Person to whom asset is assigned.
netPrice
number
Optional. Price of asset.
netPriceCurrency
string
Optional. 3 digit ISO 4217 currency code, e.g. "GBP".
enrolledDtm
date/time
Optional. (ISO format) Date and time the asset was enrolled in an MDM platform.
lastSyncDtm
date/time
Optional. (ISO format) Date and time the asset last synched from an MDM platform.
platform
string
Optional. Operating system. iOS | Mac | Windows | Android | Linux | ChromeOS | Unknown
osVersion
string
Optional. Version of operating system.
isEncrypted
boolean
Optional. true if the asset is encrypted, false if not.
Custom field value
Custom fields should contain one of the following attributes, depending on the type of the field.
numberValue
number
Number.
optionValue
array
Array of strings.
textValue
string
Text string.
Currency value
value
number
Amount.
currency
string
3 digit ISO 4217 currency code, e.g. "GBP".
Link
href
string
A URL.
description
string
Optional. Description for the link.
Last updated