200 |
OK is returned to indicate that the 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 invoice: Invoice or CreditMemo |
general |
Summarizes general information about the invoice, which includes an array of key-value pairs.
Possible keys can be:
ShopName, ShopStreet, ShopHouseNumber, ShopCity, ShopZip, ShopState, ShopCountry, TaxNumber,
CustomerName, CustomerStreet, CustomerHouseNumber, CustomerCity, CustomerZip, CustomerState, CustomerCountry,
InvoiceDate, InvoiceDueDate, InvoiceNumber,
TotalPrice, Currency, ReverseCharge
|
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 invoice 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 invoice. 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 BIC and IBAN. It contains an array of payment banks with BIC and IBAN. Each payment info is an array of key-value pairs.
Possible keys can be:
BIC, IBAN
|
performanceOption |
Indicates which algorithm was used for processing the invoice. At the moment there is 'ACCURACY' and 'FALLBACK' available. 'FALLBACK' indicates that our algorithm encountered challenges while processing the invoice, 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 invoice |
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": "",
"polygon": {
"p1": {
"x": 372.0,
"y": 1282.0
},
"p2": {
"x": 453.0,
"y": 1282.0
},
"p3": {
"x": 453.0,
"y": 1308.0
},
"p4": {
"x": 372.0,
"y": 1308.0
}
},
"page":1
}
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.
If the input parameter "polygon" in request "/api/invoice/v1/processing?polygon=false" set to "false", the polygon information will not be returned. The key-value pair then simplified like this:
"key": {
"value": "",
"page":1
}
|