> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://infonite.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://infonite.dev/_mcp/server.

# Loans & mortgages

**Where it lives:** at `loans` in the **Financial Position**, and on its own from the loans endpoint. One endpoint returns both kinds; `sub_family` tells them apart.

This is the debt half of an affordability assessment: how much was granted, how much is still outstanding, what the instalment is and when it falls. Together with [the credit registry](/guides/data-models/credit-registry) — which reports debt at *other* institutions — it closes the picture.

## Personal loans

### Schema (`PersonalLoanSchema`)

```yaml
components:
  schemas:
    GenericIdentifierSchema:
      type: object
      properties:
        value:
          type: string
          description: Identifier
        entity_country:
          type: string
          format: country
          description: Entity country
        entity_code:
          type: string
          description: Entity code
        entity_office:
          type: string
          description: Entity office
        control_digits:
          type: string
          description: Control digits
      required:
        - value
      description: Generic account identifier
      title: GenericIdentifierSchema
    IBANIdentifierSchema:
      type: object
      properties:
        value:
          type: string
          format: iban
          description: International Bank Account Number
        masked:
          type: string
          minLength: 1
          maxLength: 34
          description: Partial IBAN
        entity_country:
          type: string
          description: Bank Country
        entity_code:
          type: string
          description: Bank code
        entity_office:
          type: string
          description: Bank office
        control_digits:
          type: string
          description: Control digits
      required:
        - value
        - masked
        - entity_country
        - entity_code
        - entity_office
        - control_digits
      description: International Bank Account Number
      title: IBANIdentifierSchema
    ClabeIdentifierSchema:
      type: object
      properties:
        value:
          type: string
          format: clabe
          description: Clave Bancaria Estandarizada
        masked:
          type: string
          minLength: 1
          maxLength: 19
          description: Partial Clabe
        entity_country:
          type: string
          description: Bank Country
        entity_code:
          type: string
          description: Bank code
        entity_office:
          type: string
          description: Bank office
        control_digits:
          type: string
          description: Control digit
      required:
        - value
        - masked
        - entity_country
        - entity_code
        - entity_office
        - control_digits
      description: Clave Bancaria Estandarizada
      title: ClabeIdentifierSchema
    PersonalLoanSchemaLinkedAccount:
      oneOf:
        - $ref: '#/components/schemas/IBANIdentifierSchema'
        - $ref: '#/components/schemas/ClabeIdentifierSchema'
        - $ref: '#/components/schemas/GenericIdentifierSchema'
      description: Linked account
      title: PersonalLoanSchemaLinkedAccount
    CustomerSegment:
      type: string
      enum:
        - not_assigned
        - personal
        - business
        - corporate
        - private
        - retail
      title: CustomerSegment
    InfoniteSchemasUtilsCurrencyAmountSchema1Currency:
      oneOf:
        - type: string
          format: currency
        - type: string
          enum:
            - '***'
      description: >-
        Three-letter ISO currency code — or `***` when the source did not
        disclose the currency.
      title: InfoniteSchemasUtilsCurrencyAmountSchema1Currency
    infonite__schemas__utils__CurrencyAmountSchema__1:
      type: object
      properties:
        currency:
          $ref: >-
            #/components/schemas/InfoniteSchemasUtilsCurrencyAmountSchema1Currency
          description: >-
            Three-letter ISO currency code — or `***` when the source did not
            disclose the currency.
        amount:
          type: string
          format: number
          description: Decimal number with 2 digits precision
      required:
        - currency
        - amount
      description: A monetary amount together with its currency.
      title: infonite__schemas__utils__CurrencyAmountSchema__1
    InfonitePydanticFieldsCommonRate1Unit:
      oneOf:
        - type: string
          enum:
            - '%'
        - type: string
          format: currency
      title: InfonitePydanticFieldsCommonRate1Unit
    infonite__pydantic__fields__common___Rate__1:
      type: object
      properties:
        value:
          type: string
          format: number
          default: NaN
          description: Decimal number with 6 digits precision
        unit:
          $ref: '#/components/schemas/InfonitePydanticFieldsCommonRate1Unit'
          default: '%'
        description:
          type:
            - string
            - 'null'
      title: infonite__pydantic__fields__common___Rate__1
    PersonalLoanSchema:
      type: object
      properties:
        id:
          type: string
          format: object-id
          description: >-
            Product ID for the current execution. Note: it may change between
            executions.
        product:
          type: string
          enum:
            - financial_loan
        sub_family:
          type: string
          enum:
            - financial_loan:personal
        fetch_date:
          type: string
          format: datetime
          description: Date this product was fetched
        identifier:
          $ref: '#/components/schemas/GenericIdentifierSchema'
          description: Loan identifier
        linked_account:
          $ref: '#/components/schemas/PersonalLoanSchemaLinkedAccount'
          description: Linked account
        customer_segment:
          $ref: '#/components/schemas/CustomerSegment'
        product_name:
          type: string
          description: Product name
        product_alias:
          type: string
          description: Product alias
        product_description:
          type: string
          description: Product Description
        initial_balance:
          $ref: >-
            #/components/schemas/infonite__schemas__utils__CurrencyAmountSchema__1
          description: Initial balance of the loan
        outstanding_balance:
          $ref: >-
            #/components/schemas/infonite__schemas__utils__CurrencyAmountSchema__1
          description: Outstanding balance of the loan
        next_payment_amount:
          $ref: >-
            #/components/schemas/infonite__schemas__utils__CurrencyAmountSchema__1
          description: Next payment amount
        begin_date:
          type: string
          format: date
          description: Loan start date
        renovation_date:
          type: string
          format: date
          description: Renovation Date
        end_date:
          type: string
          format: date
          description: Loan expected end date
        next_payment_date:
          type: string
          format: date
          description: Next payment date
        interest_rate:
          $ref: '#/components/schemas/infonite__pydantic__fields__common___Rate__1'
          description: Loan interest rate
        current_period:
          type: integer
          description: Current period
        pending_periods:
          type: integer
          description: Pending periods
        total_periods:
          type: integer
          description: Total periods
      required:
        - id
        - product
        - sub_family
        - fetch_date
        - identifier
        - customer_segment
        - product_name
      title: PersonalLoanSchema
```

