Command Palette

Search for a command to run...

Digitisation over API precision, calculations and validation

Last updated July 10, 2026

DIGI tutorial - precision, calculations and validation

Introduction

DIGI - the CostPocket Automatic Expense Document Digitisation Robot - is a complex, fast and precise system for finding data from accounting documents (invoices, receipts, waybills) that is needed for different accounting purposes.

DIGI processes about 700k documents per month and powers our own products such as CostPocket app and Cloud, Outvoicer, as well as over 15 public and internal projects of our customers.

DIGI handles documents from 77 countries in 52 languages across Europe, Asia, Oceania, the Americas, Arabic-speaking countries, and Africa — with more added continuously.

Fields

The robot can detect the following fields:

  • Issue date
  • Due date
  • Document number
  • Order number
  • Document type: invoice or receipt
  • Document direction (debit or credit)
  • Currency
  • Subtotal
  • Total VAT
  • Grand total
  • Bank accounts
  • Reference number
  • Debit/credit card last 4 digits
  • Electricity consumption
  • Origin country code
  • VAT rows (one row for each VAT rate)
  • Item lines, one line for each product:
    • description
    • product code
    • unit
    • quantity
    • neto sum
    • bruto sum
    • neto price
    • bruto price
    • sum without discount
    • discount: applied or not
    • type: product or service
  • Rounding: rounding of item lines
  • Fuel rows: for example, petrol stations.

How extraction works

The first prototype was built over a decade ago and has been improved continuously since. DIGI combines several subsystems:

  • Our own advanced algorithms (the most important layer)
  • OCR text recognition
  • AI systems
  • Our own machine-learning system
  • Country-specific property and language collections
  • Company data registries

The digitisation base is our own code, tailored over years of analysing tens of thousands of expense documents, complemented by the systems above, and finally cleaned and validated with many conditions and checks.

No guessing: where uncertainty is high, values are left blank rather than guessed.

Strict numeric validation: totals, VAT rows, and item lines are found in a multi-step, interdependent process — grand total → VAT rows → discounts → item lines — and cross-checked against each other rather than parsed in isolation.

Data validation and format

All fields are validated by the relevant subsystems (AI, ML, registries); field-specific conditions are described in the data format specs. There you can find an examle JSON as well.
The JSON output format is strict and never changes without communication from the CostPocket team.

For measured accuracy figures, see the digitisation precision overview.

Was it helpful?