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

# /GetStatements

> To retrieve PDF statements from a customer's financial institution, use the /GetStatements endpoint.

To retrieve PDF statements from a customer's financial institution, use the `/GetStatements` endpoint.

You must first call the `/Authorize` endpoint to get a valid `RequestId`.

<Note>
  <p class="h4">This endpoint is only available to clients who are based in Canada</p>

  If you are based in Canada and want to use this feature, contact your Flinks Representative and we will enable it for you in your private instance.
</Note>

<Warning>
  <p class="h4">Add the Flinks Connect parameter to your iframe URL before calling this endpoint</p>

  To retrieve statements successfully, you must add the Flinks Connect parameter `detailsAndStatementEnable=true` to your iframe URL.
</Warning>


## OpenAPI

````yaml POST /v3/{customerId}/BankingServices/GetStatements
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://{instance}-api.private.fin.ag
    description: Flinks API Environment
    variables:
      instance:
        default: toolbox
        description: The environment instance (e.g., toolbox, sandbox, production)
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:
  /v3/{customerId}/BankingServices/GetStatements:
    post:
      tags:
        - Connect
      summary: Get Statements
      description: >-
        To retrieve PDF statements from a customer's financial institution, use
        the /GetStatements endpoint.
      operationId: getStatements
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
            default: 43387ca6-0391-4c82-857d-70d95f087ecb
          description: Key that grants access to the environment.
        - name: x-api-key
          in: header
          schema:
            type: string
          description: Security feature that grants access to this endpoint.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - RequestId
              properties:
                RequestId:
                  type: string
                  description: >-
                    Unique identifier provided after a successful request to the
                    /Authorize endpoint.
                NumberOfStatements:
                  type: string
                  default: MostRecent
                  enum:
                    - MostRecent
                    - Months3
                    - Months12
                  description: >-
                    Number of PDF banking statements that are returned per
                    customer account.
                AccountsFilter:
                  type: array
                  items:
                    type: string
                  description: >-
                    You can include the AccountsFilter parameter in the request
                    body.
              example:
                NumberOfStatements: MostRecent
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  HttpStatusCode:
                    type: integer
                  StatementsByAccount:
                    type: array
                    description: Array containing statements organized by account.
                    items:
                      type: object
                      properties:
                        AccountNumber:
                          type: string
                          description: >-
                            The account number for which statements are
                            provided.
                        Statements:
                          type: array
                          description: Array of statement objects for this account.
                          items:
                            type: object
                            properties:
                              UniqueId:
                                type: string
                                description: Unique identifier for the statement.
                              FileType:
                                type: string
                                description: File format of the statement (e.g., "PDF").
                              Base64Bytes:
                                type: string
                                description: >-
                                  Base64-encoded bytes of the PDF statement
                                  file.
                  Login:
                    type: object
                    description: Login information.
                    properties:
                      Username:
                        type: string
                      IsScheduledRefresh:
                        type: boolean
                      LastRefresh:
                        type: string
                      Type:
                        type: string
                      Id:
                        type: string
                  Institution:
                    type: string
                  RequestId:
                    type: string
              example:
                HttpStatusCode: 200
                StatementsByAccount:
                  - AccountNumber: '1111000'
                    Statements:
                      - UniqueId: 3DD209E106553D2BB0A6EFF57FD0480C
                        FileType: PDF
                        Base64Bytes: ...
                Login:
                  Username: Greatday
                  IsScheduledRefresh: false
                  LastRefresh: '2019-05-17T15:29:23.7035672'
                  Type: Personal
                  Id: 34c85a5d-f278-467b-29ed-08d682e1fef5
                Institution: FlinksCapital
                RequestId: f56f8b80-9949-4c60-ad63-dcdc0fd1456b
        '202':
          description: Operation Pending
          content:
            application/json:
              schema:
                type: object
                properties:
                  FlinksCode:
                    type: string
                  Links:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                        href:
                          type: string
                        example:
                          type: string
                  HttpStatusCode:
                    type: integer
                  Message:
                    type: string
                  RequestId:
                    type: string
              example:
                FlinksCode: OPERATION_PENDING
                Links:
                  - rel: '{Endpoint}Async'
                    href: /{Endpoint}Async
                    example: /{Endpoint}Async/{requestId}
                HttpStatusCode: 202
                Message: Your operation is still processing
                RequestId: f56f8b80-9949-4c60-ad63-dcdc0fd1456b

````