> This page is for Direct Executions.

> 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.

# Taxes

**Where it lives:** in the Spain Public Administration results, at `data.tax.individual_yearly`. APIs with dedicated per-product results endpoints return this model directly.

One entry per fiscal year: what the Agencia Tributaria holds about the person for that year, read in their name from the AEAT's own site with their consent.

## Two documents, and why both matter

For each year the AEAT keeps two different things, and this model carries both:

|                      | The fiscal data (*datos fiscales*)                                                                                                                                                 | The income-tax return (*Modelo 100*)                                                                |
| :------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------- |
| **Who writes it**    | **Third parties**: employers, banks, lenders, brokers, charities — whoever is obliged to report to the AEAT about the person.                                                      | **The person**, when they file.                                                                     |
| **What it holds**    | Every payer and every entity, line by line: who paid them and what was withheld, which bank account earned interest, which lender holds their mortgage and how much they paid off. | The totals the person declared, the deductions they applied and the result.                         |
| **Where it is here** | The structured fields: `income`, `liabilities`, `deductions`, the fiscal address.                                                                                                  | An [attachment](/guides/data-models/attachments): the official PDF, `attachment:es-aeat-model-100`. |

The fiscal data is the part a PDF of the return never shows. A return says the person declared mortgage interest; the fiscal data says **which bank** lent the money, **since when**, the person's **share** of the loan and how much capital they paid back that year. The same goes for income: the return has a total, the fiscal data has every employer and every account behind it.

## How many years

The session reads the **last closed fiscal years**, counting back from last year, as many as `last_n_years` asks: **from 1 to 5, 3 by default**. A session opened in 2026 with the default reads 2025, 2024 and 2023.

```json
{
  "executions_features": [
    { "code": "yearly_individual_tax", "configurations": { "last_n_years": 5 } }
  ]
}
```

A year whose fiscal data the AEAT does not publish is left out, and the other years are delivered: a fiscal year's data usually appears in the spring after it closes.

## What a year says

* **`status`** — `submitted` when the person's return for that year was filed and processed by the AEAT; `data` when only the fiscal data was found.
* **Income**, by kind: employment (every employer, with gross pay, withholding and social security contributions), economic activities (each with its activity code), interest from every bank account, savings income, and sales of shares and funds.
* **`liabilities.real_estate_loans`** — every loan linked to a home: the lender, the date it was signed, the person's **participation** in it, and the capital and interest paid that year.
* **Deductions**: donations, entity by entity.
* **The fiscal address** for the year, with the cadastral reference of the main home in `address_reference`.

### Schema (`YearlyPersonalTaxSituationSchema`)

