> ## Documentation Index
> Fetch the complete documentation index at: https://next-developers.opencard.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OCR scan receipt



## OpenAPI

````yaml /openapi/ems-api.json post /accounts/{accountId}/receipts/scan
openapi: 3.0.3
info:
  title: OpenCard EMS API
  version: '1.0'
  description: >-
    API for Expense Management Systems. Manage TPAs, organizations, card
    holders, and webhooks. Receive transaction data via webhooks — not by
    polling this API.
  contact:
    email: support@opencard.io
servers:
  - url: https://api.opencard.io/api/v1/application
    description: Production
  - url: https://sandbox-api.opencard.io/api/v1/application
    description: Sandbox
security: []
paths:
  /accounts/{accountId}/receipts/scan:
    post:
      tags:
        - Receipt Scanner
      summary: OCR scan receipt
      operationId: scanReceipt
      parameters:
        - $ref: '#/components/parameters/accountId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - receipt
              properties:
                receipt:
                  type: string
                include:
                  type: array
                  items:
                    type: string
            example:
              receipt: base64-image...
              include:
                - line_items
      responses:
        '200':
          description: OCR result
          content:
            application/json:
              example:
                merchant: ICA
                total_amount: 109.38
                currency: SEK
                line_items:
                  - description: Coffee
                    amount: 45
      security:
        - opencard_auth:
            - receipts-write
components:
  parameters:
    accountId:
      name: accountId
      in: path
      required: true
      description: Your account ID
      schema:
        type: integer
  securitySchemes:
    opencard_auth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.opencard.io/oauth/token
          scopes:
            accounts-read: Read your account
            accounts-write: Update your account
            oauth-clients-read: Read OAuth clients
            oauth-clients-write: Create OAuth clients
            public-records-read: Company registry lookup
            account-tpas-read: Read TPAs
            account-tpas-write: Create TPAs
            account-tpas-delete: Delete TPAs
            account-tpa-signatories-read: Read TPA signatories
            account-tpa-signatories-write: Add TPA signatories
            account-tpa-identities-read: List identities on TPA
            billings-write: Create billing profiles
            card-issuers-read: List available card programs (catalog)
            account-card-issuers-read: List enabled issuers
            account-card-issuers-write: Enable issuers
            account-card-issuers-delete: Disable issuers
            organizations-read: Read organizations
            organizations-write: Create organizations
            card-holders-read: Read card holders
            card-holders-write: Create and update card holders
            card-holders-delete: Delete card holders
            webhooks-read: Read webhooks
            webhooks-write: Create webhooks
            webhook-events-read: Read webhook delivery log
            receipts-write: Scan receipts (OCR)

````