How to integrate Eagle Doc Document Processing in your application

Eagle Doc has two versatile options for document processing:

The no-code option is ideal for individuals seeking to expedite document processing without the need for coding. This option will include a variety of ready-to-use integrations from our trusted partners.

For those who prefer a customized approach, the code option provides a unique solution. This feature enables seamless integration of Eagle Doc Document Processing within your application, allowing for full customization of your document processing needs. With Eagle Doc Document Processing, users have access to a range of tools that streamline the document processing experience, regardless of their level of technical expertise. Try Eagle Doc Document Processing today to discover how it can elevate your document processing capabilities.

Eagle Doc Document Processing is a REST API that offers easy integration into any application using almost all programming languages. As a developer, you can quickly incorporate Eagle Doc's Document Processing powerful receipt and invoice processing services into your project, making it an ideal solution.

To access the full benefits of our API, we kindly invite you to register for a subscription.


The documentation provides you with different sections. You can follow the links for a quick access:




Receipt Processing

Please find below more information regarding the utilization of the Receipt Processing API.

We retain previous versions for existing customers, ensuring a consistent interface. Core module enhancements are automatically extended to previous versions. For new integrations, we recommend using the latest version for access to new features.

Server

Currently, we run one server in Frankfurt, Germany. If you require a dedicated server or specific location, please get in touch with us.

alternative



Receipt Processing Endpoints


Receipt API version 3 (v3)
Parameters
Name Description
api-key (header) API key which you will receive with your subscription here
file (form-data) File of the receipt. To be sent in the body as form-data with the key 'file'
privacy (query parameter) Boolean (true, false) to indicate if the uploaded file is stored on the server to further enhance the algorithm or not. 'true' means that the file is not stored, 'false' means that the file is stored. The default value is false. To change, you can set it: &privacy=true
polygon (query parameter) Boolean (true, false) to indicate if you want to receive coordinate information of the extracted data. The data provides you with the ability to draw polygons around the extracted text on the input file. The default value is false. To change, you can set it: &polygon=true
fullText (query parameter) Boolean (true, false) to indicate if you want to receive the full text of the extracted data. The data will be an array of strings per page (in case of multiple pages of the receipt). The data can be used for example to make receipts searchable in your database. The default value is false. To change, otherwise you can set it: &fullText=true
Responses
Code Description
200 OK is returned to indicate that the receipt 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.
Field Name Description
general Summarizes general information about the receipt, which includes an array of key-value pairs.
Possible keys can be: ShopName, ShopStreet, ShopHouseNumber, ShopCity, ShopZip, ShopState, ShopCountry, ShopTaxNumber, Date, Time, ReceiptNumber, TotalPrice, Currency
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
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": "",
                                            "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
                                        }
403 BadCredentialException is used to indicate that for example the API key is not valid.
404 FileNotFoundException is used to indicate that there is no file found.
405 MethodNotAllowedException: Access to the API not allowed. There are multiple reasons possible: you reached the agreed quota, your contract expired or another internal error. Please contact us if the error persists.
500 InternalServerErrorException is used to indicate that something went wrong. Reason is not known.
Full JSON Example

Request with /api/receipt/v3/processing?polygon=true&fullText=true
An example of the whole JSON response of the parsed receipt looks like this (click this link).



