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.
ocr, see OCR Formatclassifications, see Classifications Formatextractions, see below
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: Customername: StringExtractionaddress: StringExtractionaddress_struct: Addressaddress_line_1: StringExtractionaddress_line_2: StringExtractioncity: StringExtractionzip: StringExtractioncountry: CountryExtraction
vat_id: StringExtractiontax_number: StringExtractioneori_number: StringExtractioncustomer_number: StringExtractionbanking_information: array of BankingInformationvalidation_problem: boolean (deprecated)note: string (deprecated)confidence: number (deprecated)bbox_refs: array of Referencepage_num: integerbbox_id: integer
iban: StringExtractionbic: StringExtraction
vendor: Vendorname: StringExtractionaddress: StringExtractionaddress_struct: Addressaddress_line_1: StringExtractionaddress_line_2: StringExtractioncity: StringExtractionzip: StringExtractioncountry: CountryExtraction
vat_id: StringExtractiontax_number: StringExtractioneori_number: StringExtractionregister_id: StringExtractionbanking_information: array of BankingInformationvalidation_problem: boolean (deprecated)note: string (deprecated)confidence: number (deprecated)bbox_refs: array of Referencepage_num: integerbbox_id: integer
iban: StringExtractionbic: StringExtraction
phone: StringExtractionfax: StringExtractionurl: StringExtractione_mail: StringExtraction
currency: CurrencyExtractiondate: DateExtractiondue_date: DateExtractionservice_period: one of:- DateExtraction
- Period
start_date: DateExtractionend_date: DateExtraction
number: StringExtractionorder_numbers: array of StringExtractionorder_confirmation_numbers: array of StringExtractiondelivery_note_numbers: array of StringExtractionpayment_methods: array of PaymentMethodExtractionnet_amount: FloatExtractiontax_amount: FloatExtractionadditional_cost: FloatExtractiongross_amount: FloatExtractiontax_calculation: array of TaxCalculationtax_code: StringExtractiontax_rate: FloatExtractiontax_amount: FloatExtractionnet_amount: FloatExtractiongross_amount: FloatExtraction
-
early_payment_date: DateExtraction-
discount_percentage: FloatExtractionThe 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_amountinstead. -
new_amount: FloatExtraction
-
line_item: array of LineItempos_id: StringExtractionarticle_id: StringExtractionean: StringExtractiondescription: StringExtractionquantity: FloatExtractionunit_of_measure: StringExtractionservice_period: one of:- DateExtraction
- Period
start_date: DateExtractionend_date: DateExtraction
discount: FloatExtractionadditional_cost: FloatExtractiontax_rate: FloatExtractiontax_code: StringExtractionunit_price: FloatExtractiontotal_price: FloatExtractionorder_number: StringExtractionorder_confirmation_number: StringExtractiondelivery_note_number: StringExtraction
number_of_line_items: FloatExtractiondue_payable_amount: FloatExtractiondiscount_amount: FloatExtractionpayment_reference: StringExtractionbarcodes: array of StringExtractionkey_value_pairs: array of KeyValuePairkey: StringExtractionvalue: StringExtraction
For document_type = credit_note
All supported fields
schema_version: integer (possible values: [1])document_type: string (possible values: ['credit_note'])customer: Customername: StringExtractionaddress: StringExtractionaddress_struct: Addressaddress_line_1: StringExtractionaddress_line_2: StringExtractioncity: StringExtractionzip: StringExtractioncountry: CountryExtraction
vat_id: StringExtractiontax_number: StringExtractioneori_number: StringExtractioncustomer_number: StringExtractionbanking_information: array of BankingInformationvalidation_problem: boolean (deprecated)note: string (deprecated)confidence: number (deprecated)bbox_refs: array of Referencepage_num: integerbbox_id: integer
iban: StringExtractionbic: StringExtraction
vendor: Vendorname: StringExtractionaddress: StringExtractionaddress_struct: Addressaddress_line_1: StringExtractionaddress_line_2: StringExtractioncity: StringExtractionzip: StringExtractioncountry: CountryExtraction
vat_id: StringExtractiontax_number: StringExtractioneori_number: StringExtractionregister_id: StringExtractionbanking_information: array of BankingInformationvalidation_problem: boolean (deprecated)note: string (deprecated)confidence: number (deprecated)bbox_refs: array of Referencepage_num: integerbbox_id: integer
iban: StringExtractionbic: StringExtraction
phone: StringExtractionfax: StringExtractionurl: StringExtractione_mail: StringExtraction
currency: CurrencyExtractiondate: DateExtractiondue_date: DateExtractionservice_period: one of:- DateExtraction
- Period
start_date: DateExtractionend_date: DateExtraction
-
service_period_start: DateExtraction (deprecated)Use
service_periodinstead. -
service_period_end: DateExtraction (deprecated)Use
service_periodinstead. -
number: StringExtraction -
order_number: StringExtraction (deprecated)Use
order_numbersinstead. -
order_numbers: array of StringExtraction -
order_confirmation_number: StringExtraction (deprecated)Use
order_confirmation_numbersinstead. -
order_confirmation_numbers: array of StringExtraction -
delivery_note_number: StringExtraction (deprecated)Use
delivery_note_numbersinstead. -
delivery_note_numbers: array of StringExtraction -
payment_method: PaymentMethodExtraction (deprecated)Use
payment_methodsinstead. -
payment_methods: array of PaymentMethodExtraction net_amount: FloatExtractiontax_amount: FloatExtractionadditional_cost: FloatExtractiongross_amount: FloatExtractiontax_calculation: array of TaxCalculationtax_code: StringExtractiontax_rate: FloatExtractiontax_amount: FloatExtractionnet_amount: FloatExtractiongross_amount: FloatExtraction
-
early_payment_date: DateExtraction-
discount_percentage: FloatExtractionThe 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_amountinstead. -
new_amount: FloatExtraction
-
line_item: array of LineItemarticle_id: StringExtractiondescription: StringExtractionquantity: FloatExtractionservice_period: one of:- DateExtraction
- Period
start_date: DateExtractionend_date: DateExtraction
discount: FloatExtractionadditional_cost: FloatExtractiontax_rate: FloatExtractiontax_code: StringExtractionunit_price: FloatExtractiontotal_price: FloatExtraction-
article_name: StringExtraction (deprecated)Use
descriptioninstead. -
order_number: StringExtraction order_confirmation_number: StringExtractiondelivery_note_number: StringExtraction
-
due_payable_amount: FloatExtraction discount_amount: FloatExtractionkey_value_pairs: array of KeyValuePairkey: StringExtractionvalue: StringExtraction
For document_type = receipt
All supported fields
schema_version: integer (possible values: [1])document_type: string (possible values: ['receipt'])article_amount: FloatExtractionreceipt_date: DateExtractiongross_amount: FloatExtractionnet_amount: FloatExtractiontax_amount: FloatExtractiondiscount_amount: FloatExtractiontax_calculation: array of TaxCalculationtax_code: StringExtractiontax_rate: FloatExtractiontax_amount: FloatExtractionnet_amount: FloatExtractiongross_amount: FloatExtraction
card_number: StringExtractionpayment_method: PaymentMethodExtractionreceipt_number: StringExtractionline_items: array of LineItemarticle_id: StringExtractiondescription: StringExtractionquantity: FloatExtractiontotal_price: FloatExtractionarticle_name: StringExtractiontax_rate: FloatExtractiontax_code: StringExtractiondiscount: FloatExtraction
vendor: Vendorname: StringExtractionaddress: Addressaddress_line_1: StringExtractionaddress_line_2: StringExtractioncity: StringExtractionzip: StringExtractioncountry: CountryExtraction
vat_id: StringExtractiontax_number: StringExtractionstore: StringExtraction
For document_type = other
All supported fields
schema_version: integer (possible values: [1])document_type: string (possible values: ['other'])receiver: Receivername: StringExtractionaddress: Addressaddress_line_1: StringExtractionaddress_line_2: StringExtractioncity: StringExtractionzip: StringExtractioncountry: CountryExtraction
sender: Sendername: StringExtractionaddress: Addressaddress_line_1: StringExtractionaddress_line_2: StringExtractioncity: StringExtractionzip: StringExtractioncountry: CountryExtraction
phone: StringExtractionfax: StringExtractionurl: StringExtractione_mail: StringExtractioncategory: SenderCategoryExtraction
subject: StringExtractiondoc_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.