The Human Feedback API allows you to provide feedback to the extractions from Eagle Doc. This feedback is used to improve the accuracy of the extractions in the future.

Server

We currently operate one server in Frankfurt, Germany. This server is supported by a load balancer, allowing it to scale smoothly based on the workload. If you require a dedicated server or specific location, please get in touch with us.

alternative



Any Document Feedback API with user provided instructions - version 1 (v1)

This feedback allows the user to give extraction instructions of how specific fields. With this endpoint, the user has the direct control of extracted results. No additional fees apply when calling this endpoint.

Click the following box to see the detailed description of this API if the box is not expanded.

Parameters
Name Description
api-key (header) API key which you will receive with your subscription here
corrected (form-data) Corrected json file of the extraction. With Eagle Doc OCR APIs, you get your extractions in structured format of JSON. If something goes wrong, you can make corrections on the json file and sent back to Eagle Doc through this API as parameter 'corrected'.
instructions (query parameter) String to indicate the instructions how a field can be extracted from the original text. Such as "from text 'This invoice should be paid by Feb 02, 2025', get InvoiceDueDate: '2025-02-02'". You can concatenate multiple instructions into a single string using semicolons (';') as separators.
overwrite (query parameter) Boolean to indicate whether to overwrite old learnings of this document.
Responses
Code Description
200 OK is returned to indicate that the document was processed successfully.

The response contains a list of page segments. Each page segment is an array of two digits, from which the first one indicate the start page of the segment and the second one the end page of the segment.

The result contains a message from Eagle Doc to indicate the status of the operation.

An example result can look like this:

                                
                                {
                                    "message": "The learning has been updated successfully."
                                }
                                
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.
Examples
Example Curl Request
                        
                        curl --location 'https://de.eagle-doc.com/api/docu/learning/instructions?instructions=from%20text%20%27This%20invoice%20should%20be%20paid%20by%20Feb%2002%2C%202025%27%2C%20get%20InvoiceDueDate%3A%20%272025-02-02%27' \
                        --header 'api-key: ••••••' \
                        --form 'corrected=@"/path/to/corrected.json"'
                        
                    
Example Postman Request
instant learning through human feedback instructions instant learning through human feedback instructions
Example of how to give instructions
- example 1:

from text 'This invoice should be paid by Feb 02, 2025', get InvoiceDueDate: '2025-02-02'

- example 2:

from text '2x 1,35 dmBio 7 Früchte Frucht 2,70 2', get ProductName:'dmBio 7 Früchte Frucht', ProductUnitPrice:1.35, ProductQuantity: 2, ProductPrice: 2.7




Any Document Feedback API - version 1 (v1)

This feedback allows the user to give feedback on the extractions of any document, so that the future extractions get better. With this endpoint, Eagle Doc automatically learns from the modifications made by the user. Please note that calling this endpoint incurs the same per-page cost as document extraction.

Click the following box to see the detailed description of this API if the box is not expanded.

Parameters
Name Description
api-key (header) API key which you will receive with your subscription here
file (form-data) File of the receipts or invoices. To be sent in the body as form-data with the key 'file'. If the document has multiple pages, you can attach them all as separate image files (supported image formats include: png, jpg, tif) or as a PDF.
original (form-data) Original json file of the extraction. With Eagle Doc OCR APIs, you get your extractions in structured format of JSON. Please send us this original json in json file format as parameter 'original'. This will be compared with the "corrected" json, so that the wrong extractions can be found automatically.
corrected (form-data) Corrected json file of the extraction. With Eagle Doc OCR APIs, you get your extractions in structured format of JSON. If something goes wrong, you can make corrections on the json file and sent back to Eagle Doc through this API as parameter 'corrected'.
Responses
Code Description
200 OK is returned to indicate that the document was processed successfully.

The response contains a list of page segments. Each page segment is an array of two digits, from which the first one indicate the start page of the segment and the second one the end page of the segment.

The result contains a message from Eagle Doc to indicate the status of the operation.

An example result can look like this:

                                
                                {
                                    "message": "The learning has been updated successfully."
                                }
                                
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.
Examples
💡
Important Information for JSON Corrections
  • Confidence and Page Values: You can ignore or omit "confidence" and "page" fields during correction. Eagle Doc will focus on learning from the actual field values and structural changes.
  • Automatic Learning: Eagle Doc automatically learns from newly added items or deleted items in your corrections. You don't need special formatting for additions or deletions - just include or exclude them in your corrected JSON.
📋 Basic Request Examples
Example Curl Request
                            
                            curl --location 'https://de.eagle-doc.com/api/docu/learning' \
                                    --header 'api-key: ••••••' \
                                    --form 'file=@"/path/test.pdf"' \
                                    --form 'corrected=@"/path/corrected.json"' \
                                    --form 'original=@"/path/original.json"'
                            
                        
Example Postman Request
instant learning through human feedback
🧾 Invoice Endpoint: JSON Corrections & Enhancements
Complete guide for correcting invoice outputs - field values, context/notes, and product lists
🔧 Basic Field Value Corrections
Part of original JSON
                                    
                                        "InvoiceDate": {
                                            "value": "2023-01-30",
                                            "page": 1,
                                            "confidence": 1.0
                                        },
                                        "InvoiceNumber": {
                                            "value": "RWE_1200",
                                            "page": 1,
                                            "confidence": 1.0
                                        },
                                        "Category": {
                                            "value": "Communication",
                                            "confidence": 1.0
                                        },
                                    
                                