```yaml
components:
  schemas:
    AddressSchema:
      type: object
      properties:
        title:
          type:
            - string
            - 'null'
          description: Free label for the address (e.g. `Headquarter`, `Domicilio`).
        street:
          type:
            - string
            - 'null'
          description: 'Street line: name and number.'
        street_extra:
          type:
            - string
            - 'null'
          description: 'Second street line: floor, suite, staircase, apartment...'
        municipality:
          type:
            - string
            - 'null'
          description: Municipality the address belongs to.
        city:
          type:
            - string
            - 'null'
          description: City or town.
        state:
          type:
            - string
            - 'null'
          description: State or province code.
        country:
          type:
            - string
            - 'null'
          format: country
          description: Country, as a two-letter ISO code.
        zip_code:
          type:
            - string
            - 'null'
          description: Postal code.
      description: >-
        A postal address. It is reused wherever the platform reports one — a
        person's home, a

        company's registered office, a property's location — so these fields
        describe the address

        itself; what it belongs to is told by the object carrying it.
      title: AddressSchema
    FiscalDataStatus:
      type: string
      enum:
        - unknown
        - data
        - draft
        - submitted
        - not_required
        - amended
      title: FiscalDataStatus
    YearlyPersonalTaxSituationSchemaFilingCategory:
      type: string
      enum:
        - individual
        - joint
      description: Category of the tax filing
      title: YearlyPersonalTaxSituationSchemaFilingCategory
    _CurrencyAmount-Output:
      type: object
      additionalProperties:
        type: string
      title: _CurrencyAmount-Output
    CurrencyAmountInputCurrency:
      oneOf:
        - type: string
          enum:
            - '***'
        - type: string
          format: currency
      title: CurrencyAmountInputCurrency
    _CurrencyAmount-Input:
      type: object
      properties:
        currency:
          $ref: '#/components/schemas/CurrencyAmountInputCurrency'
          default: '***'
        amount:
          type: string
          format: number
          default: NaN
          description: Decimal number with 2 digits precision
      title: _CurrencyAmount-Input
    EmploymentIncomeLine:
      type: object
      properties:
        employer_id:
          type: string
          description: Identifier of the employer (NIF/CIF)
        employer_name:
          type: string
          description: Name of the employer
        gross_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Gross income from this employer
        tax_withheld:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Income tax withheld by this employer
        social_security_contributions:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Social security contributions paid
        taxpayer_id:
          type: string
          description: National identifier of the taxpayer for this line
      required:
        - employer_id
        - employer_name
        - gross_income
        - tax_withheld
        - social_security_contributions
        - taxpayer_id
      title: EmploymentIncomeLine
    EmploymentIncome:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/EmploymentIncomeLine'
          description: List of employment income sources
        total_gross:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total gross employment income
        total_withheld:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total income tax withheld from employment
        total_social_security:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total social security contributions
      required:
        - lines
        - total_gross
        - total_withheld
        - total_social_security
      title: EmploymentIncome
    CapitalIncomeLine:
      type: object
      properties:
        provider_id:
          type: string
          description: Identifier of the financial entity (NIF/CIF)
        provider_name:
          type: string
          description: Name of the financial entity
        account_number:
          type: string
          description: Account number or IBAN
        asset_type:
          type: string
          description: Type of asset (e.g., Interests, Dividends)
        gross_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Gross capital income
        tax_withheld:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Tax withheld from capital income
        penalization:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Penalization for early withdrawal
        deductible_expenses:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Deductible administration or custody fees
        taxpayer_id:
          type: string
          description: National identifier of the taxpayer for this line
      required:
        - asset_type
        - gross_income
        - tax_withheld
        - penalization
        - deductible_expenses
        - taxpayer_id
      title: CapitalIncomeLine
    CapitalIncome:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/CapitalIncomeLine'
          description: List of capital income sources
        total_gross:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total gross capital income
        total_withheld:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total tax withheld from capital income
        total_penalization:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total penalization
        total_expenses:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total deductible expenses
      required:
        - lines
        - total_gross
        - total_withheld
        - total_penalization
        - total_expenses
      title: CapitalIncome
    CapitalGainLine:
      type: object
      properties:
        issuer_id:
          type: string
          description: Identifier of the issuer
        issuer_name:
          type: string
          description: Name of the issuer
        broker_id:
          type: string
          description: Identifier of the broker
        broker_name:
          type: string
          description: Name of the broker
        asset_description:
          type: string
          description: Description of the asset sold
        asset_type:
          type: string
          description: Type of asset (e.g., Shares, Crypto, Real Estate)
        sale_date:
          type: string
          format: date
          description: Date of sale
        sale_value:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total sale value (net of expenses)
        sale_expenses:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Expenses associated with the sale
        taxpayer_id:
          type: string
          description: National identifier of the taxpayer for this line
      required:
        - asset_description
        - asset_type
        - sale_value
        - sale_expenses
        - taxpayer_id
      title: CapitalGainLine
    CapitalGains:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/CapitalGainLine'
          description: List of capital gain operations
      required:
        - lines
      title: CapitalGains
    BusinessActivityLine:
      type: object
      properties:
        payer_id:
          type: string
          description: Payer NIF
        description:
          type: string
          description: Description of the business activity
        activity_code:
          type: string
          description: Activity code (IAE / NACE)
        total_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total business income
        tax_withheld:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Tax withheld from the activity
        taxpayer_id:
          type: string
          description: National identifier of the taxpayer for this line
      required:
        - description
        - activity_code
        - total_income
        - tax_withheld
        - taxpayer_id
      title: BusinessActivityLine
    BusinessIncome:
      type: object
      properties:
        activities:
          type: array
          items:
            $ref: '#/components/schemas/BusinessActivityLine'
          description: List of business activities
        total_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total economic activities income
        total_withheld:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total economic activities withheld
        social_security_contributions:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Social security contributions paid
      required:
        - activities
        - total_income
        - total_withheld
        - social_security_contributions
      title: BusinessIncome
    RealEstateIncomeLine:
      type: object
      properties:
        cadastral_reference:
          type: string
          description: Cadastral reference of the property
        address:
          type: string
          description: Full address of the property
        gross_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Gross rental income
        deductible_expenses:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total deductible expenses for this property
        net_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Net rental income
        taxpayer_id:
          type: string
          description: National identifier of the taxpayer for this line
      required:
        - address
        - gross_income
        - deductible_expenses
        - net_income
        - taxpayer_id
      title: RealEstateIncomeLine
    RealEstateIncome:
      type: object
      properties:
        properties:
          type: array
          items:
            $ref: '#/components/schemas/RealEstateIncomeLine'
          description: List of rental properties
        total_gross_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total gross rental income
        total_net_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total net rental income
      required:
        - properties
        - total_gross_income
        - total_net_income
      title: RealEstateIncome
    IncomeDetails:
      type: object
      properties:
        employment:
          $ref: '#/components/schemas/EmploymentIncome'
          description: Employment income details
        capital:
          $ref: '#/components/schemas/CapitalIncome'
          description: Capital income details
        capital_gains:
          $ref: '#/components/schemas/CapitalGains'
          description: Capital gains and losses details
        business:
          $ref: '#/components/schemas/BusinessIncome'
          description: Business activity income details
        real_estate:
          $ref: '#/components/schemas/RealEstateIncome'
          description: Real estate/rental income details
      required:
        - employment
        - capital
        - capital_gains
        - business
        - real_estate
      title: IncomeDetails
    DonationLine:
      type: object
      properties:
        entity_id:
          type: string
          description: Identifier of the receiving entity (NIF/CIF)
        entity_name:
          type: string
          description: Name of the receiving entity
        donation_type:
          type: string
          description: Type of donation (e.g., Donativo)
        amount:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Amount donated
        is_recurring:
          type: boolean
          description: Whether the donation is recurring
        taxpayer_id:
          type: string
          description: National identifier of the taxpayer for this line
      required:
        - entity_id
        - entity_name
        - amount
        - is_recurring
        - taxpayer_id
      title: DonationLine
    DeductionDetails:
      type: object
      properties:
        donations:
          type: array
          items:
            $ref: '#/components/schemas/DonationLine'
          description: List of donations
        total_donations:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total donations
        personal_allowance:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Personal tax-free allowance
        family_allowance:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Family tax-free allowances (children, ascendants)
        regional_deductions:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total deductions applied at regional level
        state_deductions:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total deductions applied at state level
        total_deductions:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Grand total of all deductions
      required:
        - donations
        - total_donations
        - personal_allowance
        - family_allowance
        - regional_deductions
        - state_deductions
        - total_deductions
      title: DeductionDetails
    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
          description: Percentage of participation in the loan
        amortized_capital:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total amortized capital
        interests:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total interests paid
        financial_expenses:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          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
    LiabilityDetails:
      type: object
      properties:
        real_estate_loans:
          type: array
          items:
            $ref: '#/components/schemas/RealEstateLoanLine'
          default: []
          description: List of real estate loans
      title: LiabilityDetails
    ProductAttachmentType:
      type: string
      enum:
        - attachment:attachment
        - attachment:supplier_invoice
        - attachment:client_invoice
        - attachment:es-tgss-life-report
        - attachment:es-tgss-contribution-base-report
        - attachment:es-aeat-model-100
        - attachment:es-cirbe-report
        - attachment:sepa-direct-debit-bill
        - attachment:person-certified-photo
      description: Product Attachment Type
      title: ProductAttachmentType
    FileAttachmentSchema:
      type: object
      properties:
        product:
          type: string
          enum:
            - attachment
          default: attachment
          description: The product type identifier. Always `attachment`.
        sub_family:
          $ref: '#/components/schemas/ProductAttachmentType'
          description: >-
            What kind of document this is (e.g.
            `attachment:es-tgss-life-report`).
        id:
          type: string
          format: object-id
          description: >-
            Attachment identifier — what the attachments endpoint of the API
            that returned the result

            takes to download the file.
        content_name:
          type: string
          description: File name of the document.
        content_hash:
          type: string
          description: Fingerprint of the content, to verify its integrity.
        content_type:
          type: string
          format: mime-type
          description: MIME type of the content.
        metadata:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            Extra facts about the document, as simple key-value pairs (e.g. its
            official verification

            code, its issue date).
      required:
        - sub_family
        - id
        - content_name
        - content_type
        - metadata
      description: >-
        A document attached to a result — an official report, a receipt, an
        invoice... The entry

        describes the file; its bytes are downloaded with `id`, through the
        attachments endpoint of the

        API that returned the result.
      title: FileAttachmentSchema
    YearlyPersonalTaxSituationSchema:
      type: object
      properties:
        product:
          type: string
          enum:
            - tax_information
        sub_family:
          type: string
          enum:
            - tax_information:persons_yearly_fiscal_data
        fetch_date:
          type: string
          format: datetime
          description: Date this product was fetched
        primary_taxpayer:
          type: string
          description: National identifier of the taxpayer
        joint_taxpayers:
          type: array
          items:
            type: string
          description: List of national identifiers for joint taxpayers
        address:
          $ref: '#/components/schemas/AddressSchema'
          description: Fiscal address for the exercise
        address_reference:
          type: string
          description: Cadastral reference for the main home
        country_code:
          type: string
          format: country
          description: Country code for the tax declaration
        currency:
          type: string
          format: currency
          description: Currency for the tax declaration
        tax_agency:
          type: string
          description: Tax agency for the tax declaration
        fiscal_year_start:
          type: string
          format: date
          description: Start date of the fiscal year
        fiscal_year_end:
          type: string
          format: date
          description: End date of the fiscal year
        status:
          $ref: '#/components/schemas/FiscalDataStatus'
          description: Status of the fiscal data
        filing_category:
          $ref: '#/components/schemas/YearlyPersonalTaxSituationSchemaFilingCategory'
          description: Category of the tax filing
        taxable_base:
          $ref: '#/components/schemas/_CurrencyAmount-Output'
          description: Total taxable base
        total_tax_paid:
          $ref: '#/components/schemas/_CurrencyAmount-Output'
          description: Total tax paid or withheld
        final_tax_result:
          $ref: '#/components/schemas/_CurrencyAmount-Output'
          description: Final tax result (to be paid or refunded)
        income:
          $ref: '#/components/schemas/IncomeDetails'
          description: Detailed breakdown of income
        deductions:
          $ref: '#/components/schemas/DeductionDetails'
          description: Detailed breakdown of deductions
        liabilities:
          $ref: '#/components/schemas/LiabilityDetails'
          description: Detailed breakdown of liabilities
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/FileAttachmentSchema'
          default: []
          description: List of attached supporting documents
      required:
        - product
        - sub_family
        - fetch_date
        - primary_taxpayer
        - address
        - address_reference
        - country_code
        - currency
        - tax_agency
        - fiscal_year_start
        - fiscal_year_end
        - status
        - filing_category
        - taxable_base
        - total_tax_paid
        - final_tax_result
        - income
        - deductions
        - liabilities
      title: YearlyPersonalTaxSituationSchema
```