Receipt API version 2 (v2) deprecated
Parameters
Name Description
api-key (header) API key which you will receive with your subscription here
file (form-data) File of the receipt. To be sent in the body as form-data with the key 'file'
privacy (query parameter) Boolean (true, false) to indicate if the uploaded file is stored on the server to further enhance the algorithm or not. 'true' means that the file is not stored, 'false' means that the file is stored. The default value is false. It is not needed to set the parameter in case you agree with the default value, otherwise you can set it: &privacy=true
polygon (query parameter) Boolean (true, false) to indicate if you want to receive coordinate information of the extracted data. The data provides you with the ability to draw polygons around the extracted text on the input file. It is not needed to set the parameter in case you agree with the default value ('false'), otherwise you can set it: &polygon=true
fullText (query parameter) Boolean (true, false) to indicate if you want to receive the full text of the extracted data. The data will be an array of strings per page (in case of multiple pages of the receipt). The data can be used for example to make receipts searchable in your database. It is not needed to set the parameter in case you agree with the default value ('false'), otherwise you can set it: &fullText=true
Responses
Code Description
200 OK is returned to indicate that the receipt 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.
Field Name Description
general Summarizes general information about the receipt
productItems Contains all the line items with further information
taxes Contains a summary of all the tax information
payments Contains all payment information
performanceOption Indicates which algorithm was used for processing the receipt. At the moment there is only 'SPEED' available
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
numberOfPages Number of processed pages in case a receipt consists of multiple pages
fullText Contains the full text information of the receipt in an unstructured format. This information can help for example if you want to store the receipts in a database and make it searchable
ShopName Name of the shop
ShopStreet Name of the street where the shop is located
ShopCity Name of the city where the shop is located
ShopZip Zip code of the city where the shop is located
ShopState State where the shop is located
ShopCountry Country where the shop is located
ShopTel Phone number of the shop
ShopEmail Email address of the shop
ShopWeb Web address of the shop
Date Date when the receipt was issued
Time Time when the receipt was issued
ReceiptNumber Number of the issued receipt
TotalPrice Total price of the receipt
Currency Currency which applies for the receipt
Polygon Structure which holds the points of a polygon. The polygon describes the area in which the text was found in the image
p1, p2, p3, p4 Points with x, y coordinates normalized to 1
TaxAmount Amount of tax according to a certain tax category
TaxNetAmount Net amount based on which the tax is calculated for a certain tax category
TaxGrossAmount Gross amount of the the tax category: TaxAmount + TaxNetAmount for the tax category
TaxPercentage Percentage of the tax category (for example: 7%, 19%)
TaxLabel Label of the tax information. Sometimes labels like 'A', 'B' are used to indicate a certain tax category in the product list.
PaymentMethod Indicates which payment method was used. For example: girocard, visa, etc.
PaymentCardNumber Card number of the car which was used to pay
ProductId Id of the product on the receipt. Sometimes there are specific numbers on the receipt to identify a product
ProductName Name of the product
ProductPrice Price of the product. If multiple products are summarized in one line, the total of all products is given
ProductUnitPrice If multiple products are summarized in one line, the unit price for a single product is given
ProductQuantity If multiple products are summarized in one line, the number of products is given

