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

# List bank statement submissions

> Retrieve paginated bank statement submissions for a given user.
Each submission includes the extracted data (account information,
statement period, balance information, and transactions) when available.




## OpenAPI

````yaml GET /bankstatements/{user_id}
openapi: 3.0.1
info:
  title: Payroll API
  description: A full flagged payroll api provided by Teal
  version: 1.0.0
servers:
  - url: https://api.sandbox.goteal.co
    description: Sandbox server for experiments
  - url: https://api.goteal.co
    description: Production server
security:
  - ApiKeyAuth: []
  - MemberBearerAuth: []
paths:
  /bankstatements/{user_id}:
    get:
      summary: Returns all bank statement submissions for a user
      description: |
        Retrieve paginated bank statement submissions for a given user.
        Each submission includes the extracted data (account information,
        statement period, balance information, and transactions) when available.
      parameters:
        - in: path
          name: user_id
          schema:
            type: string
            format: uuid
          required: true
          description: ID of the user to get bank statements for
        - name: offset
          in: query
          description: The offset to start at
          required: false
          schema:
            type: integer
            format: int64
            minimum: 0
            default: 0
        - name: limit
          in: query
          description: The number of items to return
          required: false
          schema:
            type: integer
            format: int64
            minimum: 1
            maximum: 1000
            default: 100
        - name: created_after
          in: query
          description: Filter out bank statements created before the given date
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-01-01T00:00:00.000Z'
        - name: created_before
          in: query
          description: Filter out bank statements created after the given date
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-12-31T23:59:59.000Z'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  pagination:
                    $ref: '#/components/schemas/Pagination'
                  bank_statement_submissions:
                    type: array
                    items:
                      $ref: '#/components/schemas/BankStatementSubmission'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/UnauthorizedApiKey'
components:
  schemas:
    Pagination:
      type: object
      required:
        - offset
        - limit
        - count
      properties:
        offset:
          description: The offset to start at - zero based
          type: integer
          format: int32
          minimum: 1
          default: 0
          example: 75
        limit:
          type: integer
          format: int32
          minimum: 1
          maximum: 100
          default: 20
          example: 25
        count:
          type: integer
          format: int32
          example: 14
          minimum: 0
        total_count:
          type: integer
          format: int32
          example: 89
    BankStatementSubmission:
      type: object
      required:
        - id
        - created_at
      properties:
        id:
          type: string
          format: uuid
          description: Unique bank statement submission identifier
          example: 95a0e70b-fe02-4f47-aef9-2efff279df71
        created_at:
          $ref: '#/components/schemas/Date'
        document_id:
          type: string
          format: uuid
          description: ID of the linked raw document, if available
          nullable: true
        document_external_id:
          type: string
          description: External ID provided during upload, if any
          nullable: true
        document_filename:
          type: string
          description: File name of the uploaded document
          nullable: true
        account_information:
          $ref: '#/components/schemas/BankStatementAccountInformation'
          nullable: true
        statement_period:
          $ref: '#/components/schemas/BankStatementStatementPeriod'
          nullable: true
        balance_information:
          $ref: '#/components/schemas/BankStatementBalanceInformation'
          nullable: true
        transactions:
          type: array
          description: List of transactions extracted from the bank statement
          nullable: true
          items:
            $ref: '#/components/schemas/BankStatementTransaction'
        bank_statement_probability:
          type: number
          format: float
          description: Confidence score (0-1) that the document is a genuine bank statement
          nullable: true
          example: 0.95
    Date:
      type: string
      format: date-time
      example: '2019-05-17T00:00:00.000Z'
    BankStatementAccountInformation:
      type: object
      description: Account holder and bank details extracted from the bank statement
      properties:
        account_holder_name:
          type: string
          description: Name of the account holder
          nullable: true
          example: JANE DOE
        account_number:
          type: string
          description: Bank account number
          nullable: true
          example: '12345678'
        sort_code:
          type: string
          description: Sort code of the bank account
          nullable: true
          example: 12-34-56
        bank_name:
          type: string
          description: Name of the bank
          nullable: true
          example: HSBC
        iban:
          type: string
          description: IBAN of the bank account
          nullable: true
    BankStatementStatementPeriod:
      type: object
      description: Time period covered by the bank statement
      properties:
        start_date:
          type: string
          description: Start date of the statement period
          nullable: true
          example: '2024-01-01'
        end_date:
          type: string
          description: End date of the statement period
          nullable: true
          example: '2024-01-31'
    BankStatementBalanceInformation:
      type: object
      description: Opening and closing balances from the bank statement
      properties:
        opening_balance:
          type: string
          description: Opening balance at the start of the statement period
          nullable: true
          example: 1,000.00
        closing_balance:
          type: string
          description: Closing balance at the end of the statement period
          nullable: true
          example: 1,250.00
    BankStatementTransaction:
      type: object
      description: A single transaction from the bank statement
      properties:
        date:
          type: string
          description: Date of the transaction
          nullable: true
          example: '2024-01-15'
        description:
          type: string
          description: Transaction description
          nullable: true
          example: Salary Payment
        amount:
          type: string
          description: Transaction amount
          nullable: true
          example: 2,500.00
        type:
          type: string
          description: Transaction type (credit or debit)
          nullable: true
          example: credit
    Error:
      required:
        - errors
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          description: An array of messages describing the errors
          example:
            - The request is missing the required field `name`
    Unauthorized:
      type: object
      properties:
        errors:
          type: string
          description: An array of messages describing the errors
          example:
            - No X-API-KEY header provided or wrong value
  responses:
    BadRequest:
      description: Bad request if one of the required parameters is missing
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnauthorizedApiKey:
      description: Unauthorized if the X-API-KEY is not provided or is wrong
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    MemberBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token for authentication. The token should be the one returned by
        the "/members/signin"

````