## The breakdown

Income, deductions and liabilities, each with its own detail:

### Schema (`IncomeDetails`)

```yaml
components:
  schemas:
    CurrencyAmountInputCurrency:
      oneOf:
        - type: string
          enum:
            - '***'
        - type: string
          format: currency
      title: CurrencyAmountInputCurrency
    _CurrencyAmount-Input:
      type: object
      properties:
        currency:
          $ref: '#/components/schemas/CurrencyAmountInputCurrency'
          default: '***'
        amount:
          type: string
          format: number
          default: NaN
          description: Decimal number with 2 digits precision
      title: _CurrencyAmount-Input
    EmploymentIncomeLine:
      type: object
      properties:
        employer_id:
          type: string
          description: Identifier of the employer (NIF/CIF)
        employer_name:
          type: string
          description: Name of the employer
        gross_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Gross income from this employer
        tax_withheld:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Income tax withheld by this employer
        social_security_contributions:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Social security contributions paid
        taxpayer_id:
          type: string
          description: National identifier of the taxpayer for this line
      required:
        - employer_id
        - employer_name
        - gross_income
        - tax_withheld
        - social_security_contributions
        - taxpayer_id
      title: EmploymentIncomeLine
    EmploymentIncome:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/EmploymentIncomeLine'
          description: List of employment income sources
        total_gross:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total gross employment income
        total_withheld:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total income tax withheld from employment
        total_social_security:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total social security contributions
      required:
        - lines
        - total_gross
        - total_withheld
        - total_social_security
      title: EmploymentIncome
    CapitalIncomeLine:
      type: object
      properties:
        provider_id:
          type: string
          description: Identifier of the financial entity (NIF/CIF)
        provider_name:
          type: string
          description: Name of the financial entity
        account_number:
          type: string
          description: Account number or IBAN
        asset_type:
          type: string
          description: Type of asset (e.g., Interests, Dividends)
        gross_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Gross capital income
        tax_withheld:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Tax withheld from capital income
        penalization:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Penalization for early withdrawal
        deductible_expenses:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Deductible administration or custody fees
        taxpayer_id:
          type: string
          description: National identifier of the taxpayer for this line
      required:
        - asset_type
        - gross_income
        - tax_withheld
        - penalization
        - deductible_expenses
        - taxpayer_id
      title: CapitalIncomeLine
    CapitalIncome:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/CapitalIncomeLine'
          description: List of capital income sources
        total_gross:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total gross capital income
        total_withheld:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total tax withheld from capital income
        total_penalization:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total penalization
        total_expenses:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total deductible expenses
      required:
        - lines
        - total_gross
        - total_withheld
        - total_penalization
        - total_expenses
      title: CapitalIncome
    CapitalGainLine:
      type: object
      properties:
        issuer_id:
          type: string
          description: Identifier of the issuer
        issuer_name:
          type: string
          description: Name of the issuer
        broker_id:
          type: string
          description: Identifier of the broker
        broker_name:
          type: string
          description: Name of the broker
        asset_description:
          type: string
          description: Description of the asset sold
        asset_type:
          type: string
          description: Type of asset (e.g., Shares, Crypto, Real Estate)
        sale_date:
          type: string
          format: date
          description: Date of sale
        sale_value:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total sale value (net of expenses)
        sale_expenses:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Expenses associated with the sale
        taxpayer_id:
          type: string
          description: National identifier of the taxpayer for this line
      required:
        - asset_description
        - asset_type
        - sale_value
        - sale_expenses
        - taxpayer_id
      title: CapitalGainLine
    CapitalGains:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/CapitalGainLine'
          description: List of capital gain operations
      required:
        - lines
      title: CapitalGains
    BusinessActivityLine:
      type: object
      properties:
        payer_id:
          type: string
          description: Payer NIF
        description:
          type: string
          description: Description of the business activity
        activity_code:
          type: string
          description: Activity code (IAE / NACE)
        total_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total business income
        tax_withheld:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Tax withheld from the activity
        taxpayer_id:
          type: string
          description: National identifier of the taxpayer for this line
      required:
        - description
        - activity_code
        - total_income
        - tax_withheld
        - taxpayer_id
      title: BusinessActivityLine
    BusinessIncome:
      type: object
      properties:
        activities:
          type: array
          items:
            $ref: '#/components/schemas/BusinessActivityLine'
          description: List of business activities
        total_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total economic activities income
        total_withheld:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total economic activities withheld
        social_security_contributions:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Social security contributions paid
      required:
        - activities
        - total_income
        - total_withheld
        - social_security_contributions
      title: BusinessIncome
    RealEstateIncomeLine:
      type: object
      properties:
        cadastral_reference:
          type: string
          description: Cadastral reference of the property
        address:
          type: string
          description: Full address of the property
        gross_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Gross rental income
        deductible_expenses:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total deductible expenses for this property
        net_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Net rental income
        taxpayer_id:
          type: string
          description: National identifier of the taxpayer for this line
      required:
        - address
        - gross_income
        - deductible_expenses
        - net_income
        - taxpayer_id
      title: RealEstateIncomeLine
    RealEstateIncome:
      type: object
      properties:
        properties:
          type: array
          items:
            $ref: '#/components/schemas/RealEstateIncomeLine'
          description: List of rental properties
        total_gross_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total gross rental income
        total_net_income:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total net rental income
      required:
        - properties
        - total_gross_income
        - total_net_income
      title: RealEstateIncome
    IncomeDetails:
      type: object
      properties:
        employment:
          $ref: '#/components/schemas/EmploymentIncome'
          description: Employment income details
        capital:
          $ref: '#/components/schemas/CapitalIncome'
          description: Capital income details
        capital_gains:
          $ref: '#/components/schemas/CapitalGains'
          description: Capital gains and losses details
        business:
          $ref: '#/components/schemas/BusinessIncome'
          description: Business activity income details
        real_estate:
          $ref: '#/components/schemas/RealEstateIncome'
          description: Real estate/rental income details
      required:
        - employment
        - capital
        - capital_gains
        - business
        - real_estate
      title: IncomeDetails
```

