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

# OCR a PDF bank statement and return extracted transactions as JSON

> Runs the standard bank-statement OCR pipeline (Gemini Vision / Google Document OCR) against the uploaded PDF and returns the extracted transactions plus reconciliation status.

Files larger than 20 MB are processed asynchronously: the response returns `async_processing=true` with no transactions, and a download link is emailed to the address provided in the `email` form field. The `email` parameter is required for files larger than 20 MB.



## OpenAPI

````yaml /openapi-v2.json post /api/v2/statements/convert
openapi: 3.1.0
info:
  title: LedgerSync V2 API
  version: '2.0'
servers:
  - url: https://ledgersyncappv2.com
    description: Production
  - url: https://staging.ledgersyncappv2.com
    description: Sandbox
security: []
tags:
  - name: account-api
    description: Account REST APIs
  - name: password-api
    description: Password REST APIs
  - name: transaction-api
    description: Transaction REST APIs
  - name: phone-verification-api
    description: Phone Verification REST APIs
  - name: employee-api
    description: Employee REST APIs
  - name: client-api
    description: Client REST APIs
  - name: check-api
    description: Check REST APIs
  - name: accounting-ai-api
    description: AI rule suggestion endpoints for external accounting integrations
  - name: institution-api
    description: Institution REST APIs
  - name: statement-api
    description: Statement REST APIs
  - name: authentication-api
    description: Auth REST APIs
paths:
  /api/v2/statements/convert:
    post:
      tags:
        - statement-api
      summary: OCR a PDF bank statement and return extracted transactions as JSON
      description: >-
        Runs the standard bank-statement OCR pipeline (Gemini Vision / Google
        Document OCR) against the uploaded PDF and returns the extracted
        transactions plus reconciliation status.


        Files larger than 20 MB are processed asynchronously: the response
        returns `async_processing=true` with no transactions, and a download
        link is emailed to the address provided in the `email` form field. The
        `email` parameter is required for files larger than 20 MB.
      operationId: convert
      parameters:
        - name: email
          in: query
          required: false
          schema:
            type: string
        - name: Auth-Token
          in: header
          description: Authentication token provided during the authentication process
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
              required:
                - file
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/StatementConversionResponse'
components:
  schemas:
    StatementConversionResponse:
      type: object
      properties:
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/BankStatementConverterTransaction'
        validated:
          type: boolean
        validation_message:
          type: string
        async_processing:
          type: boolean
    BankStatementConverterTransaction:
      type: object
      properties:
        date:
          type: string
        description:
          type: string
        amount:
          type: number

````

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