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

# Parse a bank statement

> Upload a Nepali bank statement (PDF, Excel, JPEG, or PNG, max 20 MB). Returns a full `StatementReport` with statement metadata, signals, monthly summary, categories, and every categorized transaction. Bills 1 unit.



## OpenAPI

````yaml /openapi.json post /v1/parse
openapi: 3.1.0
info:
  title: Swippee API
  version: 1.0.0
  description: >-
    Convert Nepali bank statement PDFs into structured financial data, derive
    lending products from a parse, and read Nepal's public-sector financial
    datasets — over one REST API.
servers:
  - url: https://api.swippee.com
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/parse:
    post:
      tags:
        - Parsing
      summary: Parse a bank statement
      description: >-
        Upload a Nepali bank statement (PDF, Excel, JPEG, or PNG, max 20 MB).
        Returns a full `StatementReport` with statement metadata, signals,
        monthly summary, categories, and every categorized transaction. Bills 1
        unit.
      operationId: parseStatement
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: The statement file. PDF, Excel, JPEG, or PNG. Max 20 MB.
                bank:
                  type: string
                  description: Bank hint, or `auto` to detect. `GLOBAL_IME` is in beta.
                  enum:
                    - auto
                    - NABIL
                    - NIC_ASIA
                    - NIMB
                    - NMB
                    - KUMARI
                    - SIDDHARTHA
                    - PRABHU
                    - GARIMA
                    - GLOBAL_IME
                    - ESEWA
                    - KHALTI
                  default: auto
                async:
                  type: boolean
                  description: >-
                    If true, returns 202 + poll_url immediately and processes in
                    the background.
                  default: false
      responses:
        '200':
          description: Parsed report
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementReport'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/Unprocessable'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      schema:
        type: string
        minLength: 8
        maxLength: 255
      description: >-
        Optional. A unique key (e.g. a UUID v4) so a retry replays the original
        response instead of creating a duplicate report or double-charging. See
        https://docs.swippee.com/concepts/idempotency
      example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
  schemas:
    StatementReport:
      type: object
      properties:
        report_id:
          type: string
          example: cl_abc123
        status:
          type: string
          example: complete
        data_source:
          type: string
          enum:
            - PARSED_STATEMENT
            - OCR_IMAGE
          description: >-
            How the data was obtained: parsed from the bank's PDF/Excel, or read
            from a photo/scan.
          example: PARSED_STATEMENT
        tamper_verifiable:
          type: boolean
          description: >-
            Whether the source supports document tamper-verification (false for
            OCR_IMAGE).
          example: true
        statement:
          type: object
          properties:
            bank:
              type: string
              example: Nabil Bank
            bank_code:
              type: string
              example: NABIL
            currency:
              type: string
              example: NPR
            period:
              type: object
              properties:
                from:
                  type: string
                  format: date
                to:
                  type: string
                  format: date
            opening_balance:
              type: number
            closing_balance:
              type: number
            total_transactions:
              type: integer
        signals:
          type: object
        monthly_summary:
          type: array
          items:
            type: object
        categories:
          type: object
        merchant_categories:
          type: object
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
    Transaction:
      type: object
      description: >-
        A transaction as returned by reports. `amount` is signed: POSITIVE =
        money out (debit), NEGATIVE = money in (credit).
      properties:
        transaction_id:
          type: string
          example: txn_0001
        date:
          type: string
          format: date
        name:
          type: string
          description: Raw narration as printed on the statement.
        amount:
          type: number
          description: 'Signed: positive = money out, negative = money in.'
          example: 2480
        iso_currency_code:
          type: string
          example: NPR
        balance:
          type:
            - number
            - 'null'
        merchant_name:
          type:
            - string
            - 'null'
          example: Example Store
        payment_terminal_id:
          type:
            - string
            - 'null'
          example: '2222000000000000'
        mcc:
          type:
            - string
            - 'null'
          example: '5411'
        personal_finance_category:
          type: object
          properties:
            primary:
              type: string
              example: GENERAL_MERCHANDISE
            detailed:
              type: string
              example: GENERAL_MERCHANDISE_OTHER_GENERAL_MERCHANDISE
            confidence_level:
              type: string
              enum:
                - VERY_HIGH
                - HIGH
                - MEDIUM
                - LOW
                - UNKNOWN
        counterparties:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                example: merchant
              name:
                type:
                  - string
                  - 'null'
              confidence_level:
                type: string
        payment_channel:
          type:
            - string
            - 'null'
          description: Not classified for parsed statements — null.
        pending:
          type: boolean
          example: false
    Error:
      type: object
      description: >-
        Flat, industry-standard error envelope. Branch on error_code, not the
        HTTP status.
      properties:
        error_type:
          type: string
          example: AUTHENTICATION_ERROR
        error_code:
          type: string
          example: INVALID_API_KEY
        error_message:
          type: string
          example: Unknown API key.
        display_message:
          type: string
          nullable: true
          example: null
        request_id:
          type: string
          example: req_8f3c9b2e4a1d4f7c9e0b1a2c3d4e5f60
        documentation_url:
          type: string
          example: https://docs.swippee.com/concepts/errors#invalid_api_key
        suggested_action:
          type: string
          example: Check your API key in the Authorization header.
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unprocessable:
      description: The document could not be parsed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your API key from the dashboard, sent as `Authorization: Bearer
        swippee_sk_live_...`.

````