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

# Retrieve a Report

> Use this endpoint to retrieve the current status of a specific report.  

This endpoint lets you verify whether the report is pending, processing, completed, canceled, or failed. The response may also include additional details.



## OpenAPI

````yaml /en/openapi/v3-current/reporter.yaml get /v1/reports/{id}
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}:
    get:
      tags:
        - Reports API
      summary: Retrieve a Report
      description: >-
        Use this endpoint to retrieve the current status of a specific report.  


        This endpoint lets you verify whether the report is pending, processing,
        completed, canceled, or failed. The response may also include additional
        details.
      parameters:
        - $ref: '#/components/parameters/ReportId'
        - $ref: '#/components/parameters/Authorization'
        - $ref: '#/components/parameters/XOrganizationId'
      responses:
        '200':
          description: The details of the report.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadResponse'
              examples:
                '1':
                  summary: Processing
                  value:
                    id: 0196b268-620d-7d09-afa3-85e4d5369eg3
                    templateId: 0196b264-24d4-7e0b-ad5c-9028cc05138d
                    filters: null
                    status: Processing
                    completedAt: '2025-05-09T00:18:27.507Z'
                    createdAt: '2025-05-09T00:18:27.469Z'
                    updatedAt: '2025-05-09T00:18:27.469Z'
                    deletedAt: null
                '2':
                  summary: Completed
                  value:
                    id: 0196b268-620d-7d09-afa3-85e4d5369ef2
                    templateId: 0196b264-24d4-7e0b-ad5c-9028cc05138d
                    filters: null
                    status: Finished
                    completedAt: '2025-05-09T00:18:27.507Z'
                    createdAt: '2025-05-09T00:18:27.469Z'
                    updatedAt: '2025-05-09T00:18:27.469Z'
                    deletedAt: null
                '3':
                  summary: Failed
                  value:
                    reportId: 0195391c-c39f-7cac-8ec7-bc3a1af81a4e
                    status: Error
                    createdAt: '2025-02-28T11:50:00Z'
                    completedAt: '2025-02-28T11:55:00Z'
                    metadata:
                      error:
                        code: TPL-0013
                        title: Unallowed ledger ID
                        message: >-
                          One or more ledgerId values are not associated with
                          the organization.
                        details:
                          - 01963b0c-9c1a-77bc-8963-4f12eb8aacb5
          headers: {}
        '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'
      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:
    DownloadResponse:
      anyOf:
        - $ref: '#/components/schemas/Download'
        - $ref: '#/components/schemas/DownloadFailed'
          description: Details of reports that failed.
      description: Information about the report.
    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
    Download:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the report.
        templateId:
          type: string
          description: Unique identifier of the template used to generate the report.
        filters:
          type: object
          description: >-
            Object that defines the filtering criteria applied to the data used
            in the report. Now supports advanced filtering operators including
            `equality`, `comparison`, `range` and list-based conditions.
          additionalProperties:
            $ref: '#/components/schemas/DatabaseFilters'
        status:
          type: string
          description: The status of the report.
          enum:
            - Processing
            - Finished
        createdAt:
          type: string
          description: Timestamp marking when this report request was created.
        completedAt:
          type: string
          description: Timestamp marking when the report processing was completed.
        updatedAt:
          type: string
          description: Timestamp marking the last update to this report request.
        deletedAt:
          type: string
          description: >-
            Timestamp marking when this report request was soft deleted, if
            applicable.
        metadata:
          $ref: '#/components/schemas/Metadata'
      description: Details of reports that are processing or finished.
    DownloadFailed:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the report.
        templateId:
          type: string
          description: Unique identifier of the template used to generate the report.
        filters:
          type: object
          description: >-
            Object that defines the filtering criteria applied to the data used
            in the report. Now supports advanced filtering operators including
            `equality`, `comparison`, `range`, and list-based conditions.
          additionalProperties:
            $ref: '#/components/schemas/DatabaseFilters'
        status:
          type: string
          description: The status of the report.
          enum:
            - Error
        createdAt:
          type: string
          description: Timestamp marking when this report request was created.
        completedAt:
          type: string
          description: Timestamp marking when the report processing was completed.
        metadata:
          $ref: '#/components/schemas/Metadata'
      description: Details of reports that failed.
    DatabaseFilters:
      type: object
      description: >-
        Object where the key is the exact identifier of the data source to be
        filtered. Use the specific source ID configured in your organization —
        for example, use 'midaz_onboarding' for Onboarding data or 'plugin_crm'
        for CRM data, rather than generic labels like 'database_name'.  


        This identifier must match the name of a connected and accessible data
        source within your environment.  


        **Important**: This object is **optional**, but if provided, it **must**
        contain all necessary nested structures (`table`, `field` and
        `conditionals`) to ensure valid filtering. Partial or incomplete filter
        definitions will result in an error.
      additionalProperties:
        $ref: '#/components/schemas/TableFilters'
      example:
        midaz_onboarding:
          account:
            created_at:
              between:
                - '2025-08-02'
                - '2025-08-03'
    Metadata:
      type: object
      additionalProperties:
        type: string
      description: >-
        An object containing key-value pairs to add as metadata, where the field
        `name` is the key and the field `value` is the value. For example, to
        add a Cost Center, use 'costCenter': 'BR_11101997'.
    TableFilters:
      type: object
      description: >-
        **Mandatory** object where the key is the exact table name to be
        filtered within the selected data source. Use the precise name as
        defined in the database schema — for example, 'organization', 'account',
        'transaction', or 'fee', rather than a generic placeholder like
        'table_name'. This name must exactly match a table registered in the
        selected data source.
      additionalProperties:
        $ref: '#/components/schemas/FieldFilters'
      example:
        account:
          id:
            eq:
              - abc-123
          createdAt:
            between:
              - '2024-01-01'
              - '2024-12-31'
    FieldFilters:
      type: object
      description: >-
        **Mandatory** object whose key corresponds to the exact column name
        where the filtering conditions are applied. Use the field `name` exactly
        as defined in the table schema — e.g., 'accountId', 'status',
        'createdAt', or 'amount' — rather than a generic placeholder like
        'field_name'. This key must match the column name precisely to ensure
        proper query resolution.
      propertyNames:
        pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
      additionalProperties:
        $ref: '#/components/schemas/FilterOperators'
      example:
        id:
          eq:
            - abc-123
        createdAt:
          between:
            - '2024-01-01'
            - '2024-12-31'
    FilterOperators:
      type: object
      description: >-
        Object that specifies which logical operator(s) to apply to the selected
        field. Supports both simple and compound expressions. Each key is an
        operator name and its value is an array of operands.
      properties:
        eq:
          type: array
          description: >-
            Equal to — matches rows where the field value equals any of the
            provided values.
          items:
            oneOf:
              - type: string
              - type: number
        gt:
          type: array
          description: >-
            Greater than — matches rows where the field value is greater than
            the provided value.
          items:
            oneOf:
              - type: string
              - type: number
        gte:
          type: array
          description: >-
            Greater than or equal to — matches rows where the field value is
            greater than or equal to the provided value.
          items:
            oneOf:
              - type: string
              - type: number
        lt:
          type: array
          description: >-
            Less than — matches rows where the field value is less than the
            provided value.
          items:
            oneOf:
              - type: string
              - type: number
        lte:
          type: array
          description: >-
            Less than or equal to — matches rows where the field value is less
            than or equal to the provided value.
          items:
            oneOf:
              - type: string
              - type: number
        between:
          type: array
          description: >-
            Range filter — matches rows where the field value falls between two
            boundary values (inclusive). Expects exactly two items.
          minItems: 2
          maxItems: 2
          items:
            oneOf:
              - type: string
              - type: number
        in:
          type: array
          description: >-
            List inclusion — matches rows where the field value is one of the
            provided values.
          items:
            oneOf:
              - type: string
              - type: number
        nin:
          type: array
          description: >-
            List exclusion — matches rows where the field value is not one of
            the provided values.
          items:
            oneOf:
              - type: string
              - type: number
      additionalProperties: false
  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.

````