Example:
/api/v2/receipt/processing?privacy=true&polygon=true&fullText=true

                                
                                {
                                    "general": {
                                        "ShopName": {
                                            "value": "Amazonica Restaurant marché",
                                            "polygon": {
                                                "p1": {
                                                    "x": 338.0,
                                                    "y": 566.0
                                                },
                                                "p2": {
                                                    "x": 664.0,
                                                    "y": 553.0
                                                },
                                                "p3": {
                                                    "x": 665.0,
                                                    "y": 581.0
                                                },
                                                "p4": {
                                                    "x": 339.0,
                                                    "y": 594.0
                                                }
                                            },
                                            "page": 1
                                        },
                                        "ShopStreet": {
                                            "value": "Pragstrasse 9",
                                            "polygon": {
                                                "p1": {
                                                    "x": 257.0,
                                                    "y": 593.0
                                                },
                                                "p2": {
                                                    "x": 468.4666666666667,
                                                    "y": 593.0
                                                },
                                                "p3": {
                                                    "x": 468.4666666666667,
                                                    "y": 641.0
                                                },
                                                "p4": {
                                                    "x": 257.0,
                                                    "y": 641.0
                                                }
                                            },
                                            "page": 1
                                        },
                                        "ShopCity": {
                                            "value": "Stuttgart",
                                            "polygon": {
                                                "p1": {
                                                    "x": 598.6,
                                                    "y": 593.0
                                                },
                                                "p2": {
                                                    "x": 745.0,
                                                    "y": 593.0
                                                },
                                                "p3": {
                                                    "x": 745.0,
                                                    "y": 641.0
                                                },
                                                "p4": {
                                                    "x": 598.6,
                                                    "y": 641.0
                                                }
                                            },
                                            "page": 1
                                        },
                                        "ShopZip": {
                                            "value": "70376",
                                            "polygon": {
                                                "p1": {
                                                    "x": 501.0,
                                                    "y": 593.0
                                                },
                                                "p2": {
                                                    "x": 582.3333333333334,
                                                    "y": 593.0
                                                },
                                                "p3": {
                                                    "x": 582.3333333333334,
                                                    "y": 641.0
                                                },
                                                "p4": {
                                                    "x": 501.0,
                                                    "y": 641.0
                                                }
                                            },
                                            "page": 1
                                        },
                                        "ShopTel": {
                                            "value": "+49 711 50560620",
                                            "polygon": {
                                                "p1": {
                                                    "x": 324.0,
                                                    "y": 648.0
                                                },
                                                "p2": {
                                                    "x": 681.0,
                                                    "y": 635.0
                                                },
                                                "p3": {
                                                    "x": 682.0,
                                                    "y": 664.0
                                                },
                                                "p4": {
                                                    "x": 325.0,
                                                    "y": 677.0
                                                }
                                            },
                                            "page": 1
                                        },
                                        "ShopEmail": {
                                            "value": "wilhelma@marche-int.com",
                                            "polygon": {
                                                "p1": {
                                                    "x": 266.0,
                                                    "y": 689.0
                                                },
                                                "p2": {
                                                    "x": 736.0,
                                                    "y": 677.0
                                                },
                                                "p3": {
                                                    "x": 737.0,
                                                    "y": 705.0
                                                },
                                                "p4": {
                                                    "x": 267.0,
                                                    "y": 717.0
                                                }
                                            },
                                            "page": 1
                                        },
                                        "Date": {
                                            "value": "2022-11-06",
                                            "polygon": {
                                                "p1": {
                                                    "x": 583.0,
                                                    "y": 801.0
                                                },
                                                "p2": {
                                                    "x": 848.0,
                                                    "y": 790.0
                                                },
                                                "p3": {
                                                    "x": 849.0,
                                                    "y": 820.0
                                                },
                                                "p4": {
                                                    "x": 584.0,
                                                    "y": 831.0
                                                }
                                            },
                                            "page": 1
                                        },
                                        "Time": {
                                            "value": "12:48",
                                            "polygon": {
                                                "p1": {
                                                    "x": 583.0,
                                                    "y": 801.0
                                                },
                                                "p2": {
                                                    "x": 848.0,
                                                    "y": 790.0
                                                },
                                                "p3": {
                                                    "x": 849.0,
                                                    "y": 820.0
                                                },
                                                "p4": {
                                                    "x": 584.0,
                                                    "y": 831.0
                                                }
                                            },
                                            "page": 1
                                        },
                                        "ReceiptNumber": {
                                            "value": "951",
                                            "polygon": {
                                                "p1": {
                                                    "x": 0.0,
                                                    "y": 0.0
                                                },
                                                "p2": {
                                                    "x": 0.0,
                                                    "y": 0.0
                                                },
                                                "p3": {
                                                    "x": 0.0,
                                                    "y": 0.0
                                                },
                                                "p4": {
                                                    "x": 0.0,
                                                    "y": 0.0
                                                }
                                            },
                                            "page": 0
                                        },
                                        "TotalPrice": {
                                            "value": "30.9",
                                            "polygon": {
                                                "p1": {
                                                    "x": 762.0,
                                                    "y": 1076.0
                                                },
                                                "p2": {
                                                    "x": 842.0,
                                                    "y": 1071.0
                                                },
                                                "p3": {
                                                    "x": 844.0,
                                                    "y": 1097.0
                                                },
                                                "p4": {
                                                    "x": 764.0,
                                                    "y": 1102.0
                                                }
                                            },
                                            "page": 1
                                        },
                                        "Currency": {
                                            "value": "EUR",
                                            "polygon": {
                                                "p1": {
                                                    "x": 660.0,
                                                    "y": 3214.0
                                                },
                                                "p2": {
                                                    "x": 808.0,
                                                    "y": 3215.0
                                                },
                                                "p3": {
                                                    "x": 808.0,
                                                    "y": 3239.0
                                                },
                                                "p4": {
                                                    "x": 660.0,
                                                    "y": 3238.0
                                                }
                                            },
                                            "page": 1
                                        }
                                    },
                                    "productItems": [
                                        {
                                            "TaxPercentage": {
                                                "value": "7.0",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 765.0,
                                                        "y": 915.0
                                                    },
                                                    "p2": {
                                                        "x": 841.9288025889967,
                                                        "y": 908.0064724919093
                                                    },
                                                    "p3": {
                                                        "x": 842.9288025889967,
                                                        "y": 936.0064724919093
                                                    },
                                                    "p4": {
                                                        "x": 766.0,
                                                        "y": 943.0
                                                    }
                                                },
                                                "page": 1
                                            },
                                            "ProductName": {
                                                "value": "Maultaschen Beilage",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 178.0,
                                                        "y": 919.0
                                                    },
                                                    "p2": {
                                                        "x": 487.0,
                                                        "y": 921.0
                                                    },
                                                    "p3": {
                                                        "x": 487.0,
                                                        "y": 949.0
                                                    },
                                                    "p4": {
                                                        "x": 178.0,
                                                        "y": 947.0
                                                    }
                                                },
                                                "page": 1
                                            },
                                            "ProductPrice": {
                                                "value": "11.9",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 765.0,
                                                        "y": 915.0
                                                    },
                                                    "p2": {
                                                        "x": 841.9288025889967,
                                                        "y": 908.0064724919093
                                                    },
                                                    "p3": {
                                                        "x": 842.9288025889967,
                                                        "y": 936.0064724919093
                                                    },
                                                    "p4": {
                                                        "x": 766.0,
                                                        "y": 943.0
                                                    }
                                                },
                                                "page": 1
                                            }
                                        },
                                        {
                                            "TaxPercentage": {
                                                "value": "7.0",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 764.0,
                                                        "y": 954.0
                                                    },
                                                    "p2": {
                                                        "x": 840.9290322580645,
                                                        "y": 947.0064516129032
                                                    },
                                                    "p3": {
                                                        "x": 842.9290322580645,
                                                        "y": 975.0064516129032
                                                    },
                                                    "p4": {
                                                        "x": 766.0,
                                                        "y": 982.0
                                                    }
                                                },
                                                "page": 1
                                            },
                                            "ProductName": {
                                                "value": "Schnitzel Beilage",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 177.0,
                                                        "y": 956.0
                                                    },
                                                    "p2": {
                                                        "x": 455.0,
                                                        "y": 958.0
                                                    },
                                                    "p3": {
                                                        "x": 455.0,
                                                        "y": 987.0
                                                    },
                                                    "p4": {
                                                        "x": 177.0,
                                                        "y": 985.0
                                                    }
                                                },
                                                "page": 1
                                            },
                                            "ProductPrice": {
                                                "value": "14.5",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 764.0,
                                                        "y": 954.0
                                                    },
                                                    "p2": {
                                                        "x": 840.9290322580645,
                                                        "y": 947.0064516129032
                                                    },
                                                    "p3": {
                                                        "x": 842.9290322580645,
                                                        "y": 975.0064516129032
                                                    },
                                                    "p4": {
                                                        "x": 766.0,
                                                        "y": 982.0
                                                    }
                                                },
                                                "page": 1
                                            }
                                        },
                                        {
                                            "TaxPercentage": {
                                                "value": "7.0",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 777.0,
                                                        "y": 994.0
                                                    },
                                                    "p2": {
                                                        "x": 842.0867678958786,
                                                        "y": 990.17136659436
                                                    },
                                                    "p3": {
                                                        "x": 844.0867678958786,
                                                        "y": 1017.17136659436
                                                    },
                                                    "p4": {
                                                        "x": 779.0,
                                                        "y": 1021.0
                                                    }
                                                },
                                                "page": 1
                                            },
                                            "ProductName": {
                                                "value": "Pommes Frites Bio-Qu",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 178.0,
                                                        "y": 995.0
                                                    },
                                                    "p2": {
                                                        "x": 505.0,
                                                        "y": 1000.0
                                                    },
                                                    "p3": {
                                                        "x": 504.0,
                                                        "y": 1031.0
                                                    },
                                                    "p4": {
                                                        "x": 177.0,
                                                        "y": 1026.0
                                                    }
                                                },
                                                "page": 1
                                            },
                                            "ProductPrice": {
                                                "value": "4.5",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 777.0,
                                                        "y": 994.0
                                                    },
                                                    "p2": {
                                                        "x": 842.0867678958786,
                                                        "y": 990.17136659436
                                                    },
                                                    "p3": {
                                                        "x": 844.0867678958786,
                                                        "y": 1017.17136659436
                                                    },
                                                    "p4": {
                                                        "x": 779.0,
                                                        "y": 1021.0
                                                    }
                                                },
                                                "page": 1
                                            }
                                        }
                                    ],
                                    "taxes": [
                                        {
                                            "TaxAmount": {
                                                "value": "2.02",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 565.0,
                                                        "y": 1279.0
                                                    },
                                                    "p2": {
                                                        "x": 631.0,
                                                        "y": 1279.0
                                                    },
                                                    "p3": {
                                                        "x": 631.0,
                                                        "y": 1308.0
                                                    },
                                                    "p4": {
                                                        "x": 565.0,
                                                        "y": 1308.0
                                                    }
                                                },
                                                "page": 1
                                            },
                                            "TaxNetAmount": {
                                                "value": "28.88",
                                                "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
                                            },
                                            "TaxGrossAmount": {
                                                "value": "30.9",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 761.0,
                                                        "y": 1272.0
                                                    },
                                                    "p2": {
                                                        "x": 843.0,
                                                        "y": 1272.0
                                                    },
                                                    "p3": {
                                                        "x": 843.0,
                                                        "y": 1302.0
                                                    },
                                                    "p4": {
                                                        "x": 761.0,
                                                        "y": 1302.0
                                                    }
                                                },
                                                "page": 1
                                            },
                                            "TaxPercentage": {
                                                "value": "7.0",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 163.0,
                                                        "y": 1281.0
                                                    },
                                                    "p2": {
                                                        "x": 226.0,
                                                        "y": 1281.0
                                                    },
                                                    "p3": {
                                                        "x": 226.0,
                                                        "y": 1306.0
                                                    },
                                                    "p4": {
                                                        "x": 163.0,
                                                        "y": 1306.0
                                                    }
                                                },
                                                "page": 1
                                            }
                                        }
                                    ],
                                    "payments": [
                                        {
                                            "PaymentMethod": {
                                                "value": "girocard",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 411.0,
                                                        "y": 3092.0
                                                    },
                                                    "p2": {
                                                        "x": 547.0,
                                                        "y": 3092.0
                                                    },
                                                    "p3": {
                                                        "x": 547.0,
                                                        "y": 3123.0
                                                    },
                                                    "p4": {
                                                        "x": 411.0,
                                                        "y": 3123.0
                                                    }
                                                },
                                                "page": 1
                                            },
                                            "PaymentCardNumber": {
                                                "value": "###############4423",
                                                "polygon": {
                                                    "p1": {
                                                        "x": 495.0,
                                                        "y": 3291.0
                                                    },
                                                    "p2": {
                                                        "x": 806.0,
                                                        "y": 3291.0
                                                    },
                                                    "p3": {
                                                        "x": 806.0,
                                                        "y": 3315.0
                                                    },
                                                    "p4": {
                                                        "x": 495.0,
                                                        "y": 3315.0
                                                    }
                                                },
                                                "page": 1
                                            }
                                        }
                                    ],
                                    "performanceOption": "SPEED",
                                    "fileHash": "afdf2c591ae648071b15023a74cc3068",
                                    "version": "0.0.36",
                                    "numberOfPages": 1,
                                    "fullText": [
                                        [
                                            "marché ",
                                            "MÖVENPICK ",
                                            "Marche Wilhelma Stuttgart ",
                                            "Amazonica Restaurant ",
                                            "Pragstrasse 9, 70376 Stuttgart ",
                                            "TEL.: +49 711 50560620 ",
                                            "Mail: wilhelma@marche-int.com ",
                                            "Marché Restaurant ",
                                            "RNG-Nr.: 60812 06.11.2022 12:48 ",
                                            "Kasse: WS667208 Kellner: 66725050 ",
                                            "Maultaschen Beilage 11,90 ",
                                            "Schnitzel Beilage 14,50 ",
                                            "Pommes Frites Bio-Qu 4,50 ",
                                            "Total in EUR 30,90 ",
                                            "1105 Girocard 30,90 ",
                                            "MwSt % Netto MwSt Brutto ",
                                            "7.00 28,88 2,02 30,90 ",
                                            "** Im Haus ** Shop:496672 ",
                                            "****** Fiscal Information ****** ",
                                            "Marche Mövenpick Deutschland GmbH ",
                                            "Esslinger Str. 7, 70771 L.-Echterdingen ",
                                            "0 USt.ID.Nr.: DE147 795 915 ",
                                            "A food lovers' brand ",
                                            "by Marché International ",
                                            "Sie lieben Frische, Qualität & Genus ? ",
                                            "Dann sind Sie bei uns genau richtig. ",
                                            "WIR SUCHEN SIE als Teil unseres Teams. ",
                                            "Offene Stellen: ",
                                            "jobs.marche-international.com ",
                                            "+ KUNDENBELEG+ ",
                                            "Marche M?venpick ",
                                            "Wilhelma Stuttgart ",
                                            "Pragstra?e 9 ",
                                            "70376 Stuttgart ",
                                            "Vielen Dank! ",
                                            "Terminalnummer 68250643 ",
                                            "Datum 06.11.2022 ",
                                            "Uhrzeit 12:47:58 ",
                                            "Beleg-Nr. 951 ",
                                            "Transaktions-Nr. 55729 ",
                                            "Kartenzahlung ",
                                            "girocard ",
                                            "Betrag 30.90 EUR ",
                                            "Karte ###############4423 ",
                                            "Kartenfolgenummer 02 ",
                                            "Vertragsnummer VU-123456789017 ",
                                            "EMV-AID A0000003591010028001 ",
                                            "Genehmigungs-Nr. 192248 ",
                                            "EMV-DATA: ",
                                            "1F0302/0000000000 ",
                                            "Contact less ",
                                            "Zahlung erfolgt "
                                        ]
                                    ]
                                }
                                
                            
