latestOpenAPI 3.0.02026-08-2217901.1 MB

ef9153fcac7c

Assets

Update asset

patch/assets/{id}

Path parameters

idinteger required

ID of the asset

Query parameters

skipWebhookboolean

Set skipWebhook=true, skipWebhook=1 or skipWebhook=yes to skip all webhooks upon successful operation on the endpoint. Learn more about webhooks

Request body

namestring
descriptionstring nullable
barcodestring nullable

String encoded barcode

criticalityIdinteger nullable

ID of the criticality of the asset

parentIdinteger nullable

ID of the parent asset

locationIdinteger nullable

ID of the location where the asset is located

teamIdsinteger[]

List of teams responsible for the asset

assetTypesstring[]

List of asset types

extraFieldsobject

Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: "My Custom Field")

vendorIdsnumber[]

Vendor IDs

serialNumberstring nullable

Serial number of the asset

externalIdstring nullable

External ID for this asset, unique per organization.

Example request

{
  "name": "Forklift",
  "description": "Forklift that is used to to move heavy equipments around the warehouse",
  "barcode": "BWFPBNRHAW54CG",
  "criticalityId": 150,
  "parentId": 852,
  "locationId": 852,
  "teamIds": [
    123,
    456
  ],
  "assetTypes": [
    "manual",
    "tool"
  ],
  "extraFields": {
    "My Custom Field": "000000000"
  },
  "vendorIds": [
    1
  ],
  "serialNumber": "000123ABC",
  "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"
  },
  "externalId": "ext-asset-001",
  "manufacturer": {
    "id": 123,
    "name": "ACME Corporation"
  },
  "model": {
    "id": 456,
    "name": "X-2000"
  }
}

Response

Successfully edited asset

Example response

{
  "asset": {
    "id": 963,
    "name": "Forklift",
    "globalUuid": "e2eb31cb-dd28-495a-92dd-6a435514f5ae",
    "currentOwnerId": 1,
    "barcode": "BWFPBNRHAW54CG",
    "description": "Forklift that is used to to move heavy equipments around the warehouse",
    "criticalityId": 150,
    "teamIds": [
      123,
      456
    ],
    "assetTypes": [
      "manual",
      "tool"
    ],
    "parentId": 852,
    "childrenIds": [
      321,
      987
    ],
    "locationId": 852,
    "serialNumber": "000123ABC",
    "thumbnail": {
      "id": 12345,
      "mimeType": "image/png",
      "fileName": "image.png",
      "url": "http://example.com/image.png",
      "createdAt": "2022-01-01T00:00:00.000Z",
      "width": 220,
      "height": 100
    },
    "attachments": [
      {
        "id": 12345,
        "mimeType": "image/png",
        "fileName": "image.png",
        "url": "http://example.com/image.png",
        "createdAt": "2022-01-01T00:00:00.000Z",
        "width": 220,
        "height": 100
      }
    ],
    "extraFields": {
      "My Custom Field": "000000000"
    },
    "vendorIds": [
      1
    ],
    "createdAt": "2022-01-01T00:00:00.000Z",
    "updatedAt": "2022-01-01T00:00:00.000Z",
    "creatorId": 851,
    "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"
    },
    "manufacturer": "Manufacturer",
    "model": "Model",
    "externalId": "ext-asset-001"
  }
}