## Mortgages

The same shape, plus the fields a long-term loan needs: which period it is in and how many are left.

### Schema (`MortgageSchema`)

```yaml
components:
  schemas:
    GenericIdentifierSchema:
      type: object
      properties:
        value:
          type: string
          description: Identifier
        entity_country:
          type: string
          format: country
          description: Entity country
        entity_code:
          type: string
          description: Entity code
        entity_office:
          type: string
          description: Entity office
        control_digits:
          type: string
          description: Control digits
      required:
        - value
      description: Generic account identifier
      title: GenericIdentifierSchema
    IBANIdentifierSchema:
      type: object
      properties:
        value:
          type: string
          format: iban
          description: International Bank Account Number
        masked:
          type: string
          minLength: 1
          maxLength: 34
          description: Partial IBAN
        entity_country:
          type: string
          description: Bank Country
        entity_code:
          type: string
          description: Bank code
        entity_office:
          type: string
          description: Bank office
        control_digits:
          type: string
          description: Control digits
      required:
        - value
        - masked
        - entity_country
        - entity_code
        - entity_office
        - control_digits
      description: International Bank Account Number
      title: IBANIdentifierSchema
    ClabeIdentifierSchema:
      type: object
      properties:
        value:
          type: string
          format: clabe
          description: Clave Bancaria Estandarizada
        masked:
          type: string
          minLength: 1
          maxLength: 19
          description: Partial Clabe
        entity_country:
          type: string
          description: Bank Country
        entity_code:
          type: string
          description: Bank code
        entity_office:
          type: string
          description: Bank office
        control_digits:
          type: string
          description: Control digit
      required:
        - value
        - masked
        - entity_country
        - entity_code
        - entity_office
        - control_digits
      description: Clave Bancaria Estandarizada
      title: ClabeIdentifierSchema
    MortgageSchemaLinkedAccount:
      oneOf:
        - $ref: '#/components/schemas/IBANIdentifierSchema'
        - $ref: '#/components/schemas/ClabeIdentifierSchema'
        - $ref: '#/components/schemas/GenericIdentifierSchema'
      description: Linked account
      title: MortgageSchemaLinkedAccount
    CustomerSegment:
      type: string
      enum:
        - not_assigned
        - personal
        - business
        - corporate
        - private
        - retail
      title: CustomerSegment
    InfoniteSchemasUtilsCurrencyAmountSchema1Currency:
      oneOf:
        - type: string
          format: currency
        - type: string
          enum:
            - '***'
      description: >-
        Three-letter ISO currency code — or `***` when the source did not
        disclose the currency.
      title: InfoniteSchemasUtilsCurrencyAmountSchema1Currency
    infonite__schemas__utils__CurrencyAmountSchema__1:
      type: object
      properties:
        currency:
          $ref: >-
            #/components/schemas/InfoniteSchemasUtilsCurrencyAmountSchema1Currency
          description: >-
            Three-letter ISO currency code — or `***` when the source did not
            disclose the currency.
        amount:
          type: string
          format: number
          description: Decimal number with 2 digits precision
      required:
        - currency
        - amount
      description: A monetary amount together with its currency.
      title: infonite__schemas__utils__CurrencyAmountSchema__1
    InfonitePydanticFieldsCommonRate1Unit:
      oneOf:
        - type: string
          enum:
            - '%'
        - type: string
          format: currency
      title: InfonitePydanticFieldsCommonRate1Unit
    infonite__pydantic__fields__common___Rate__1:
      type: object
      properties:
        value:
          type: string
          format: number
          default: NaN
          description: Decimal number with 6 digits precision
        unit:
          $ref: '#/components/schemas/InfonitePydanticFieldsCommonRate1Unit'
          default: '%'
        description:
          type:
            - string
            - 'null'
      title: infonite__pydantic__fields__common___Rate__1
    MortgageSchema:
      type: object
      properties:
        id:
          type: string
          format: object-id
          description: >-
            Product ID for the current execution. Note: it may change between
            executions.
        product:
          type: string
          enum:
            - financial_loan
        sub_family:
          type: string
          enum:
            - financial_loan:mortgage
        fetch_date:
          type: string
          format: datetime
          description: Date this product was fetched
        identifier:
          $ref: '#/components/schemas/GenericIdentifierSchema'
          description: Loan identifier
        linked_account:
          $ref: '#/components/schemas/MortgageSchemaLinkedAccount'
          description: Linked account
        customer_segment:
          $ref: '#/components/schemas/CustomerSegment'
        product_name:
          type: string
          description: Product name
        product_alias:
          type: string
          description: Product alias
        product_description:
          type: string
          description: Product Description
        initial_balance:
          $ref: >-
            #/components/schemas/infonite__schemas__utils__CurrencyAmountSchema__1
          description: Initial balance of the loan
        outstanding_balance:
          $ref: >-
            #/components/schemas/infonite__schemas__utils__CurrencyAmountSchema__1
          description: Outstanding balance of the loan
        next_payment_amount:
          $ref: >-
            #/components/schemas/infonite__schemas__utils__CurrencyAmountSchema__1
          description: Next payment amount
        begin_date:
          type: string
          format: date
          description: Loan start date
        renovation_date:
          type: string
          format: date
          description: Renovation Date
        end_date:
          type: string
          format: date
          description: Loan expected end date
        next_payment_date:
          type: string
          format: date
          description: Next payment date
        interest_rate:
          $ref: '#/components/schemas/infonite__pydantic__fields__common___Rate__1'
          description: Loan interest rate
        current_period:
          type: integer
          description: Current period
        pending_periods:
          type: integer
          description: Pending periods
        total_periods:
          type: integer
          description: Total periods
      required:
        - id
        - product
        - sub_family
        - fetch_date
        - identifier
        - customer_segment
        - product_name
      title: MortgageSchema
```