403 BadCredentialException is used to indicate that for example the API key is not valid.
404 FileNotFoundException is used to indicate that there is no file found.
405 MethodNotAllowedException: Access to the API not allowed. There are multiple reasons possible: you reached the agreed quota, your contract expired or another internal error. Please contact us if the error persists.
500 InternalServerErrorException is used to indicate that something went wrong. Reason is not known.
Parameters
Name Description
api-key (header) API key which you will receive with your subscription here
Responses
Code Description
200 OK is returned to indicate that the command was successful.
Field Name Description
quota If a quota is in place, it will be shown here. Quotas can either be fixed, like 100 requests included in a package, after which no more requests can be made. Alternatively, you might have a flexible contract where extra requests are billed separately
quotaUsed Shows how many times a request was made. If receipts have multiple pages, each page counts as one request
activeMonth Displays the corresponding month for which this quota is applicable
                                
                                {
                                    "quota": 10,
                                    "quotaUsed": 7,
                                    "activeMonth": 9
                                }
                                
                            
403 BadCredentialException is used to indicate that for example the API key is not valid.
500 InternalServerErrorException is used to indicate that something went wrong. Reason is not known.


Receipt API version 1 (v1) deprecated
Parameters
Name Description
api-key (header) API key which you will receive with your subscription here
file (form-data) File of the receipt. To be sent in the body as form-data with the key 'file'
Responses
Code Description
200 OK is returned to indicate that the receipt was processed successfully.

