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

# Get headers

> Retrieve all extracted table headers for a BSA verification. Headers represent the column structure
recognized from the bank statement OCR. Review and correct headers before analyzing transactions.




## OpenAPI

````yaml /api-specs/anycheck.yaml get /bank-statements/{id}/headers
openapi: 3.0.3
info:
  title: AnyCheck API
  version: 1.0.0
  description: >
    # AnyCheck API Documentation


    The AnyCheck API (formerly KYB API) provides comprehensive business and
    identity verification services through a RESTful interface.


    ## Features

    - **Identity Verification**: KTP, NIK, and other identity document
    validation

    - **Business Documents**: BPKB, land certificates, and business registration
    verification

    - **Compliance**: PEP screening and fraud detection

    - **Bank Statement Analysis**: OCR extraction and financial analysis

    - **Template Management**: Create and manage verification templates

    - **Async Processing**: Queue-based verification with webhook notifications


    ## Authentication

    All endpoints (except `/ping` and `/health`) require authentication via the
    `X-API-Key` header.
  contact:
    name: API Support
    email: bd@fintelite.ai
  license:
    name: Proprietary
servers:
  - url: https://api.anycheck.ai
    description: Production server
security:
  - apiKey: []
tags:
  - name: Health
    description: Health check endpoints
  - name: Account
    description: >-
      The current user's own profile, including credit usage, group credit
      balance, and usage limit
  - name: Upload
    description: File upload operations
  - name: Authentication
    description: User authentication and registration
  - name: Groups
    description: Group resource management
  - name: Services
    description: Verification service operations
  - name: Folders
    description: Folder management for organizing verifications
  - name: Verifications
    description: Document verification operations
  - name: Templates
    description: Verification template management
  - name: Bank Statement Analysis
    description: Bank statement OCR extraction, review, and financial analytics
  - name: Drafts
    description: 'Draft verification management: save, edit, and submit verifications'
