Assets API

The Asset Pulse module provides ISO 55000-aligned lifecycle management for physical assets including equipment, instruments, facilities, IT systems, and vehicles. Track assets from registration through decommissioning with preventive, corrective, calibration, and inspection maintenance records.

Asset Lifecycle

operational --> maintenance --> operational
     |                              |
     v                              v
calibration_due --> operational   decommissioned (end of life)

Asset Categories

CategoryExamples
equipmentTablet press, bioreactor, packaging line
instrumentHPLC, pH meter, balance
facilityCleanroom, warehouse, cold storage
it_systemLIMS, MES, ERP server
vehicleForklift, delivery truck, AGV

Endpoints


POST /api/v1/assets

Register a new asset in the organization. The asset tag must be unique within the organization (enforced by DB constraint).

tRPC: assetPulse.create Auth: Bearer token required (scope: write:items) or session cookie Org context: Required

Parameters:

NameTypeRequiredDescription
namestringYesHuman-readable asset name (e.g., “Tablet Press TP-401”)
assetTagstringYesUnique tag/identifier matching physical label (e.g., “TP-401”)
categorystringNoequipment, instrument, facility, it_system, vehicle (default: equipment)
locationstringNoPhysical location (e.g., “Building A, Floor 2, Room 203”)
statusstringNooperational, maintenance, decommissioned, calibration_due (default: operational)
specificationsobjectNoFlexible JSONB specs (manufacturer, model, serial, etc.)

Example:

curl -X POST -H "Authorization: Bearer probeya_sk_live_..." \
     -H "Content-Type: application/json" \
     -d '{"name":"HPLC System 007","assetTag":"HPLC-007","category":"instrument","location":"QC Lab B, Bench 3"}' \
     "https://acme.probeya.com/api/v1/assets"

Response:

{
  "data": {
    "id": "clx9as001",
    "name": "HPLC System 007",
    "assetTag": "HPLC-007",
    "category": "instrument",
    "location": "QC Lab B, Bench 3",
    "status": "operational",
    "specifications": {},
    "createdAt": "2026-04-01T10:00:00.000Z"
  }
}

Side effects:

  • Logs asset.created activity event for audit trail

GET /api/v1/assets

Paginated asset listing with filtering by category, status, location, and full-text search on name and asset tag.

tRPC: assetPulse.list Auth: Bearer token required (scope: read:items) or session cookie Org context: Required

Parameters:

NameTypeRequiredDescription
categorystring (query)NoFilter by asset category
statusstring (query)NoFilter by operational status
locationstring (query)NoFilter by exact location
searchstring (query)NoCase-insensitive search on name and assetTag
pagenumber (query)NoPage number, 1-based (default: 1)
limitnumber (query)NoItems per page (default: 25, max: 100)

Response:

{
  "items": [...],
  "total": 156,
  "page": 1,
  "limit": 25,
  "totalPages": 7
}

GET /api/v1/assets/:id

Retrieve a single asset with the 10 most recent maintenance log entries.

tRPC: assetPulse.getById Auth: Bearer token required (scope: read:items) or session cookie Org context: Required

Response:

{
  "data": {
    "id": "clx9as001",
    "name": "HPLC System 007",
    "assetTag": "HPLC-007",
    "category": "instrument",
    "status": "operational",
    "specifications": { "manufacturer": "Agilent", "model": "1260 Infinity II" },
    "maintenanceLogs": [
      {
        "id": "clx9ml001",
        "type": "calibration",
        "description": "Annual calibration per SOP-QC-042",
        "performedAt": "2026-03-15T08:00:00.000Z",
        "performedBy": { "id": "clx9us003", "name": "Jane Doe" }
      }
    ]
  }
}

PATCH /api/v1/assets/:id

Partial update of asset fields including status transitions, location changes, and maintenance schedule updates.

tRPC: assetPulse.update Auth: Bearer token required (scope: write:items) or session cookie Org context: Required

Parameters:

NameTypeRequiredDescription
idstringYesAsset ID to update
namestringNoUpdated name
assetTagstringNoUpdated tag
categorystringNoUpdated category
locationstringNoUpdated location (null to clear)
statusstringNoUpdated operational status
lastMaintenanceAtstringNoISO 8601 datetime (null to clear)
nextMaintenanceAtstringNoISO 8601 datetime (null to clear)
specificationsobjectNoUpdated JSONB specifications

DELETE /api/v1/assets/:id

Remove an asset. Associated maintenance logs are automatically deleted via cascade.

tRPC: assetPulse.delete Auth: Bearer token required (scope: write:items) or session cookie Org context: Required


POST /api/v1/assets/:id/maintenance

Record a maintenance event against an asset. Verifies the asset belongs to the current organization before logging.

tRPC: assetPulse.logMaintenance Auth: Bearer token required (scope: write:items) or session cookie Org context: Required

Parameters:

NameTypeRequiredDescription
assetIdstringYesThe asset this maintenance event applies to
typestringYespreventive, corrective, calibration, inspection
descriptionstringNoDetails of the maintenance performed
performedAtstringNoISO 8601 datetime (default: now)
costnumberNoCost of the maintenance event
notesstringNoAdditional notes

GET /api/v1/assets/:id/maintenance

Paginated maintenance history for a specific asset.

tRPC: assetPulse.listMaintenanceLogs Auth: Bearer token required (scope: read:items) or session cookie Org context: Required

Parameters:

NameTypeRequiredDescription
assetIdstringYesAsset ID
typestring (query)NoFilter by maintenance type
limitnumber (query)NoResults per page (default: 20, max: 100)
offsetnumber (query)NoPagination offset (default: 0)

Error Codes

CodeDescription
400Invalid input (e.g., unknown category or status)
401Missing or invalid authentication
404Asset not found in this organization
409Duplicate asset tag within the organization