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

# Get Statements

> Use the /api/fdx/5/accounts/{accountId}/statements endpoint to retrieve a paginated list of available statements for a particular account.

Use the `/api/fdx/5/accounts/{accountId}/statements` endpoint to get a paginated list of the statements available for a particular account. Use the `statementId` from the response to call [Download Statement](/api/outbound/endpoints/fdx/download-statement).

To successfully call this endpoint, you must first call the [/Token](/api/outbound/endpoints/authorize/token) endpoint to obtain a valid `access_token` using:

* grant\_type: `authorization_code` or `refresh_token`
* client\_id: `{recipient client_id}`
* client\_secret: `{recipient client_secret}`
* redirect\_uri: `{recipient redirect_uri}`
* code: `{with grant type authorization_code}`
* refresh\_token: `{with grant type refresh_token}`

## Filter and paginate results

Use `startTime` and `endTime` (`YYYY-MM-DD`) to limit the statements to a date range. If you provide one, you must provide both, and `startTime` must not be after `endTime`. Otherwise you'll receive error 702 or 703. A date that isn't in `YYYY-MM-DD` format returns error 401 (Invalid Input). If you omit both dates, the Data Provider applies a default date range, which varies by provider. Use `limit` to set the page size. When more results are available, the response includes `page.nextOffset` and `links.next.href`. Pass the `nextOffset` value as the `offset` parameter to get the next page.

## Partial success

If the Data Provider can only return part of the data, the endpoint responds with HTTP 206 Partial Content and the same response body.

## Statement status

Each statement has a `status` that tells you whether it can be downloaded. The status is set by the Data Provider, so the statements a provider returns, and when they become `AVAILABLE`, can vary.

| **STATUS** | **DESCRIPTION** |
| :- | :- |
| `AVAILABLE` | The statement is ready to download. |
| `PROCESSING` | The statement is still being generated. Try again later. |
| `FAILED` | Generating the statement failed. It can't be downloaded. |

<Note>
  <p class="h4">Not all Data Providers support this endpoint</p>

  If the Data Provider does not support statements, this endpoint returns error 501 (Subsystem unavailable) with a 405 status code.
</Note>

## How to handle an error response

If you receive an error response, refer to the [List of Data Access Errors](/api/outbound/endpoints/fdx/fdx-errors) for more information about the error and how to resolve it.