### Schema (`DeductionDetails`)

```yaml
components:
  schemas:
    CurrencyAmountInputCurrency:
      oneOf:
        - type: string
          enum:
            - '***'
        - type: string
          format: currency
      title: CurrencyAmountInputCurrency
    _CurrencyAmount-Input:
      type: object
      properties:
        currency:
          $ref: '#/components/schemas/CurrencyAmountInputCurrency'
          default: '***'
        amount:
          type: string
          format: number
          default: NaN
          description: Decimal number with 2 digits precision
      title: _CurrencyAmount-Input
    DonationLine:
      type: object
      properties:
        entity_id:
          type: string
          description: Identifier of the receiving entity (NIF/CIF)
        entity_name:
          type: string
          description: Name of the receiving entity
        donation_type:
          type: string
          description: Type of donation (e.g., Donativo)
        amount:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Amount donated
        is_recurring:
          type: boolean
          description: Whether the donation is recurring
        taxpayer_id:
          type: string
          description: National identifier of the taxpayer for this line
      required:
        - entity_id
        - entity_name
        - amount
        - is_recurring
        - taxpayer_id
      title: DonationLine
    DeductionDetails:
      type: object
      properties:
        donations:
          type: array
          items:
            $ref: '#/components/schemas/DonationLine'
          description: List of donations
        total_donations:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total donations
        personal_allowance:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Personal tax-free allowance
        family_allowance:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Family tax-free allowances (children, ascendants)
        regional_deductions:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total deductions applied at regional level
        state_deductions:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total deductions applied at state level
        total_deductions:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Grand total of all deductions
      required:
        - donations
        - total_donations
        - personal_allowance
        - family_allowance
        - regional_deductions
        - state_deductions
        - total_deductions
      title: DeductionDetails
```

