{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canopyservicing-com/json-schema/canopyservicing-com-get-lien-response-schema.json",
  "title": "GetLienResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canopyservicing-com-liens-api-openapi.yml#/components/schemas/GetLienResponse",
  "properties": {
    "lien_id": {
      "type": "string",
      "title": "Lien Id",
      "description": "The ID of the lien.",
      "hidden": false
    },
    "status": {
      "$ref": "#/$defs/LienStatus",
      "description": "The status of the lien.",
      "hidden": false
    },
    "position": {
      "type": "integer",
      "title": "Position",
      "description": "The position of the lien in the list of liens associated with the collateral.",
      "hidden": false
    },
    "include_in_ltv": {
      "type": "boolean",
      "title": "Include In Ltv",
      "description": "Whether the lien should be included in the LTV calculation.",
      "hidden": false
    },
    "association": {
      "$ref": "#/$defs/GetLienAssociationResponse",
      "description": "The association (loan or line of credit) associated with the lien. This should only reference loans/lines of credit that exist within Canopy."
    },
    "outstanding_debt_amount_cents": {
      "type": "integer",
      "title": "Outstanding Debt Amount Cents",
      "description": "The outstanding debt amount secured by this lien, in cents. This represents the current balance of debt that the lien secures. If missing, this may indicate a blanket lien that secures all current and future debts."
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "items": {},
          "type": "array"
        }
      ],
      "title": "Metadata",
      "description": "Metadata associated with the lien.",
      "hidden": false
    }
  },
  "type": "object",
  "required": [
    "lien_id",
    "status",
    "position",
    "include_in_ltv"
  ],
  "$defs": {
    "AssociationType": {
      "type": "string",
      "enum": [
        "LOAN",
        "LINE_OF_CREDIT"
      ],
      "title": "AssociationType"
    },
    "GetLienAssociationResponse": {
      "properties": {
        "association_id": {
          "type": "string",
          "title": "Association Id",
          "description": "The ID of the association (loan or line of credit) associated with the lien.",
          "hidden": false
        },
        "association_type": {
          "$ref": "#/$defs/AssociationType",
          "description": "The type of the association associated with the lien.",
          "hidden": false
        }
      },
      "type": "object",
      "required": [
        "association_id",
        "association_type"
      ],
      "title": "GetLienAssociationResponse"
    },
    "LienStatus": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "LAPSED",
        "RELEASED",
        "TERMINATED"
      ],
      "title": "LienStatus"
    }
  }
}