Example:
/api/v1/receipt/processing

                                
                                {
                                    "shop": {
                                        "shopName": "Amazonica Restaurant marché",
                                        "street": "Pragstrasse 9",
                                        "city": "Stuttgart",
                                        "zip": "70376",
                                        "state": "",
                                        "country": null,
                                        "phone": "+49 711 50560620"
                                    },
                                    "createdTime": "2023-10-19T14:13:07.039Z",
                                    "receiptTime": "2022-11-06T12:48:00.000Z",
                                    "receiptNumber": "",
                                    "totalPrice": 30.9,
                                    "taxAmounts": [
                                        {
                                            "taxRatePercentage": 7.0,
                                            "taxAmount": 2.02,
                                            "netAmount": 28.88,
                                            "grossAmount": 30.9
                                        }
                                    ],
                                    "lineItems": [
                                        {
                                            "name": "Maultaschen Beilage",
                                            "taxRatePercentage": 7.0,
                                            "quantity": 1.0,
                                            "lineItemGrossAmount": 11.9
                                        },
                                        {
                                            "name": "Schnitzel Beilage",
                                            "taxRatePercentage": 7.0,
                                            "quantity": 1.0,
                                            "lineItemGrossAmount": 14.5
                                        },
                                        {
                                            "name": "Pommes Frites Bio-Qu",
                                            "taxRatePercentage": 7.0,
                                            "quantity": 1.0,
                                            "lineItemGrossAmount": 4.5
                                        }
                                    ],
                                    "currency": "EUR",
                                    "paymentMethods": [
                                        {
                                            "cardType": "DEBIT_CARD",
                                            "cardNumber": "###############4423",
                                            "method": "DEBIT_CARD"
                                        }
                                    ]
                                }
                                
                            