<ResponseExample>
  ```json 200 - First Page theme={null}
  {
    "page": {
      "nextOffset": "97fcd39f-6e32-470b-a107-d4cb1080abcc",
      "totalElements": 12
    },
    "links": {
      "next": {
        "href": "https://ob-preprod.flinksapp.dev/api/fdx/5/accounts/11/statements?startTime=2025-01-01&endTime=2025-12-31&limit=2&offset=97fcd39f-6e32-470b-a107-d4cb1080abcc"
      }
    },
    "statements": [
      {
        "accountId": "11",
        "statementId": "20001",
        "statementDate": "2025-12-31",
        "description": "December 2025 statement",
        "status": "AVAILABLE"
      },
      {
        "accountId": "11",
        "statementId": "20002",
        "statementDate": "2025-11-30",
        "description": "November 2025 statement",
        "status": "PROCESSING"
      }
    ]
  }
  ```

  ```json 200 - Last Page theme={null}
  {
    "statements": [
      {
        "accountId": "11",
        "statementId": "20012",
        "statementDate": "2025-01-31",
        "description": "January 2025 statement",
        "status": "AVAILABLE"
      }
    ]
  }
  ```

  ```json 4XX - Result theme={null}
  {
    "code": 702,
    "message": "Invalid start or end date",
    "debugMessage": "Start time is invalid"
  }
  ```

  ```json 5XX - Result theme={null}
  {
    "code": 500,
    "message": "Internal Server Error",
    "debugMessage": "An unexpected error occured"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi-outbound.yaml GET /api/fdx/5/accounts/{account_id}/statements
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://ob.flinksapp.com
    description: Flinks Outbound Production
security:
  - BearerAuth: []
tags:
  - name: Authorization
    description: Endpoints for generating authorization tokens and authenticating requests
paths:
  /api/fdx/5/accounts/{account_id}/statements:
    get:
      tags:
        - FDX
      summary: Get Statements
      description: >-
        Use the /api/fdx/5/accounts/{accountId}/statements endpoint to retrieve
        a paginated list of available statements for a particular account.
      operationId: fdxGetStatements
      parameters:
        - name: account_id
          in: path
          required: true
          description: >-
            The ID of the customer account that you want to retrieve statements
            for.
          schema:
            type: string
        - name: startTime
          in: query
          required: false
          description: >-
            The first date in the date range that you want to retrieve
            statements for, in ISO format (YYYY-MM-DD).
          schema:
            type: string
            format: date
        - name: endTime
          in: query
          required: false
          description: >-
            The last date in the date range that you want to retrieve statements
            for, in ISO format (YYYY-MM-DD).
          schema:
            type: string
            format: date
        - name: offset
          in: query
          required: false
          description: Opaque cursor used by the provider to send the next set of records.
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: >-
            The maximum number of statements that you want to return with this
            request. Use this field to set a limit on the amount of data you
            receive.
          schema:
            type: integer
      responses:
        '200':
          description: >-
            Returned when the statements are successfully retrieved with
            pagination.
          content:
            application/json:
              schema:
                type: object
                properties:
                  page:
                    type: object
                    description: Pagination information for the response.
                    properties:
                      nextOffset:
                        type: string
                        description: Opaque cursor for retrieving the next page of results.
                      totalElements:
                        type: integer
                        description: Total number of elements available.
                  links:
                    type: object
                    description: Links for pagination.
                    properties:
                      next:
                        type: object
                        description: Link to the next page of results.
                        properties:
                          href:
                            type: string
                            description: URL for the next page.
                  statements:
                    type: array
                    description: List of statements for the account.
                    items:
                      type: object
                      properties:
                        accountId:
                          type: string
                          description: Corresponds to the accountId in the Account entity.
                        statementId:
                          type: string
                          description: >-
                            Long-term persistent identity of the statement. Use
                            this value to call Download Statement.
                        statementDate:
                          type: string
                          description: Date of the statement.
                        description:
                          type: string
                          description: Description of the statement.
                        status:
                          type: string
                          description: Availability status of the statement.
                          enum:
                            - AVAILABLE
                            - PROCESSING
                            - FAILED
        '206':
          description: >-
            Returned when the Data Provider can only return part of the
            statements. The response body has the same structure as the 200
            response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  page:
                    type: object
                    description: Pagination information for the response.
                    properties:
                      nextOffset:
                        type: string
                        description: Opaque cursor for retrieving the next page of results.
                      totalElements:
                        type: integer
                        description: Total number of elements available.
                  links:
                    type: object
                    description: Links for pagination.
                    properties:
                      next:
                        type: object
                        description: Link to the next page of results.
                        properties:
                          href:
                            type: string
                            description: URL for the next page.
                  statements:
                    type: array
                    description: List of statements for the account.
                    items:
                      type: object
                      properties:
                        accountId:
                          type: string
                          description: Corresponds to the accountId in the Account entity.
                        statementId:
                          type: string
                          description: >-
                            Long-term persistent identity of the statement. Use
                            this value to call Download Statement.
                        statementDate:
                          type: string
                          description: Date of the statement.
                        description:
                          type: string
                          description: Description of the statement.
                        status:
                          type: string
                          description: Availability status of the statement.
                          enum:
                            - AVAILABLE
                            - PROCESSING
                            - FAILED
        4XX:
          description: >-
            Returned when the request contains invalid data or authentication
            fails.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: Error code.
                  message:
                    type: string
                    description: A description of the error.
                  debugMessage:
                    type: string
                    description: >-
                      Provider custom developer-level error details for
                      troubleshooting.
        5XX:
          description: Returned when an internal server error occurred.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: Error code.
                  message:
                    type: string
                    description: A description of the error.
                  debugMessage:
                    type: string
                    description: >-
                      Provider custom developer-level error details for
                      troubleshooting.
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer token obtained from the /Token endpoint.

````