Skip to main content
PATCH
/
api
/
assets
/
v1
/
{id}
Update selected details of a device
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

Authorization
string
header
required

OAuth 2.0. Obtain an access token via the Client Credentials or Authorization Code flow, then send it as Authorization: Bearer <token>.

Path Parameters

id
string
required

The device's SaaS Manager ID.

Body

application/json

Selected device fields to update. Omitted fields are left unchanged; fields set to null are cleared.

status
string | null

The device's status, e.g. Deployed

description
string | null

A description of the device

assignedToEmail
string | null

Assign the device to a person by email address. Pass null to unassign.

locationName
string | null

Assign the device to a location by name (a location is found or created). Pass null to clear.

serialNumber
string | null

The serial number

assetTag
string | null

The asset tag

purchaseDate
string<date-time> | null

(ISO format) The purchase date

disposalDate
string<date-time> | null

(ISO format) The disposal date

warrantyExpirationDate
string<date-time> | null

(ISO format) The warranty expiration date

lifespanExpirationDate
string<date-time> | null

(ISO format) The end of the device's useful life

enrolledDtm
string<date-time> | null

(ISO format) The date the device was enrolled

netPrice
number<double> | null

The net price, in the currency given by netPriceCurrency

netPriceCurrency
string | null

The ISO currency code for netPrice

notes
string | null

Notes about the device

isEncrypted
boolean | null

Whether the device's storage is encrypted

platform
enum<string>

The device's operating system platform

Available options:
Mac,
Windows,
iOS,
Android,
ChromeOS,
Linux
osVersion
string | null

The operating system version

customFields
object

Custom field values to set, keyed by the field's lookup key

deviceName
string | null

The device name

Response

OK

An asset (device)

id
string | null

The asset's SaaS Manager ID. Supply to replace an existing asset.

externalId
string | null
read-only

The asset's external ID, sourced from the integration that imported it.

status
string | null

The device's status. This is the status's reference ID; custom statuses are prefixed user_. Defaults to New on creation.

statusType
enum<string> | null
read-only

The base status the device's status maps to. Custom statuses always map to one of these.

Available options:
New,
ReadyToDeploy,
Deployed,
OutForRepair,
Retired
hardwareVendor
string | null

The hardware vendor (manufacturer). Required when creating an asset.

modelName
string | null

The model name. Required when creating an asset.

assetType
string | null

The asset type, e.g. Laptop

serialNumber
string | null

The serial number

description
string | null
read-only

A description of the asset, sourced from integrations.

deviceName
string | null
read-only

The device name, sourced from integrations.

assetTag
string | null

The asset tag

purchasedDate
string<date-time> | null

(ISO format) The purchase date

disposalDate
string<date-time> | null

(ISO format) The disposal date

warrantyExpirationDate
string<date-time> | null

(ISO format) The warranty expiration date

lifespanExpirationDate
string<date-time> | null

(ISO format) The end of the asset's useful life

notes
string | null

Notes about the asset

assignedTo
object

The person the asset is assigned to. To set the assignee, use assignedToEmail.

assignedToEmail
string | null

Assign the asset to a person by email address. Pass null to unassign.

netPrice
number<double> | null

The net price, in the currency given by netPriceCurrency

netPriceCurrency
string | null

The ISO currency code for netPrice. Defaults to your base currency.

enrolledDtm
string<date-time> | null

(ISO format) The date the asset was enrolled

lastSyncDtm
string<date-time> | null
read-only

The timestamp of the asset's last sync from an integration.

platform
enum<string>

The asset's operating system platform

Available options:
Mac,
Windows,
iOS,
Android,
ChromeOS,
Linux
osVersion
string | null

The operating system version

isEncrypted
boolean | null

Whether the asset's storage is encrypted

customFields
object

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 }).

createdBy
object

The user that created the asset record

createdDtm
string<date-time> | null
read-only

The timestamp for when the asset record was created

lastModifiedBy
object

The user that last modified the asset record

lastModifiedDtm
string<date-time> | null
read-only

The timestamp for when the asset record was last modified

location
object

The asset's location. To set the location, use locationName.

locationName
string | null

Assign the asset to a location by name (a location is found or created). Pass null to clear.