403 BadCredentialException is used to indicate that for example the API key is not valid.
404 FileNotFoundException is used to indicate that there is no file found.
405 MethodNotAllowedException: Access to the API not allowed. There are multiple reasons possible: you reached the agreed quota, your contract expired or another internal error. Please contact us if the error persists.
500 InternalServerErrorException is used to indicate that something went wrong. Reason is not known.
Parameters
Name Description
api-key (header) API key which you will receive with your subscription here
Responses
Code Description
200 OK is returned to indicate that the command was successful.
Field Name Description
quota If a quota is in place, it will be shown here. Quotas can either be fixed, like 100 requests included in a package, after which no more requests can be made. Alternatively, you might have a flexible contract where extra requests are billed separately
quotaUsed Shows how many times a request was made. If receipts have multiple pages, each page counts as one request
activeMonth Displays the corresponding month for which this quota is applicable
                                
                                {
                                    "quota": 10,
                                    "quotaUsed": 7,
                                    "activeMonth": 9
                                }
                                
                            
403 BadCredentialException is used to indicate that for example the API key is not valid.
500 InternalServerErrorException is used to indicate that something went wrong. Reason is not known.

Examples

Example for cURL:
                        
                            curl --location --request POST 'https://de.eagle-doc.com/api/receipt/v3/processing' \
                                --header 'api-key: YOUR_SECRET_API_KEY' \
                                --form 'file=@"receipt.jpeg"'
                        
                    
