> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Download a Report

> Use this endpoint to download a previously generated report (HTML, XML, CSV or TXT) that has finished processing (`status=Finished`).



## OpenAPI

````yaml /en/openapi/v3-current/reporter.yaml get /v1/reports/{id}/download
openapi: 3.1.0
info:
  title: Reporter
  description: ''
  version: 1.2.0
servers:
  - url: https://reporter.sandbox.lerian.net
security: []
tags: []
paths:
  /v1/reports/{id}/download:
    get:
      tags:
        - Reports API
      summary: Download a Report
      description: >-
        Use this endpoint to download a previously generated report (HTML, XML,
        CSV or TXT) that has finished processing (`status=Finished`).
      parameters:
        - $ref: '#/components/parameters/ReportId'
        - $ref: '#/components/parameters/Authorization'
        - $ref: '#/components/parameters/XOrganizationId'
      responses:
        '200':
          description: >-
            The successful response containing the rendered report and two
            headers:  

            - **Content-Type** (string): Indicates the format of the returned
            report
              - Possible values: `text/html`, `text/xml`, `text/csv`, `text/plain`
              - Example: `text/html`

            - **Content-Disposition** (string): Suggests how the client should
            handle the file
              - Example: `attachment; filename="report.html"`

            **Note**: The response examples illustrate possible outputs. In
            practice, you will only receive **one format at a time**, matching
            the `Content-Type` returned.
          headers:
            Content-Disposition:
              description: >-
                Indicates that the response should be handled as a downloadable
                file.
              schema:
                type: string
                example: attachment; filename="report.html"
            Content-Type:
              description: Indicates the format of the returned report.
              schema:
                type: string
                enum:
                  - text/html
                  - text/xml
                  - text/csv
                  - text/plain
                example: text/html
          content:
            '*/*':
              schema:
                type: string
              examples:
                HTMLReport:
                  summary: HTML report
                  value: |
                    HTTP/1.1 200 OK
                    Content-Type: text/html
                    Content-Disposition: attachment; filename="report.html"

                    <!DOCTYPE html>
                    <html lang="en">                    
                      <head>
                        <meta charset="UTF-8">
                        <meta name="viewport" content="width=device-width, initial-scale=1.0">
                        <title>Report: Financial Report</title>
                      </head>
                      <body>
                         <h1>Report: Financial Report</h1>
                        <p>Organization: XYZ Company Ltd</p>
                        <p>Ledger: Main Ledger</p>
                        <p>Date:30/04/2025</p>
                        <table border="1">
                          <thead>
                            <tr>
                              <th>AccountID</th>
                              <th>Alias</th>
                              <th>Balance</th>
                              <th>TransactionID</th>
                              <th>TransactionStatus</th>
                              <th>Amount</th>
                              <th>AssetCode</th>
                              <th>Route</th>
                              <th>ConcatAccountLedger</th>
                            </tr>
                          </thead>
                          <tbody>
                            <tr>
                              <td>12345</td>
                              <td>Checking Account</td>
                              <td>150.00</td>
                              <td>TXN001</td>
                              <td>Approved</td>
                              <td>50.00</td>
                              <td>BRL</td>
                              <td>Reveneus</td>
                              <td>Checking Account - Main Ledger</td>
                            </tr>
                            <tr>
                              <td>67890</td>
                              <td>Savings</td>
                              <td>250.00</td>
                              <td>TXN002</td>
                              <td>Approved</td>
                              <td>100.00</td>
                              <td>BRL</td>
                              <td>Investments</td>
                              <td>Savings - Main Ledger</td>
                            </tr>
                          </tbody>
                        </table>
                        <h2>Summary</h2>
                        <p>Total Accounts: 2</p>
                        <p>Total Amount: 150.00</p>
                        <p>Ledger Summary: Main Ledger - XYZ Company Ltd</p>
                      </body>
                    </html>
                XMLReport:
                  summary: XML report
                  value: |
                    HTTP/1.1 200 OK
                    Content-Type: text/xml
                    Content-Disposition: attachment; filename="report.xml"

                    <AnalyticalReport>
                      <Organization>Ferry, Stiedemann and Jast - CNPJ: 78425230000190</Organization>
                      <GenerationDate>28.04.2025</GenerationDate>
                      <Ledger>O'Connell, Dietrich and Bernhard</Ledger>
                      <Account>
                        <AccountID>01965efe-5afd-733d-9a64-3d53f73b13c8</AccountID>
                        <Alias>@external/BRL</Alias>
                        <CurrentBalance>1000.00</CurrentBalance>
                        <Currency>BRL</Currency>
                        <Operations>
                          <Operation>
                            <OperationID>01965f04-7087-73f1-a802-f8fceedb34ec</OperationID>
                            <Description>Initial transfer</Description>
                            <Type>DEBIT</Type>
                            <OriginalAmount>1000.00</OriginalAmount>
                            <DiscountAmount>30.00</DiscountAmount>
                            <FinalAmountWithDiscount>970.00</FinalAmountWithDiscount>
                            <Currency>BRL</Currency>
                          </Operation>
                        </Operations>
                        <AccountSummary>
                          <TotalOperations>1</TotalOperations>
                          <SumOfOperations>1000.00</SumOfOperations>
                          <AverageOfOperations>1000.00</AverageOfOperations>
                        </AccountSummary>
                      </Account>
                    </AnalyticalReport>
                CSVReport:
                  summary: CSV report
                  value: |
                    HTTP/1.1 200 OK
                    Content-Type: text/csv
                    Content-Disposition: attachment; filename="report.csv"

                    AccountID,Alias,Balance
                    12345,Checking Account,150.00
                    67890,Savings,250.00
                TXTReport:
                  summary: TXT report
                  value: |
                    HTTP/1.1 200 OK
                    Content-Type: text/plain
                    Content-Disposition: attachment; filename="report.txt"

                    ##########################################
                    #            PROOF OF PAYMENT            #
                    ##########################################

                    Generation Date: 23/05/2025 14:08
                    Ledger Name: Rice, Rowe and O'Hara

                    -----------------------------------------
                    Transaction ID: 019c96a0-10ce-75fc-a273-dc799079a99c
                    Transaction Date: 2025-05-22T14:15:22.123Z
                    Total Amount: 5000.00
                    Transaction Status: ACTIVE
                    ------------------------------------------

                    Source Accounts:
                    - Alias: @external|USD 
                    - Debit Amount: 1500.00

                    Target Accounts:
                    - Alias: @wallet_12345 
                    - Credit Value: 1500.00

                    ------------------------------------------
                    Automatically generated document.
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Error0004:
                  $ref: '#/components/examples/Error0004'
                Error0009:
                  $ref: '#/components/examples/Error0009'
                Error0011:
                  $ref: '#/components/examples/Error0011'
                Error0015:
                  $ref: '#/components/examples/Error0015'
                Error0016:
                  $ref: '#/components/examples/Error0016'
                Error0017:
                  $ref: '#/components/examples/Error0017'
                Error0018:
                  $ref: '#/components/examples/Error0018'
                Error0019:
                  $ref: '#/components/examples/Error0019'
                Error0029:
                  $ref: '#/components/examples/Error0029'
          headers: {}
      security: []
