Skip to content

Accounting workflow#

The accounting workflow combines a classification of the document type with successive ocr and extractions steps specifically suited for the detected document type.

It is used with the workflow identifier accounting_workflow, at the processing endpoint i.e. POST /processing/accounting_workflow.

Supported workflow-parameters#

To be submitted as a configuration object with the parameters form field.

field type default
language one of de (german) or en (english) unset, i.e. multi-language (at the potential cost of OCR accuracy)

Supported return values#

As automatically included in the response JSON, unless otherwise specified via include query parameters.

Credit cost#

A Freemium account allows for up to 100 pages per month, where the cost is 65 credits per page, and 95 credits per document.

Note

A document is usually a bundle of 10 pages.

Extractions formats#

The value of the extractions key for this workflow may have one of the following forms, depending on the detected document_type.

For document_type = invoice

All supported fields
  • schema_version: integer (possible values: [2])
  • document_type: string (possible values: ['invoice'])
  • customer: Customer
    • name: StringExtraction
    • address: StringExtraction
    • address_struct: Address
      • address_line_1: StringExtraction
      • address_line_2: StringExtraction
      • city: StringExtraction
      • zip: StringExtraction
      • country: CountryExtraction
    • vat_id: StringExtraction
    • tax_number: StringExtraction
    • eori_number: StringExtraction
    • customer_number: StringExtraction
    • banking_information: array of BankingInformation
      • validation_problem: boolean (deprecated)
      • note: string (deprecated)
      • confidence: number (deprecated)
      • bbox_refs: array of Reference
        • page_num: integer
        • bbox_id: integer
      • iban: StringExtraction
      • bic: StringExtraction
  • vendor: Vendor
    • name: StringExtraction
    • address: StringExtraction
    • address_struct: Address
      • address_line_1: StringExtraction
      • address_line_2: StringExtraction
      • city: StringExtraction
      • zip: StringExtraction
      • country: CountryExtraction
    • vat_id: StringExtraction
    • tax_number: StringExtraction
    • eori_number: StringExtraction
    • register_id: StringExtraction
    • banking_information: array of BankingInformation
      • validation_problem: boolean (deprecated)
      • note: string (deprecated)
      • confidence: number (deprecated)
      • bbox_refs: array of Reference
        • page_num: integer
        • bbox_id: integer
      • iban: StringExtraction
      • bic: StringExtraction
    • phone: StringExtraction
    • fax: StringExtraction
    • url: StringExtraction
    • e_mail: StringExtraction
  • currency: CurrencyExtraction
  • date: DateExtraction
  • due_date: DateExtraction
  • service_period: one of:
    • DateExtraction
    • Period
      • start_date: DateExtraction
      • end_date: DateExtraction
  • number: StringExtraction
  • order_numbers: array of StringExtraction
  • order_confirmation_numbers: array of StringExtraction
  • delivery_note_numbers: array of StringExtraction
  • payment_methods: array of PaymentMethodExtraction
  • net_amount: FloatExtraction
  • tax_amount: FloatExtraction
  • additional_cost: FloatExtraction
  • gross_amount: FloatExtraction
  • tax_calculation: array of TaxCalculation
    • tax_code: StringExtraction
    • tax_rate: FloatExtraction
    • tax_amount: FloatExtraction
    • net_amount: FloatExtraction
    • gross_amount: FloatExtraction
    • early_payment_date: DateExtraction
    • discount_percentage: FloatExtraction

      The percentage is only returned if it is written on the document, i.e. it is not calculated.

    early_payment_benefit: array of EarlyPaymentBenefit

    • discount_amount: FloatExtraction (deprecated)

      Use new_amount instead.

    • new_amount: FloatExtraction

  • line_item: array of LineItem

    • pos_id: StringExtraction
    • article_id: StringExtraction
    • ean: StringExtraction
    • description: StringExtraction
    • quantity: FloatExtraction
    • unit_of_measure: StringExtraction
    • service_period: one of:
      • DateExtraction
      • Period
        • start_date: DateExtraction
        • end_date: DateExtraction
    • discount: FloatExtraction
    • additional_cost: FloatExtraction
    • tax_rate: FloatExtraction
    • tax_code: StringExtraction
    • unit_price: FloatExtraction
    • total_price: FloatExtraction
    • order_number: StringExtraction
    • order_confirmation_number: StringExtraction
    • delivery_note_number: StringExtraction
  • due_payable_amount: FloatExtraction
  • discount_amount: FloatExtraction
  • payment_reference: StringExtraction
  • barcodes: array of StringExtraction
  • key_value_pairs: array of KeyValuePair
    • key: StringExtraction
    • value: StringExtraction

For document_type = credit_note

