{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/assetlab-ca/json-schema/assetlab-ca-asset-schema.json",
  "title": "Asset",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/assetlab-ca-openapi.yaml#/components/schemas/Asset",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "asset_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Your own asset code/tag. Free text, not the AssetLab UUID - use it to match AssetLab records to an external system."
    },
    "asset_type_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "manufacturer_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "model": {
      "type": [
        "string",
        "null"
      ]
    },
    "serial_number": {
      "type": [
        "string",
        "null"
      ]
    },
    "purchase_cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "Money in the organization's currency - GET /v1/organization-settings for currency_code"
    },
    "replacement_value": {
      "type": [
        "number",
        "null"
      ],
      "description": "Cost to replace this asset today, in current dollars as recorded. NOT escalated, unlike purchase_cost, which is aged forward from purchase_date. Money in the organization's currency - GET /v1/organization-settings for currency_code"
    },
    "replacement_value_reviewed_on": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "Date replacement_value was last confirmed. Informational only - the value is never indexed forward from it."
    },
    "purchase_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "expected_lifetime_years": {
      "type": [
        "number",
        "null"
      ]
    },
    "condition_score": {
      "type": [
        "number",
        "null"
      ]
    },
    "risk_factor": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "CRITICAL",
        "HIGH",
        "MEDIUM",
        "LOW"
      ]
    },
    "status_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "GET /v1/asset-statuses. The status whose system_key is archived is the tenant's Archived status."
    },
    "qr_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "Read-only, system-generated. Only in detail response"
    },
    "image_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "site_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "building_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "location_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "system_class_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "system_group_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "system_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "last_maintenance_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "quantity": {
      "type": [
        "number",
        "null"
      ]
    },
    "unit_of_measure": {
      "type": [
        "string",
        "null"
      ],
      "description": "Unit the quantity is counted in"
    },
    "unit_replacement_value": {
      "type": [
        "number",
        "null"
      ],
      "description": "Replacement value per unit. Money in the organization's currency - GET /v1/organization-settings for currency_code"
    },
    "cost_per_sq_ft": {
      "type": [
        "number",
        "null"
      ],
      "description": "Money in the organization's currency - GET /v1/organization-settings for currency_code"
    },
    "salvage_value": {
      "type": [
        "number",
        "null"
      ],
      "description": "Money in the organization's currency - GET /v1/organization-settings for currency_code"
    },
    "salvage_value_percentage": {
      "type": [
        "number",
        "null"
      ],
      "description": "Salvage value as a percentage (0-100)"
    },
    "safety_impact": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "LOW",
        "MEDIUM",
        "HIGH",
        "CRITICAL"
      ]
    },
    "service_impact": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "LOW",
        "MEDIUM",
        "HIGH",
        "CRITICAL"
      ]
    },
    "environmental_impact": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "LOW",
        "MEDIUM",
        "HIGH",
        "CRITICAL"
      ]
    },
    "regulatory_impact": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "LOW",
        "MEDIUM",
        "HIGH",
        "CRITICAL"
      ]
    },
    "reputation_impact": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "LOW",
        "MEDIUM",
        "HIGH",
        "CRITICAL"
      ]
    },
    "consequence_of_failure_score": {
      "type": [
        "integer",
        "null"
      ]
    },
    "likelihood_of_failure_score": {
      "type": [
        "integer",
        "null"
      ]
    },
    "sites": {
      "$ref": "#/$defs/SiteRef"
    },
    "buildings": {
      "$ref": "#/$defs/BuildingRef"
    },
    "system_classes": {
      "$ref": "#/$defs/SystemClassRef"
    },
    "system_groups": {
      "$ref": "#/$defs/SystemGroupRef"
    },
    "systems": {
      "$ref": "#/$defs/SystemRef"
    },
    "asset_types": {
      "$ref": "#/$defs/AssetTypeRef"
    },
    "manufacturers": {
      "$ref": "#/$defs/ManufacturerRef"
    },
    "current_meter_reading": {
      "type": [
        "number",
        "null"
      ],
      "description": "Current meter/odometer reading"
    },
    "meter_unit": {
      "type": [
        "string",
        "null"
      ],
      "description": "Meter unit (km, miles, hours, cycles)"
    },
    "archived_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the asset was archived (moved onto the Archived system status). Null = live. Read-only, set by the server."
    },
    "archived_by": {
      "type": [
        "string",
        "null"
      ],
      "description": "User id that archived the asset; null when archived through an API key. Read-only."
    },
    "archived_reason": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "replaced",
        "disposed",
        "sold",
        "transferred",
        "other"
      ],
      "description": "Why it was archived. Cleared on restore."
    },
    "archived_previous_status_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Status the asset had before it was archived; restore by PATCHing status_id back to it. Read-only."
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "$defs": {
    "AssetTypeRef": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "BuildingRef": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "ManufacturerRef": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "SiteRef": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "SystemClassRef": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "SystemGroupRef": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "system_class_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        }
      }
    },
    "SystemRef": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        }
      }
    }
  }
}