latestOpenAPI 3.0.02026-08-2217901.1 MB

ef9153fcac7c

Assets

List assets

Endpoint used to list asset resources

get/assets

Query parameters

cursorstring

Last pagination reference

limitinteger

max number of Assets returned

locationIdinteger

Will only show assets that are related to the location

manufacturerstring[]

Filter assets by their manufacturer name

modelstring[]

Filter assets by their manufacturer model name

updatedAt[gte]string date-time

Return records whose updatedAt is at or after this ISO 8601 date-time (UTC).

Example:2024-01-01T00:00:00.000Z
updatedAt[lte]string date-time

Return records whose updatedAt is at or before this ISO 8601 date-time (UTC).

Example:2024-12-31T23:59:59.999Z
createdAt[gte]string date-time

Return records whose createdAt is at or after this ISO 8601 date-time (UTC).

Example:2024-01-01T00:00:00.000Z
createdAt[lte]string date-time

Return records whose createdAt is at or before this ISO 8601 date-time (UTC).

Example:2024-12-31T23:59:59.999Z
customFieldNamestring[]

Filter assets by custom field value. Your query parameter should be your custom field name. (ie: To filter by a custom field named "Industry" with the value "Construction", you would do this "/assets?Industry=Construction"). <br><br>Adding multiple instance of the same custom field act as an <code>OR</code> and adding a different custom field act as an <code>AND</code>. (ie: To filter by a custom field named <code>Industry</code> with the value <code>Construction</code> OR <code>Transportation</code> AND the custom field <code>Manufacturer</code> with the value <code>ACME</code>, you would do this <code>/assets?Industry=Construction&Industry=Transportation&Manufacturer=ACME</code>). <br><br>If your custom field label is the same as a reserved query parameter such as <code>limit</code>, <code>sort</code>, <code>expand</code>, etc, you can add <code>__c</code> to your custom field filtering (ie: To filter by a custom field named <code>limit</code> with the value <code>ten</code>, you would do this <code>/assets?limit__c=ten</code>). <br><br>Note that your custom field needs to be created beforehand. Only number and single line text custom field types are supported.

sort'id' | 'createdAt' | 'updatedAt' | '-id' | '-createdAt' | '-updatedAt'

Attribute on which to sort the list. (for descending order, prefix attribute with '-').

expandstring[]

To expand multiple fields: expand=barcode&expand=team_ids

Headers

x-organization-idinteger

Required if using a multi organizations token

x-organization-idsstring

Required if using a multi organizations token and doing an operation on resources from multiple organizations. This is mutually exclusive with the x-organization-id header (use one or the other).

Response

Successfully fetched Assets list

nextCursorstring nullable required

The cursor to retrieve the next page of Assets.

nextPageUrlstring nullable required

Path with query parameters that can be used to retrieve the next page of Assets.

Example response

{
  "assets": [
    {
      "id": 963,
      "name": "Forklift",
      "description": "Forklift that is used to to move heavy equipments around the warehouse",
      "parentId": 852,
      "criticalityId": 150,
      "locationId": 852,
      "serialNumber": "000123ABC",
      "createdAt": "2022-01-01T00:00:00.000Z",
      "updatedAt": "2022-01-01T00:00:00.000Z",
      "creatorId": 851,
      "organizationId": 1,
      "externalId": "ext-asset-001",
      "barcode": "BWFPBNRHAW54CG",
      "teamIds": [
        123,
        456
      ],
      "assetTypes": [
        "manual",
        "tool"
      ],
      "extraFields": {
        "My Custom Field": "000000000"
      },
      "vendorIds": [
        1
      ],
      "depreciation": {
        "id": 42,
        "depreciationStartDate": "2022-01-01T00:00:00.000Z",
        "purchaseDate": "2022-01-01T00:00:00.000Z",
        "usefulLifeYears": 10,
        "yearsDepreciated": 5,
        "createdAt": "2022-01-01T00:00:00.000Z",
        "archivedAt": "2022-01-01T00:00:00.000Z"
      },
      "status": {
        "id": 42,
        "status": "OFFLINE",
        "downtimeType": "PLANNED",
        "startedAt": "2022-01-01T12:34:56.123Z",
        "endedAt": "2022-01-01T12:34:56.123Z",
        "description": "Overheated - needs servicing.",
        "createdAt": "2022-01-01T12:34:56.123Z",
        "updatedAt": "2022-01-01T12:34:56.123Z",
        "deletedAt": "2022-01-01T12:34:56.123Z",
        "customStatus": {
          "label": "Decommissioned",
          "createdAt": "2022-01-01T12:34:56.123Z",
          "updatedAt": "2022-01-01T12:34:56.123Z",
          "deletedAt": "2022-01-01T12:34:56.123Z"
        }
      },
      "manufacturer": "Manufacturer",
      "model": "Model"
    }
  ]
}