### Schema (`RealEstateLoanLine`)

```yaml
components:
  schemas:
    _CurrencyAmount:
      type: object
      additionalProperties:
        type: string
      title: _CurrencyAmount
    RealEstateLoanLine:
      type: object
      properties:
        loan_id:
          type: string
          description: Identifier of the loan
        lender_id:
          type: string
          description: Identifier of the lender (NIF/CIF)
        lender_name:
          type: string
          description: Name of the lender
        participation:
          type: string
          format: number
          default: nan
          description: Percentage of participation in the loan
        amortized_capital:
          $ref: '#/components/schemas/_CurrencyAmount'
          description: Total amortized capital
        interests:
          $ref: '#/components/schemas/_CurrencyAmount'
          description: Total interests paid
        financial_expenses:
          $ref: '#/components/schemas/_CurrencyAmount'
          description: Total financial expenses
        formalization_date:
          type: string
          format: date
          description: Date the loan was formalized
        taxpayer_id:
          type: string
          description: National identifier of the taxpayer for this line
      required:
        - loan_id
        - lender_id
        - lender_name
        - amortized_capital
        - interests
        - financial_expenses
        - taxpayer_id
      title: RealEstateLoanLine
```

**`next_payment_amount` and `next_payment_date` are the affordability numbers.** `outstanding_balance` says how much is left in total; the instalment says what it takes out of this month's income — which is the one a debt-to-income ratio is built from.