### Schema (`LiabilityDetails`)

```yaml
components:
  schemas:
    CurrencyAmountInputCurrency:
      oneOf:
        - type: string
          enum:
            - '***'
        - type: string
          format: currency
      title: CurrencyAmountInputCurrency
    _CurrencyAmount-Input:
      type: object
      properties:
        currency:
          $ref: '#/components/schemas/CurrencyAmountInputCurrency'
          default: '***'
        amount:
          type: string
          format: number
          default: NaN
          description: Decimal number with 2 digits precision
      title: _CurrencyAmount-Input
    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
          description: Percentage of participation in the loan
        amortized_capital:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total amortized capital
        interests:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          description: Total interests paid
        financial_expenses:
          $ref: '#/components/schemas/_CurrencyAmount-Input'
          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
    LiabilityDetails:
      type: object
      properties:
        real_estate_loans:
          type: array
          items:
            $ref: '#/components/schemas/RealEstateLoanLine'
          default: []
          description: List of real estate loans
      title: LiabilityDetails
```

## The return, as the AEAT issued it

When the person filed a return for the year, its official PDF travels as an attachment of that year's entry, `attachment:es-aeat-model-100`. Its `metadata` carries the document's **secure verification code** (`csv-code`) and the address at the AEAT's site where anyone can check it (`csv-url`): the copy you keep can be proven authentic years later, without asking the person again.