paths:
  /bank-statements/{id}/headers:
    get:
      tags:
        - Bank Statement Analysis
      summary: Get headers
      description: >
        Retrieve all extracted table headers for a BSA verification. Headers
        represent the column structure

        recognized from the bank statement OCR. Review and correct headers
        before analyzing transactions.
      operationId: getBSAHeaders
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Verification ID
        - name: file_index
          in: query
          schema:
            type: integer
            minimum: 0
            default: 0
          description: File index (0-based) for multi-file verifications
        - name: page_offset
          in: query
          schema:
            type: integer
            default: 0
        - name: page_size
          in: query
          schema:
            type: integer
            default: 10
      responses:
        '200':
          description: List of statement headers
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/BSAHeader'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    BSAHeader:
      type: object
      description: >
        A statement header extracted from a bank statement file — one per
        account/file within a BSA

        verification. Combines account details with the extracted (and, if
        corrected, manually edited)

        balance summary for that statement. Referenced by `bsa_header_ids` on
        the completed verification.
      properties:
        id:
          type: string
          format: uuid
        verification_id:
          type: string
          format: uuid
        file_no:
          type: integer
          description: Which uploaded file this header belongs to (1-based)
          example: 1
        header_no:
          type: integer
          description: >-
            Header position within the file (1-based; multiple headers per file
            are possible)
          example: 1
        descending:
          type: boolean
          description: Whether this statement's transactions are ordered newest-first
        bank_name:
          type: string
          example: PT Bank Central Asia Tbk
        owner_name:
          type: string
          example: PT Maju Bersama Teknologi
        owner_address:
          type: string
          example: Jl. Sudirman No.123, Jakarta Selatan
        account_number:
          type: string
          example: '0123456789'
        account_branch:
          type: string
          example: KCP Jakarta Sudirman
        account_type:
          type: string
          example: Giro
        total_pages:
          type: integer
          example: 45
        period_start:
          type: string
          format: date
          description: 'Format: YYYY-MM-DD'
        period_end:
          type: string
          format: date
          description: 'Format: YYYY-MM-DD'
        currency:
          type: string
          example: IDR
        confidence_detail:
          type: object
          description: >-
            Confidence scores (and derived HIGH/MEDIUM/LOW levels) for each
            extracted header field
          example:
            bank_name: 98.5
            owner_name: 95.2
            owner_address: 93.1
            account_number: 99.1
            account_branch: 92.4
            account_type: 90
            period: 87.3
            currency: 100
            bank_name_level: HIGH
            owner_name_level: HIGH
            owner_address_level: HIGH
            account_number_level: HIGH
            account_branch_level: HIGH
            account_type_level: HIGH
            period_level: MEDIUM
            currency_level: HIGH
          properties:
            bank_name:
              type: number
              example: 98.5
            owner_name:
              type: number
              example: 95.2
            owner_address:
              type: number
              example: 93.1
            account_number:
              type: number
              example: 99.1
            account_branch:
              type: number
              example: 92.4
            account_type:
              type: number
              example: 90
            period:
              type: number
              example: 87.3
            currency:
              type: number
              example: 100
            bank_name_level:
              type: string
              example: HIGH
            owner_name_level:
              type: string
              example: HIGH
            owner_address_level:
              type: string
              example: HIGH
            account_number_level:
              type: string
              example: HIGH
            account_branch_level:
              type: string
              example: HIGH
            account_type_level:
              type: string
              example: HIGH
            period_level:
              type: string
              example: MEDIUM
            currency_level:
              type: string
              example: HIGH
        average_confidence:
          type: number
          description: Average confidence across this header and its item lines
          example: 94.2
        beginning_balance_number:
          type: number
          nullable: true
          description: Beginning balance, as extracted or manually corrected
        ending_balance_number:
          type: number
          nullable: true
        credit_mutation_number:
          type: number
          nullable: true
        debit_mutation_number:
          type: number
          nullable: true
        credit_operational_number:
          type: number
          nullable: true
        debit_operational_number:
          type: number
          nullable: true
        credit_non_operational_number:
          type: number
          nullable: true
        debit_non_operational_number:
          type: number
          nullable: true
        total_credit:
          type: integer
          nullable: true
          description: Number of credit transactions
        total_debit:
          type: integer
          nullable: true
          description: Number of debit transactions
        credit_mutation_base_currency:
          type: number
          nullable: true
        debit_mutation_base_currency:
          type: number
          nullable: true
        net_movement:
          type: number
        period_start_calculated:
          type: string
          format: date
          nullable: true
          description: >-
            Period start derived from item lines, used when `period_start` is
            missing or disputed
        period_end_calculated:
          type: string
          format: date
          nullable: true
        beginning_balance_number_calculated:
          type: number
          description: >-
            Beginning balance derived from item lines, used when
            `beginning_balance_number` is missing
        ending_balance_number_calculated:
          type: number
        credit_mutation_number_calculated:
          type: number
        debit_mutation_number_calculated:
          type: number
        credit_operational_number_calculated:
          type: number
        debit_operational_number_calculated:
          type: number
        credit_non_operational_number_calculated:
          type: number
        debit_non_operational_number_calculated:
          type: number
        total_debit_calculated:
          type: integer
        total_credit_calculated:
          type: integer
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
          format: uuid
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
          format: uuid
    ErrorResponse:
      type: object
      properties:
        error_code:
          type: string
          example: INVALID_REQUEST
          description: Error code identifying the type of error
        message:
          type: string
          example: Invalid request. Please check input data format and try again
          description: Human-readable error message
        errors:
          type: array
          description: Field-specific validation errors (optional)
          items:
            $ref: '#/components/schemas/FieldError'
    FieldError:
      type: object
      properties:
        field:
          type: string
          description: Name of the field with validation error
          example: service_id
        message:
          type: string
          description: Field-specific error message
          example: This field is required
      required:
        - field
        - message
  responses:
    Unauthorized:
      description: Unauthorized - Authentication required or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalid_api_key:
              summary: Invalid API key
              value:
                error_code: INVALID_API_KEY
                message: API key is invalid
            api_key_expired:
              summary: Expired API key
              value:
                error_code: API_KEY_EXPIRED
                message: API key is expired
            unauthorized:
              summary: Missing authentication
              value:
                error_code: UNAUTHORIZED
                message: You are not authorized to perform this action
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error_code: NOT_FOUND
            message: Resource not found
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for service-to-service authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.