200 |
OK is returned to indicate that the receipt/invoice was processed successfully.
The retrieved data is presented in the form of a JSON structure comprising several distinct fields. The below explanation provides further details. It's important to note that the resultant structure exclusively encompasses the detected or available data, implying that not all fields within the JSON structure will be included in the output.
docType |
Type of the document: Receipt,
Invoice, CreditMemo, DebitMemo, FinalInvoice, Offer, PartialInvoice, PastdueInvoice, ProformaInvoice |
general |
Summarizes general information about the receipt/invoice, which includes an array of key-value pairs.
Possible keys can be:
ShopName, ShopStreet, ShopHouseNumber, ShopCity, ShopZip, ShopState, ShopCountry, ShopTel, ShopEmail, ShopWeb,
CustomerName, CustomerCompany, CustomerStreet, CustomerHouseNumber, CustomerCity, CustomerZip, CustomerState, CustomerCountry,
Time, InvoiceDate, InvoiceDueDate, DeliveryDate1, DeliveryDate2,
InvoiceNumber, OrderNumber,
TotalPrice, Tip, Currency, ReverseCharge,
Telephone, Email, Fax, Website, POBox, Weee,
TaxNumber, VATNumber, CompanyRegistrationNumber,
StoreID, TableNr, GroupNr, GuestNr, Transaction, TransactionAuthCode, Terminal,
TransactionRef, Cashier,
CustomerNr, ItemsNr, DocumentType
|
productItems |
Contains an array of the line items. Each line item is an array of key-value pairs.
Possible keys can be:
ProductId, ProductName, ProductPrice, ProductUnitPrice, ProductQuantity, ProductUnit,
TaxPercentage, TaxLabel, TaxAmount, TaxNetAmount, TaxGrossAmount, IsRefund
|
taxes |
Contains an array of tax infos with different tax types. Each tax info is an array of key-value pairs.
Possible keys can be:
TaxPercentage, TaxLabel, TaxAmount, TaxNetAmount, TaxGrossAmount
|
payments |
This field is to indicate how the transaction has been paid, for example: paypal, Credit card, Debit card and so on. It contains an array of payment infos with different payment types and the possible card number included in the receipt. Each payment info is an array of key-value pairs.
Possible keys can be:
PaymentMethod, PaymentCardNumber
|
paymentBanks |
This field is to indicate how the invoice can been paid through banks with the bank name, BIC and IBAN. It contains an array of payment banks with BankName, BIC and IBAN. Each payment info is an array of key-value pairs.
Possible keys can be:
BankName, BIC, IBAN
|
performanceOption |
Indicates which algorithm was used for processing the receipt. At the moment there is 'ACCURACY' and 'FALLBACK' available. 'FALLBACK' indicates that our algorithm encountered challenges while processing the receipt, therefore it provides basic information. |
fileHash |
MD5 hash of the input file. This information can be used to check for duplicates |
version |
Version of the algorithm which was used to process the receipt |
pages |
size information (height and width) of all pages |
fullText |
texts of lines on all pages |
languages |
array of language codes of languages detected in the document |
mainLanguage |
language code of the main language detected in the document |
Key-Value pairs
All key value pairs mentioned above have the same format like this:
"key": {
"value": "STRONG FLOUR",
"polygon": {
"p1": {
"x": 104.0,
"y": 67.0
},
"p2": {
"x": 221.0,
"y": 67.0
},
"p3": {
"x": 221.0,
"y": 80.0
},
"p4": {
"x": 104.0,
"y": 80.0
}
},
"page": 1,
"confidence": 0.89
}
Inside the value structure, you can find "value": "". The "value" is represented in a format of String no matter it is a number or text.
"polygon" is used to indicate the location of the found result on a page of the invoice. "page" is used to indicate the page number where the found result is on, which starts from 1.
"confidence" is used to indicate the confidence of the extraction correctness, which is range from 0 to 1.
If the input parameter "polygon" in request "/api/finance/v1/processing?polygon=false" set to "false", the polygon information will not be returned. The key-value pair then simplified like this:
"key": {
"value": "STRONG FLOUR",
"page": 1,
"confidence": 0.89
}
|