Webhook payload model for asset events.
Fields
- target (string): Target of the action (e.g., "asset").
- targetId (string): ID of the affected asset.
- action (string): Action performed on the asset (e.g., "created", "updated", "deleted").
- date (string): ISO 8601 timestamp of the event.
- byUserId (string): ID of the user who triggered the event.
- companyId (string): Company ID associated with the asset.
- newData (AssetData): Struct containing the new state of the asset.
- oldData (AssetData): Struct containing the previous state of the asset.
AssetData Struct
The AssetData struct contains the following fields:
- id (string): Asset ID.
- name (string): Asset name.
- description (string): Asset description.
- code (string): Asset code.
- equipmentId (string): Associated equipment ID.
- createdByUserId (string): ID of the user who created the asset.
- deleted (AssetDeleted): Soft-delete flag.
- companyId (string): Company ID.
- externalId (string): External system identifier.
- attachments ([]string): List of attachment file IDs.
- locationId (string): Associated location ID.
- assignedUserIds ([]string): IDs of assigned users.
- criticalityId (string): Criticality level ID.
- specifications (AssetSpecifications): Completeness info for the asset profile.
- modelType (string): Asset model type.
- modelDescription (string): Asset model description.
- createdAt (string): ISO 8601 creation timestamp.
- updatedAt (string): ISO 8601 last update timestamp.
- updatedByUserId (string): ID of the user who last updated the asset.
- assignedUsers ([]string): Assigned user IDs (denormalized).
- assignedTeams ([]string): Assigned team IDs (denormalized).
- createdByUser (AssetUser): User object of the creator.
- criticality (AssetCriticality): Criticality object.
- assetCustomFields ([]string): Custom field IDs.
- assignedTeamIds ([]string): IDs of assigned teams.
AssetDeleted Struct
The AssetDeleted struct contains the following fields:
- value (bool): Whether the asset is soft-deleted.
AssetSpecifications Struct
The AssetSpecifications struct contains the following fields:
- filledPercentage (int): Percentage of filled profile fields.
- missingEssentialFields ([]string): Essential fields not yet filled.
- missingNonEssentialFields ([]string): Non-essential fields not yet filled.
AssetUser Struct
The AssetUser struct contains the following fields:
- id (string): User ID.
- name (string): User full name.
- email (string): User email.
- number (int): User number.
- companyId (string): Company ID.
- externalId (string): External system identifier.
AssetLocation Struct
The AssetLocation struct contains the following fields:
- id (string): Location ID.
- name (string): Location name.
- tags ([]string): Location tags.
- externalId (string): External system identifier.
- image (*string): Image URL (nullable).
- parentId (*string): Parent location ID (nullable).
- assignedUserIds ([]string): Assigned user IDs.
- assignedTeamIds ([]string): Assigned team IDs.
- AssetCriticality Struct
The AssetCriticality struct contains the following fields:
- name (string): Criticality level name.
- companyId (string): Company ID.
- sensitivity (int): Sensitivity score.
- createdAt (string): ISO 8601 creation timestamp.
- updatedAt (string): ISO 8601 last update timestamp.
- createdByUserId (string): Creator user ID.
- updatedByUserId (string): Last updater user ID.
Example (JSON)
{
"target":"asset",
"targetId":"asset-001",
"action":"updated",
"date":"2025-09-29T18:04:03Z",
"byUserId":"user-abc",
"companyId":"company-xyz",
"newData":{
"id":"asset-001",
"name":"Hydraulic Press #3",
"description":"Main hydraulic press on floor 2",
"code":"HP-003",
"equipmentId":"equip-111",
"createdByUserId":"user-abc",
"deleted":{
"value":false
},
"companyId":"company-xyz",
"externalId":"ext-hp3",
"attachments":[
"file-001",
"file-002"
],
"locationId":"location-002",
"assignedUserIds":[
"user-abc",
"user-def"
],
"criticalityId":"criticality-high",
"specifications":{
"filledPercentage":80,
"missingEssentialFields":[
],
"missingNonEssentialFields":[
"modelDescription"
]
},
"modelType":"press",
"modelDescription":"Industrial hydraulic press",
"createdAt":"2024-01-15T10:00:00Z",
"updatedAt":"2025-09-29T18:04:03Z",
"updatedByUserId":"user-abc",
"assignedUsers":[
"user-abc"
],
"assignedTeams":[
"team-maintenance"
],
"createdByUser":{
"companyId":"company-xyz",
"email":"[email protected]",
"name":"John Doe",
"number":1,
"externalId":"ext-user-001",
"id":"user-abc"
},
"location":{
"name":"Floor 2",
"tags":[
"production",
"floor-2"
],
"externalId":"ext-loc-002",
"image":null,
"id":"location-002",
"parentId":"location-001",
"assignedUserIds":[
"user-abc"
],
"assignedTeamIds":[
"team-maintenance"
]
},
"criticality":{
"name":"High",
"companyId":"company-xyz",
"sensitivity":3,
"createdAt":"2024-01-01T00:00:00Z",
"updatedAt":"2024-06-01T00:00:00Z",
"createdByUserId":"user-admin",
"updatedByUserId":"user-admin"
},
"assetCustomFields":[
],
"assignedTeamIds":[
"team-maintenance"
]
},
"oldData":{
"id":"asset-001",
"name":"Hydraulic Press #3",
"description":"Main hydraulic press on floor 2",
"code":"HP-003",
"equipmentId":"equip-111",
"createdByUserId":"user-abc",
"deleted":{
"value":false
},
"companyId":"company-xyz",
"externalId":"ext-hp3",
"attachments":[
],
"locationId":"location-001",
"assignedUserIds":[
"user-abc"
],
"criticalityId":"criticality-medium",
"specifications":{
"filledPercentage":60,
"missingEssentialFields":[
"criticalityId"
],
"missingNonEssentialFields":[
"modelDescription"
]
},
"modelType":"press",
"modelDescription":"",
"createdAt":"2024-01-15T10:00:00Z",
"updatedAt":"2025-08-01T10:00:00Z",
"updatedByUserId":"user-admin",
"assignedUsers":[
],
"assignedTeams":[
],
"createdByUser":{
"companyId":"company-xyz",
"email":"[email protected]",
"name":"John Doe",
"number":1,
"externalId":"ext-user-001",
"id":"user-abc"
},
"location":{
"name":"Floor 1",
"tags":[
"production"
],
"externalId":"ext-loc-001",
"image":null,
"id":"location-001",
"parentId":null,
"assignedUserIds":[
],
"assignedTeamIds":[
]
},
"criticality":{
"name":"Medium",
"companyId":"company-xyz",
"sensitivity":2,
"createdAt":"2024-01-01T00:00:00Z",
"updatedAt":"2024-06-01T00:00:00Z",
"createdByUserId":"user-admin",
"updatedByUserId":"user-admin"
},
"assetCustomFields":[
],
"assignedTeamIds":[
]
}
}
