{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canopyservicing-com/json-schema/canopyservicing-com-get-line-of-credit-response-schema.json",
  "title": "GetLineOfCreditResponse",
  "description": "Response schema for line of credit related endpoints.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canopyservicing-com-lines-of-credit-api-openapi.yml#/components/schemas/GetLineOfCreditResponse",
  "properties": {
    "account_id": {
      "type": "string",
      "title": "Account Id",
      "description": "The account id.",
      "hidden": false
    },
    "line_of_credit_id": {
      "type": "string",
      "title": "Line Of Credit Id",
      "description": "The line of credit id.",
      "hidden": false
    },
    "locale_rule_set_id": {
      "type": "string",
      "title": "Locale Rule Set Id",
      "description": "The ID of the locale rule set to validate policies against."
    },
    "effective_at": {
      "type": "string",
      "title": "Effective At",
      "description": "The effective at date.",
      "hidden": false
    },
    "issued_at": {
      "type": "string",
      "title": "Issued At",
      "description": "The issued at date.",
      "hidden": false
    },
    "credit_limit_cents": {
      "type": "integer",
      "title": "Credit Limit Cents",
      "description": "The credit limit of the line of credit in the smallest unit of the currency (e.g., cents for USD).",
      "hidden": false
    },
    "currency": {
      "type": "string",
      "title": "Currency",
      "description": "The currency of the line of credit.",
      "hidden": false
    },
    "status": {
      "$ref": "#/$defs/LineOfCreditStatusValue",
      "description": "The status of the line of credit.",
      "hidden": false
    },
    "servicemember_relief_status": {
      "$ref": "#/$defs/LineOfCreditStatusValue",
      "description": "The military protection status of the line of credit.",
      "hidden": false
    },
    "available_credit_cents": {
      "type": "integer",
      "title": "Available Credit Cents",
      "description": "The available credit of the line of credit.",
      "hidden": false
    },
    "days_past_due": {
      "type": "integer",
      "title": "Days Past Due",
      "description": "The number of days past due of the line of credit.",
      "hidden": false
    },
    "interest_rate_percent": {
      "type": "number",
      "title": "Interest Rate Percent",
      "description": "The annual interest rate as a whole number (e.g., 5.0 for 5%)",
      "hidden": false
    },
    "balance_cents": {
      "type": "integer",
      "title": "Balance Cents",
      "description": "The balance of the line of credit.",
      "hidden": false
    },
    "principal_balance_cents": {
      "type": "integer",
      "title": "Principal Balance Cents",
      "description": "The principal balance of the line of credit.",
      "hidden": false
    },
    "interest_balance_cents": {
      "type": "integer",
      "title": "Interest Balance Cents",
      "description": "The interest balance of the line of credit.",
      "hidden": false
    },
    "fee_balance_cents": {
      "type": "integer",
      "title": "Fee Balance Cents",
      "description": "The fee balance of the line of credit.",
      "hidden": false
    },
    "credit_balance_cents": {
      "type": "integer",
      "title": "Credit Balance Cents",
      "description": "The credit balance of the line of credit.",
      "hidden": false
    },
    "utilization_percentage": {
      "type": "number",
      "title": "Utilization Percentage",
      "description": "Credit utilization as a percentage (e.g., 33.3 for 33.3%)",
      "hidden": false
    },
    "active_promos": {
      "items": {
        "$ref": "#/$defs/ActivePromoInfo"
      },
      "type": "array",
      "title": "Active Promos",
      "description": "A list of currently active promos on the line of credit.",
      "hidden": false
    }
  },
  "type": "object",
  "required": [
    "account_id",
    "line_of_credit_id",
    "effective_at",
    "issued_at",
    "credit_limit_cents",
    "currency",
    "status",
    "servicemember_relief_status",
    "available_credit_cents",
    "days_past_due",
    "interest_rate_percent",
    "balance_cents",
    "principal_balance_cents",
    "interest_balance_cents",
    "fee_balance_cents",
    "credit_balance_cents",
    "utilization_percentage",
    "active_promos"
  ],
  "$defs": {
    "ActivePromoInfo": {
      "properties": {
        "promo_id": {
          "type": "string",
          "title": "Promo Id",
          "description": "The ID of the promo.",
          "hidden": false
        },
        "promo_configuration_id": {
          "type": "string",
          "title": "Promo Configuration Id",
          "description": "The ID of the promo configuration this promo was created from."
        },
        "availability_period_start": {
          "type": "string",
          "title": "Availability Period Start",
          "description": "The start of the promo availability period.",
          "hidden": false
        },
        "availability_period_end": {
          "type": "string",
          "title": "Availability Period End",
          "description": "The end of the promo availability period.",
          "hidden": false
        },
        "application_period_end": {
          "type": "string",
          "title": "Application Period End",
          "description": "The end of the promo application period. Null if no application window is defined."
        }
      },
      "type": "object",
      "required": [
        "promo_id",
        "availability_period_start",
        "availability_period_end"
      ],
      "title": "ActivePromoInfo",
      "description": "Basic information about an active promo, included in the Get Line of Credit response."
    },
    "LineOfCreditStatusValue": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "SUSPENDED",
        "PAID_OFF",
        "CHARGED_OFF",
        "NONE",
        "SCRA",
        "MLA"
      ],
      "title": "LineOfCreditStatusValue"
    }
  }
}