Example for PHP:
                        
                        
                                $client = curl_init($url);

                                curl_setopt_array($client, array(
                                    CURLOPT_URL => 'https://de.eagle-doc.com/api/receipt/v3/processing',
                                    CURLOPT_RETURNTRANSFER => true,
                                    CURLOPT_ENCODING => '',
                                    CURLOPT_MAXREDIRS => 10,
                                    CURLOPT_TIMEOUT => 0,
                                    CURLOPT_FOLLOWLOCATION => true,
                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                    CURLOPT_CUSTOMREQUEST => 'POST',
                                    CURLOPT_POSTFIELDS => array('file'=> new CURLFILE("receipt.jpeg")),
                                    CURLOPT_HTTPHEADER => array(
                                        'api-key: YOUR_SECRET_API_KEY'
                                    ),
                                ));

                                $json = curl_exec($client);
                                
                                curl_close($client);

                                echo $json;
                            
                        
                    
Example for Python (3.10):
                        
                        
                            import requests

                            url = "https://de.eagle-doc.com/api/receipt/v3/processing"

                            payload = {}
                            files=[
                            ('file',('dm-k.png',open('/Users/abc/Desktop/dm-k.png','rb'),'image/png'))
                            ]
                            headers = {
                                'api-key': 'YOUR_SECRET_API_KEY'
                            }

                            response = requests.request("POST", url, headers=headers, data=payload, files=files)

                            print(response.text)
                            
                        
                    