All supported fields
  • schema_version: integer (possible values: [1])
  • document_type: string (possible values: ['credit_note'])
  • customer: Customer
    • name: StringExtraction
    • address: StringExtraction
    • address_struct: Address
      • address_line_1: StringExtraction
      • address_line_2: StringExtraction
      • city: StringExtraction
      • zip: StringExtraction
      • country: CountryExtraction
    • vat_id: StringExtraction
    • tax_number: StringExtraction
    • eori_number: StringExtraction
    • customer_number: StringExtraction
    • banking_information: array of BankingInformation
      • validation_problem: boolean (deprecated)
      • note: string (deprecated)
      • confidence: number (deprecated)
      • bbox_refs: array of Reference
        • page_num: integer
        • bbox_id: integer
      • iban: StringExtraction
      • bic: StringExtraction
  • vendor: Vendor
    • name: StringExtraction
    • address: StringExtraction
    • address_struct: Address
      • address_line_1: StringExtraction
      • address_line_2: StringExtraction
      • city: StringExtraction
      • zip: StringExtraction
      • country: CountryExtraction
    • vat_id: StringExtraction
    • tax_number: StringExtraction
    • eori_number: StringExtraction
    • register_id: StringExtraction
    • banking_information: array of BankingInformation
      • validation_problem: boolean (deprecated)
      • note: string (deprecated)
      • confidence: number (deprecated)
      • bbox_refs: array of Reference
        • page_num: integer
        • bbox_id: integer
      • iban: StringExtraction
      • bic: StringExtraction
    • phone: StringExtraction
    • fax: StringExtraction
    • url: StringExtraction
    • e_mail: StringExtraction
  • currency: CurrencyExtraction
  • date: DateExtraction
  • due_date: DateExtraction
  • service_period: one of:
    • DateExtraction
    • Period
      • start_date: DateExtraction
      • end_date: DateExtraction
  • service_period_start: DateExtraction (deprecated)

    Use service_period instead.

  • service_period_end: DateExtraction (deprecated)

    Use service_period instead.

  • number: StringExtraction

  • order_number: StringExtraction (deprecated)

    Use order_numbers instead.

  • order_numbers: array of StringExtraction

  • order_confirmation_number: StringExtraction (deprecated)

    Use order_confirmation_numbers instead.

  • order_confirmation_numbers: array of StringExtraction

  • delivery_note_number: StringExtraction (deprecated)

    Use delivery_note_numbers instead.

  • delivery_note_numbers: array of StringExtraction

  • payment_method: PaymentMethodExtraction (deprecated)

    Use payment_methods instead.

  • payment_methods: array of PaymentMethodExtraction

  • net_amount: FloatExtraction
  • tax_amount: FloatExtraction
  • additional_cost: FloatExtraction
  • gross_amount: FloatExtraction
  • tax_calculation: array of TaxCalculation
    • tax_code: StringExtraction
    • tax_rate: FloatExtraction
    • tax_amount: FloatExtraction
    • net_amount: FloatExtraction
    • gross_amount: FloatExtraction
    • early_payment_date: DateExtraction
    • discount_percentage: FloatExtraction

      The percentage is only returned if it is written on the document, i.e. it is not calculated.

    early_payment_benefit: array of EarlyPaymentBenefit

    • discount_amount: FloatExtraction (deprecated)

      Use new_amount instead.

    • new_amount: FloatExtraction

  • line_item: array of LineItem

    • article_id: StringExtraction
    • description: StringExtraction
    • quantity: FloatExtraction
    • service_period: one of:
      • DateExtraction
      • Period
        • start_date: DateExtraction
        • end_date: DateExtraction
    • discount: FloatExtraction
    • additional_cost: FloatExtraction
    • tax_rate: FloatExtraction
    • tax_code: StringExtraction
    • unit_price: FloatExtraction
    • total_price: FloatExtraction
    • article_name: StringExtraction (deprecated)

      Use description instead.

    • order_number: StringExtraction

    • order_confirmation_number: StringExtraction
    • delivery_note_number: StringExtraction
  • due_payable_amount: FloatExtraction

  • discount_amount: FloatExtraction
  • key_value_pairs: array of KeyValuePair
    • key: StringExtraction
    • value: StringExtraction

For document_type = receipt

All supported fields
  • schema_version: integer (possible values: [1])
  • document_type: string (possible values: ['receipt'])
  • article_amount: FloatExtraction
  • receipt_date: DateExtraction
  • gross_amount: FloatExtraction
  • net_amount: FloatExtraction
  • tax_amount: FloatExtraction
  • discount_amount: FloatExtraction
  • tax_calculation: array of TaxCalculation
    • tax_code: StringExtraction
    • tax_rate: FloatExtraction
    • tax_amount: FloatExtraction
    • net_amount: FloatExtraction
    • gross_amount: FloatExtraction
  • card_number: StringExtraction
  • payment_method: PaymentMethodExtraction
  • receipt_number: StringExtraction
  • line_items: array of LineItem
    • article_id: StringExtraction
    • description: StringExtraction
    • quantity: FloatExtraction
    • total_price: FloatExtraction
    • article_name: StringExtraction
    • tax_rate: FloatExtraction
    • tax_code: StringExtraction
    • discount: FloatExtraction
  • vendor: Vendor
    • name: StringExtraction
    • address: Address
      • address_line_1: StringExtraction
      • address_line_2: StringExtraction
      • city: StringExtraction
      • zip: StringExtraction
      • country: CountryExtraction
    • vat_id: StringExtraction
    • tax_number: StringExtraction
    • store: StringExtraction

For document_type = other

All supported fields
  • schema_version: integer (possible values: [1])
  • document_type: string (possible values: ['other'])
  • receiver: Receiver
    • name: StringExtraction
    • address: Address
      • address_line_1: StringExtraction
      • address_line_2: StringExtraction
      • city: StringExtraction
      • zip: StringExtraction
      • country: CountryExtraction
  • sender: Sender
    • name: StringExtraction
    • address: Address
      • address_line_1: StringExtraction
      • address_line_2: StringExtraction
      • city: StringExtraction
      • zip: StringExtraction
      • country: CountryExtraction
    • phone: StringExtraction
    • fax: StringExtraction
    • url: StringExtraction
    • e_mail: StringExtraction
    • category: SenderCategoryExtraction
  • subject: StringExtraction
  • doc_category: DocCategoryExtraction

Note

For a reference of the structure of each of the extractions objects see Extracted Values. Also, for accessing individual processing results or artifacts, have a look at Fetch Processing Results and Artifacts.

Important

The structure of extractions might contain optional paths. See this and this part of the documentation.