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

# Get an account

Get a previously generated statement.

For `MT940` statements, the result will be a zip file with one `MT940` file for each day in the given period.
If there are no transactions for a given day, an `MT940` will be generated anyway for that day with the account information.

All the date and time values for the `CSV` and `PDF` statements will be localized in the client's contact time zone.


## OpenAPI

````yaml /openapi.json get /accounts/{account_id}/statements/{statement_id}/file
openapi: 3.0.0
info:
  description: |
    Ebury API allows customers:
      to retrieve accounts, balances, beneficiaries, and transactions;
      to get buy/sell estimates and quotes, book trades and retrieve trade history;
      to allocate payments to a trade and beneficiary, and to submit payments in bulk;
      to download documents such as trade receipt, payment instruction and payment receipt;
      to manage the authorised persons on their account.
    The Metadata API allows applications to clarify some parts of the Ebury API
      that are impractical to express schematically.
  termsOfService: https://docs.ebury.io/#terms-of-use
  title: Ebury API
  version: '0.1'
servers:
  - url: https://{environment}.ebury.io
    variables:
      environment:
        default: api
        enum:
          - api
          - sandbox
security:
  - api_key: []
paths:
  /accounts/{account_id}/statements/{statement_id}/file:
    get:
      tags:
        - Statement Fetch
      summary: Get an account
      description: Get a statement for a given account by UUID
      parameters:
        - description: Account UUID
          in: path
          name: account_id
          required: true
          schema:
            type: string
        - description: Statement UUID
          in: path
          name: statement_id
          required: true
          schema:
            type: string
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: The access token
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Returns the requested statement file
        '202':
          description: Returns the current status of the statement
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementFileStatus'
        '400':
          description: >-
            Formatting, parameter or schema validation error. See error message
            for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '401':
          description: Access denied due to authentication failure
        '403':
          description: >-
            Could not complete action due to data constraints. Refer to error
            message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: Client ID or account UUID not found
        '409':
          description: >-
            Could not update contact due to data constraint or conflict with
            contact status. Refer to error message for additional details
        '502':
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
components:
  schemas:
    StatementFileStatus:
      properties:
        status:
          $ref: '#/components/schemas/StatementStatus'
      type: object
    ErrorMessage:
      description: An error message.
      properties:
        code:
          type: string
          description: The code for the error.
        details:
          description: Error details
          type: string
        message:
          type: string
          description: A short description of the cause of the error.
      required:
        - code
        - message
        - details
      type: object
    StatementStatus:
      description: The status of the statement.
      enum:
        - Pending
        - Failed
      type: string
  securitySchemes:
    api_key:
      description: An API Key.
      in: header
      name: x-api-key
      type: apiKey

````