Invoice Processing

Please find below more information regarding the utilization of the Invoice Processing API.

Server

Currently, we run one server in Frankfurt, Germany. If you require a dedicated server or specific location, please get in touch with us.

alternative



Invoice Processing Endpoints


Invoice API version 1 (v1) 🚧 Preview 🚧
Parameters
Name Description
api-key (header) API key which you will receive with your subscription here
file (form-data) File of the invoice. To be sent in the body as form-data with the key 'file'
privacy (query parameter) Boolean (true, false) to indicate if the uploaded file is stored on the server to further enhance the algorithm or not. 'true' means that the file is not stored, 'false' means that the file is stored. The default value is false. The default value is false. To change, you can set it: &privacy=true
polygon (query parameter) Boolean (true, false) to indicate if you want to receive coordinate information of the extracted data. The data provides you with the ability to draw polygons around the extracted text on the input file. The default value is false. To change, you can set it: &polygon=true
fullText (query parameter) Boolean (true, false) to indicate if you want to receive the full text of the extracted data. The data will be an array of strings per page (in case of multiple pages of the invoice). The data can be used for example to make invoices searchable in your database. The default value is false. To change, you can set it: &fullText=true
Responses
Code Description
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.
Field Name Description
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, ShopTaxNumber, 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
                                        }

403 BadCredentialException is used to indicate that for example the API key is not valid.
404 FileNotFoundException is used to indicate that there is no file found.
405 MethodNotAllowedException: Access to the API not allowed. There are multiple reasons possible: you reached the agreed quota, your contract expired or another internal error. Please contact us if the error persists.
500 InternalServerErrorException is used to indicate that something went wrong. Reason is not known.
Full JSON Example

Request with /api/invoice/v1/processing?polygon=false&fullText=true
An example of the whole JSON response of the parsed invoice in looks like this (click this link).



Examples

You can find examples on how to access our API in the receipt section.




Management

Use our management endpoint to see how much you've used this month. It won't cost you anything, and it won't count as a request.

Server

Currently, we run one server in Frankfurt, Germany. If you require a dedicated server or specific location, please get in touch with us.

alternative



Management


Management API version 1 (v1)
Parameters
Name Description
api-key (header) API key which you will receive with your subscription here
Responses
Code Description
200 OK is returned to indicate that the command was successful.
Field Name Description
quota If a quota is in place, it will be shown here. Quotas can either be fixed, like 100 requests included in a package, after which no more requests can be made. Alternatively, you might have a flexible contract where extra requests are billed separately
quotaUsed Shows how many times a request was made. If receipts have multiple pages, each page counts as one request
activeMonth Displays the corresponding month for which this quota is applicable
                                
                                {
                                    "quota": 10,
                                    "quotaUsed": 7,
                                    "activeMonth": 9
                                }
                                
                            
403 BadCredentialException is used to indicate that for example the API key is not valid.
500 InternalServerErrorException is used to indicate that something went wrong. Reason is not known.






Tools

Postman

Postman can be utilized for your testing needs as well:

Postman logo Download the Collection




Support

We know that things can be complicated, especially when you do it the first time. Do not worry, we are here to help. We will provide you with the best support, so that your project will be successfull 🥳

Please contact us at:

support@eagle-doc.com