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

# Get account statement

> Get account statement PDF




## OpenAPI

````yaml /openapi/fdx.yml get /fdx/v6/customer/{customerId}/accounts/{accountId}/statements/{statementId}
openapi: 3.0.3
info:
  version: 1.0.0
  title: Fiskil FDX API
  description: >
    The Fiskil FDX API is a subset of the FDX API specification suited to most
    Open Finance use cases. You must implement this API and configure it as your
    Data Provider's

    [Resource Server](/guide/resource_server) so your Data Provider can return
    the appropriate data once an authorisation has been created.

    ## FDX compliance


    The Fiskil FDX API specifications are a subset of the Financial Data
    Exchange (FDX) API specification, the usage thereof (or any part thereof)
    constitutes acceptance of the FDX API

    License Agreement, which can be found at https://financialdataexchange.org/.
    The FDX API specification is distributed exclusively by FDX. Modifications
    to eliminate required or

    conditional elements prescribed in the FDX API Certification Use Cases will
    render any implementations using said modifications non-conformant with the
    FDX API Certification Use Cases.

    Please note that building the FDX-compliant Data Provider API and permitting
    Fiskil to call your build constitutes acceptance of

    the FDX end user license agreement, which can be found at
    https://financialdataexchange.org/.

    The full FDX API standard specification is distributed exclusively by FDX.


    ## Error handling

    When handling errors in your API it is important you return the error
    structures defined in this specification so that your responses remain FDX
    compliant. Each API defines the

    various error conditions that you may encounter and how to represent them.
  contact:
    name: Fiskil Support
    url: https://fiskil.com
    email: support@fiskil.com.au
servers:
  - url: https://api.provider.fiskil.com
security:
  - bearerAuth: []
paths:
  /fdx/v6/customer/{customerId}/accounts/{accountId}/statements/{statementId}:
    get:
      tags:
        - Account Statements
      summary: Get account statement
      description: |
        Get account statement PDF
      operationId: getAccountStatement
      parameters:
        - $ref: '#/components/parameters/CustomerIdPath'
        - $ref: '#/components/parameters/AccountIdPath'
        - $ref: '#/components/parameters/StatementIdPath'
      responses:
        '200':
          description: |
            A pdf of an account statement
          content:
            application/pdf:
              schema:
                $ref: '#/components/schemas/StatementPDF'
        '404':
          $ref: '#/components/responses/responseErrorCustomerIdNotFound'
        '409':
          description: |
            Account is closed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountIsClosedError'
        '422':
          description: |
            Account type not supported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountTypeNotSupportedError'
        '500':
          description: |
            Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '503':
          description: |
            Scheduled maintenance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledMaintenanceError'
components:
  parameters:
    CustomerIdPath:
      name: customerId
      in: path
      description: >
        Unique identifier for the user the account belongs to. This will be the
        user that authorized the data sharing.
      required: true
      schema:
        $ref: '#/components/schemas/Identifier'
    AccountIdPath:
      name: accountId
      in: path
      description: >
        Account identifier, found in the `GET /accounts` endpoint response.


        **Note:** If the status of the `accountId` provided is `RESTRICTED`, you
        can send a 200 response with an empty body to indicate that no payment
        networks are available at this time.
      required: true
      schema:
        $ref: '#/components/schemas/Identifier'
    StatementIdPath:
      name: statementId
      in: path
      description: >
        Statement identifier, found in the `GET
        /accounts/{accountId}/statements` endpoint response
      required: true
      schema:
        $ref: '#/components/schemas/Identifier'
  schemas:
    StatementPDF:
      title: Statement PDF
      description: |
        An account statement in PDF format
      type: string
      format: binary
    AccountIsClosedError:
      title: Account Is Closed Error
      description: Error response when the API does not support closed accounts
      type: object
      properties:
        code:
          type: integer
          description: |
            FDX Error code for account is closed
          enum:
            - 705
          example: 705
        message:
          type: string
          description: >
            End user displayable information which might help the customer
            diagnose an error
        debugMessage:
          type: string
          description: >
            Message used to debug the root cause of the error. Provider can
            include an error GUID in message for their use
      required:
        - code
        - message
      example:
        code: 705
        message: Account is closed
        debugMessage: Operation is not supported by the closed account
    AccountTypeNotSupportedError:
      title: Account Type Not Supported Error
      description: >-
        Error response when the API does not supported the type of account
        requested
      type: object
      properties:
        code:
          type: integer
          description: |
            FDX Error code for account type not supported
          enum:
            - 704
          example: 704
        message:
          type: string
          description: >
            End user displayable information which might help the customer
            diagnose an error
        debugMessage:
          type: string
          description: >
            Message used to debug the root cause of the error. Provider can
            include an error GUID in message for their use
      required:
        - code
        - message
      example:
        code: 704
        message: Account type not supported
        debugMessage: The account type does not support the selected action
    InternalServerError:
      title: Internal Server Error
      description: Error response for internal server errors
      type: object
      properties:
        code:
          type: integer
          description: |
            FDX Error code for internal server error
          enum:
            - 500
          example: 500
        message:
          type: string
          description: >
            End user displayable information which might help the customer
            diagnose an error
        debugMessage:
          type: string
          description: >
            Message used to debug the root cause of the error. Provider can
            include an error GUID in message for their use
      required:
        - code
        - message
      example:
        code: 500
        message: Internal server error
        debugMessage: Provider custom developer-level error details for troubleshooting
    ScheduledMaintenanceError:
      title: Scheduled Maintenance Error
      description: Error response when system is under scheduled maintenance
      type: object
      properties:
        code:
          type: integer
          description: |
            FDX Error code for scheduled maintenance
          enum:
            - 503
          example: 503
        message:
          type: string
          description: >
            End user displayable information which might help the customer
            diagnose an error
        debugMessage:
          type: string
          description: >
            Message used to debug the root cause of the error. Provider can
            include an error GUID in message for their use
      required:
        - code
        - message
      example:
        code: 503
        message: Scheduled maintenance
        debugMessage: >-
          System is down for maintenance. Retry-After HTTP header may be used to
          communicate estimated time of recovery
    Identifier:
      title: Identifier
      description: |
        Value for a unique identifier
      type: string
      maxLength: 256
      example: someLongTermUniqueIDString
    GenericError:
      example:
        error: An error message
      type: object
      properties:
        error:
          type: string
          description: A message describing what caused the error
      required:
        - error
  responses:
    responseErrorCustomerIdNotFound:
      description: The customer ID in the URL path is invalid or not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericError'
            example:
              error: Customer not found
  securitySchemes:
    bearerAuth:
      description: >
        The Fiskil Data Provider will include a self-signed JWT as a Bearer
        token in the `Authorization` header.

        You should verify this JWT using the JWKS URL you can find for your Data
        Provider instance in the Fiskil

        Console. To verify the JWT you **must**:
          * Verify the signature
          * Ensure the token has not expired by checking the `exp` claim
          * The `sub` and `iss` claims are your data provider subdomain
          * The `aud` claim is the URI of the resource being requested (excluding any query parameters)
          * The `jti` value is unique
        For further detail on security and authentication refer to our
        [Authentication](/TODO) documentation
      type: http
      scheme: bearer
      bearerFormat: JWT

````