Part of corrected json
                                    
                                        "InvoiceDate": {
                                            "value": "2023-01-30",
                                            "page": 1,
                                            "confidence": 1.0
                                        },
                                        "InvoiceNumber": {
                                            "value": "200",  // ← CHANGED from "RWE_1200"
                                            "page": 1,
                                            "confidence": 1.0
                                        },
                                        "Category": {
                                            "value": "Other" // ← CHANGED from "Communication"
                                        },
                                    
                                

📝 Adding Context & Notes for Better Learning
Part of original JSON
                                    
                                        "InvoiceNumber": {
                                            "value": "RWE_1200",
                                            "page": 1,
                                            "confidence": 1.0
                                        },
                                    
                                
Part of corrected json with context
                                    
                                        "InvoiceNumber": {
                                            "value": "200",  // ← CHANGED from "RWE_1200"
                                            "page": 1,
                                            "context": "Rechnung 200",  // ← ADDED
                                            "note": "do not include Rechnung in result."  // ← ADDED
                                        },
                                    
                                

🛒 Product List Corrections
Part of original JSON (productItems)
                                    
                                        "productItems": [
                                            {
                                                "ProductName": {
                                                    "value": "2x 0,85 dmBio Kokos Ana. Fruch",
                                                    "page": 1,
                                                    "confidence": 1.0
                                                },
                                                "ProductPrice": {
                                                    "value": "1.7",
                                                    "page": 1,
                                                    "confidence": 1.0
                                                }
                                            }
                                        ]
                                    
                                
Part of corrected JSON with refined product name
                                    
                                        "productItems": [
                                            {
                                                "ProductName": {
                                                    "value": "dmBio Kokos Ana. Fruch",  // ← CHANGED (removed "2x 0,85")
                                                    "page": 1,
                                                    "confidence": 1.0
                                                },
                                                "ProductPrice": {
                                                    "value": "1.7",
                                                    "page": 1,
                                                    "confidence": 1.0
                                                },
                                                "context": "2x 0,85 dmBio Kokos Ana. Fruch 1,70 2 ",  // ← ADDED
                                                "note": "Do not include the '2x 0,85' in the product name, as it is not a part of the product name but rather indicates quantity."  // ← ADDED
                                            }
                                        ]
                                    
                                

Note: For invoice endpoints, you can correct field values, add context and note fields for better learning, and clean up product lists by separating quantity information from product names.

🎓 Any Document Endpoint: Complete Correction Guide
Fixes array corrections and list structure enhancements for Any Document outputs
🔧 Using Fixes Array for Field Corrections
Part of original JSON (Any Document output)
                                    
                                        "docType": "Resume",
                                        "general": {
                                            "FullName": "Melanie Robinson",
                                            "Email": "MELANIE.ROBINSON@MAIL.COM",
                                            "Phone": "+1 (970) 333-3833",
                                            "Address": "344 ELM STREET MADISON, SD 57042",
                                            "Street": "344 ELM STREET",
                                            "City": "MADISON",
                                            "State": "SD",
                                            "Zip": "57042"
                                        }
                                    
                                
Part of corrected JSON with fixes array
                                    
                                        "docType": "Resume",
                                        "general": {
                                            "FullName": "Melanie Robinson",
                                            "Email": "MELANIE.ROBINSON@MAIL.COM",
                                            "Phone": "+1 970 3333833",  // ← CHANGED from "+1 (970) 333-3833"
                                            "Address": "344 ELM STREET MADISON, SD 57042",
                                            "Street": "344 ELM STREET",
                                            "City": "MADISON",
                                            "State": "SD",
                                            "Zip": "57042"
                                        },
                                        "fixes": [{  // ← ADDED entire fixes array
                                            "key": "Phone",
                                            "value": "+1 970 3333833",
                                            "context": "Tel: +1 (970) 333-3833",
                                            "note": "Reformat the phone into +1 970 3333833"
                                        }]
                                    
                                

📚 Correcting List Structures
Part of original JSON (EducationList)
                                    
                                        "EducationList": [
                                            {
                                                "StartDate": null,
                                                "EndDate": "2014",
                                                "DegreeName": "Bachelor of Arts",
                                                "InstitutionName": "Marketing Oregon State University"
                                            }
                                        ]
                                    
                                
Part of corrected JSON with enhanced dates
                                    
                                        "EducationList": [
                                            {
                                                "StartDate": "2010-09",  // ← CHANGED from null
                                                "EndDate": "2014-07",  // ← CHANGED from "2014"
                                                "DegreeName": "Bachelor of Arts",
                                                "InstitutionName": "Marketing Oregon State University",
                                                "context": "09.2010-07.2014 Marketing Oregon State University - Bachelor of Arts",  // ← ADDED
                                                "note": "include months in the StartDate and EndDate"  // ← ADDED
                                            }
                                        ]
                                    
                                

Note: For Any Document endpoints, use the "fixes" array for detailed correction tracking and add context/note fields directly to list elements to provide specific feedback about data structures and formatting preferences.