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

# Reports

> List the reports generated for your client, filtered by type and period, then use the returned id with the get-report endpoint to obtain a download link.

Retrieve the reports that have been generated for your client. This is the first step of a two-step flow: list the available reports here and copy the id of the one you want, then call the get-report endpoint to obtain a time-limited download link.

Authenticate every request with two headers provided by Flinks during onboarding: x-api-key and x-client-id.

Use filteringTypes to fetch only the reports you need. ClientSettlement is the daily settlement report and DailyProgress is the daily processing report. Narrow the results by period with startDate and endDate.

## Delivery methods

Reports can be consumed in two ways:

* Pull (this API): list reports, then request a time-limited download link, as described above.
* Push (SFTP): Flinks uploads the generated CSV to your SFTP server automatically, as soon as the report is produced.

## SFTP delivery

SFTP is an optional, per-client delivery mechanism and can be configured for any report type. To enable it, contact Flinks and provide:

* Host and port of the destination SFTP server.
* Username: Flinks authenticates with an SSH key pair (key-based authentication, no password). Authorize the Flinks public key for this user.
* Target directory for the uploaded file.
* PGP public key (optional): when supplied, the file is PGP-encrypted before upload.

Delivered files use the same naming convention as the API download (client id, report id, date, and a type code such as DSTR for settlement); a custom filename template can be configured on request.

Deliveries are retried automatically with exponential backoff. If delivery fails after all retries, the report remains retrievable through this API, so a failed push never results in data loss.


## OpenAPI

````yaml openapi-pay.yaml GET /api/v1/reports
openapi: 3.0.3
info:
  title: Flinks API
  description: >
    Flinks API provides financial data connectivity, enrichment, and payment
    solutions.


    ## Authentication

    Endpoints require authentication using `flinks-auth-key` header (Bearer
    token).


    For more information, visit: https://docs.flinks.com
  version: 3.0.0
  contact:
    name: Flinks Support
    url: https://www.flinks.com/contact/sales
  termsOfService: https://www.flinks.com
servers:
  - url: https://www.{baseurl}.com
    description: Flinks Pay Production
    variables:
      baseurl:
        default: '{baseurl}'
        description: The base URI for the environment (e.g. flinks)
security: []
tags:
  - name: Authorization
    description: Endpoints for generating authorization tokens and authenticating requests
  - name: Enrich - Consumer Attributes
    description: Consumer financial attribute analysis and credit risk assessment
paths:
  /api/v1/reports:
    get:
      tags:
        - Reports
      summary: List reports
      description: >-
        List the reports generated for your client, filtered by type and period,
        then use the returned id with the get-report endpoint to obtain a
        download link.
      operationId: listReports
      parameters:
        - name: x-api-key
          in: header
          required: true
          description: API key issued by Flinks.
          schema:
            type: string
        - name: x-client-id
          in: header
          required: true
          description: Your Flinks client ID.
          schema:
            type: string
        - name: filteringTypes
          in: query
          required: false
          description: Filter by report type; repeat the parameter for multiple values.
          schema:
            type: array
            items:
              type: string
              enum:
                - ClientSettlement
                - DailyProgress
                - DailyGEft
                - InternalMonthlyTransaction
        - name: startDate
          in: query
          required: false
          description: Start of the report period range in ISO 8601 format.
          schema:
            type: string
            format: date-time
        - name: endDate
          in: query
          required: false
          description: End of the report period range in ISO 8601 format.
          schema:
            type: string
            format: date-time
        - name: page
          in: query
          required: false
          schema:
            type: integer
        - name: pageSize
          in: query
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: A paginated list of reports.
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                  totalPages:
                    type: integer
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        reportType:
                          type: string
                        totalAmount:
                          type: number
                        totalTransactions:
                          type: integer
                        createdAt:
                          type: string
                          format: date-time
                        periodStart:
                          type: string
                          format: date-time
                        periodEnd:
                          type: string
                          format: date-time
        '400':
          description: Bad Request
        '401':
          description: Unauthorized

````