components:
  parameters:
    ReportId:
      name: id
      in: path
      description: Unique identifier for the report that you want to check.
      required: true
      schema:
        type: string
    Authorization:
      name: Authorization
      in: header
      description: >-
        The authorization token in the 'Bearer <token>' format.  


        **Important:** This header is required if your environment has Access
        Manager enabled. For more information, refer to the [Access
        Manager](/en/access-manager) documentation.
      required: false
      schema:
        type: string
    XOrganizationId:
      name: X-Organization-id
      in: header
      description: The unique identifier of the Organization associated with the request.
      required: true
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
  schemas:
    Error:
      type: object
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
      description: Response message error.
      required:
        - code
        - title
        - message
  examples:
    Error0004:
      summary: Invalid header
      value:
        code: TPL-0004
        title: Invalid header
        message: >-
          One or more header values are missing or incorrectly formatted. Please
          verify required headers %VALUE.
    Error0009:
      summary: Invalid Path Parameter
      value:
        code: TPL-0009
        title: Invalid Path Parameter
        message: >-
          Path parameters is in an incorrect format. Please check the following
          parameter %v and ensure they meet the required format before trying
          again.
    Error0011:
      summary: Entity Not Found
      value:
        code: TPL-0011
        title: Entity Not Found
        message: >-
          No %v entity was found for the given ID. Please make sure to use the
          correct ID for the entity you are trying to manage.
    Error0015:
      summary: Unexpected Fields in the Request
      value:
        code: TPL-0015
        title: Unexpected Fields in the Request
        message: >-
          The request body contains more fields than expected. Please send only
          the allowed fields as per the documentation. The unexpected fields are
          listed in the fields object.
    Error0016:
      summary: Missing Fields in Request
      value:
        code: TPL-0016
        title: Missing Fields in Request
        message: >-
          Your request is missing one or more required fields. Please refer to
          the documentation to ensure all necessary fields are included in your
          request.
    Error0017:
      summary: Bad Request
      value:
        code: TPL-0017
        title: Bad Request
        message: >-
          The server could not understand the request due to malformed syntax.
          Please check the listed fields and try again.
    Error0018:
      summary: Internal Server Error
      value:
        code: TPL-0018
        title: Internal Server Error
        message: >-
          The server encountered an unexpected error. Please try again later or
          contact support.
    Error0019:
      summary: Invalid Query Parameter
      value:
        code: TPL-0019
        title: Invalid Query Parameter
        message: >-
          One or more query parameters are in an incorrect format. Please check
          the following parameters '%v' and ensure they meet the required format
          before trying again.
    Error0029:
      summary: Report status not Finished
      value:
        code: TPL-0029
        title: Report status not Finished
        message: The Report is not ready to download. Report is processing yet.

````