Any Doc OCR API - version 1 (v1)

This endpoint converts images or files of any document into structure information in JSON format. By given parameter "configId", this API can extract the key information based on the customization information defined under config with "configId". By given parameter "docType", this API can extract correspondent key information associated with "docType". If neither "configId" nor "docType" is given, this API first classify the document into one docType. And then extract the structure information.

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.
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 true. To change, you can set it: &privacy=false
configId (query parameter) String to indicate the configuration you want to use for extract the document. If configId is set, the extraction is supposed to be customised to your specific need. The configId you will get from Eagle Doc Team. If the documents are standard types which supported by Eagle Doc, and the extractions meet your need, you can leave this parameter empty.
docType (query parameter) If you know the document type of the document, set the value of docType to get stable results. The docType can be: BankStatement, TravelTicket, Passport, BusinessCard, EmployeeIDCard, StudentIDCard, DrivingLicense, BirthCertificate, DeliverySheet, Resume.
Responses
Code Description
200 OK is returned to indicate that the document was processed successfully.

The response contains the following fields:
Field Name Description
docType Type of the document: BankStatement, TravelTicket, Passport, BusinessCard, EmployeeIDCard, StudentIDCard, DrivingLicense, BirthCertificate, DeliverySheet, Resume or your customised definition of the document type
general Summarizes general information about the document, which includes an array of key-value pairs.
Possible keys depend on the document type. For example, for a bank statement, the keys can be: BankName, AccountHolderName, AccountNumber, StatementPeriod, OpeningBalance, ClosingBalance, TotalDeposits, TotalWithdrawals, BranchAddress, BranchCode, IFSCCode, MICRCode, SWIFTCode, Currency, AccountType, InterestEarned, FeesCharged, MinimumBalanceRequired, AccountStatus
lists Contains an array of the expected extractions. Each list is an array of key-value pairs.
Possible list types depend on the document type. For example, for a bank statement, the list types can be: TransactionList
processingInfo Here contains the processing information of the document. It includes a list of key value pairs. The keys are Language, Version, FileHash, Duration, NumberOfPages, and DocType.

An example result from a bank statement can look like this:

                                
                                {
                                    "docType": "BankStatement",
                                    "general": {
                                        "BankName": "CHASE",
                                        "AccountHolderName": "VICTOR FRANCO",
                                        "AccountNumber": "000000797746625",
                                        "StatementPeriod": "2009-07-23 to 2009-08-24",
                                        "OpeningBalance": "408.86",
                                        "ClosingBalance": "916.03",
                                        "TotalDeposits": "1,579.48",
                                        "TotalWithdrawals": "682.31",
                                        "BranchAddress": "6962 W PALO VERDE DR\nGLENDALE AZ 85303-4405",
                                        "BranchCode": "",
                                        "IFSCCode": "",
                                        "MICRCode": "",
                                        "SWIFTCode": "",
                                        "Currency": "USD",
                                        "AccountType": "Checking",
                                        "InterestEarned": "",
                                        "FeesCharged": "",
                                        "MinimumBalanceRequired": "",
                                        "AccountStatus": ""
                                    },
                                    "lists": "TransactionList": [
                                            {
                                                "TransactionAmount": "331.00",
                                                "TransactionType": "Deposit",
                                                "TransactionDescription": "Deposit 551611914",
                                                "TransactionDate": "2009-07-27"
                                            },
                                            {
                                                "TransactionAmount": "391.50",
                                                "TransactionType": "Deposit",
                                                "TransactionDescription": "Deposit 23203176",
                                                "TransactionDate": "2009-08-06"
                                            }
                                        ]
                                    },
                                    "processingInfo": {
                                        "Language": "en",
                                        "Version": "2.06.18",
                                        "FileHash": "199b7bad9b61cfb94c53871830b23281",
                                        "Duration": "7.032",
                                        "NumberOfPages": "1",
                                        "DocType": "BankStatement"
                                    }
                                }
                                
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.