NAV
API REFERENCE

API Reference

Welcome to Docsumo API ! You can use this API to access all our API endpoints, such as the Upload API to upload documents, or the Extract Data API to get extracted data.

The API is organized around REST. All requests should be made over SSL. All request and response bodies, including errors, are encoded in JSON.

We also have some specific language bindings to make integration easier. You can switch the programming language of the examples with the tabs in the top right.

Currently, we support the following official client bindings:

To play around with a few examples, we recommend a REST client called Postman. Simply tap the button below to import a pre-made collection of examples.

Docsumo Webapp APIs
run in postamn

Docsumo Financial APIs
run in postamn

Authentication

Docsumo API uses API_KEY to access various endpoints. You can get your endpoint from Docsumo Setting for authentication.

You can pass the token to the API in the HTTP Authorization Header using ‘X-API-KEY’.

Header

Example

Install Docsumo python client before you run python code.
pip install docsumo

The example below is written in curl and python.

curl -X GET \
  https://app.docsumo.com/api/v1/eevee/apikey/limit/ \
  -H 'X-API-KEY: <apikey>' \
from docsumo import Docsumo

docsumo = Docsumo(apikey=<apikey>)
docsumo.user_detail_credit_limit()

Errors

The Docsumo API uses HTTP Status codes to reflect successful and error requests. 2XX status codes represent a successful request, 4XX/5XX status codes represent an error took place. If you receive an error HTTP status code, check the body for an error code and message.

Valid response example

{
    "data": []
    "status": "success",
    "status_code": 200
}

Error response

{
    "status_code": 400,
    "message": "Validation Failed.",
    "error_code": "UNAUTHORIZED" 
}
Status Code Description Most Likely Cause
2XX Successful Request  
400 Bad Request Invalid/missing data
401 Unauthorized Invalid/missing credentials
404 Not Found The resource does not exist, ex. invalid/non-existent user id
409 Conflict Trying to overwrite a resource, ex. when creating a user with an email that already exists
429 Too Many Requests Hit an API rate limit
50X server error We made some mistake. Contact us

Rate Limits

To preserve the integrity and reliability of the platform our APIs have the following rate limits.

All API Endpoints

You can run a max of ten requests per second 10 requests/second unless noted otherwise.

Docsumo Webapp APIs

User Detail

User detail and limit

Get user detail along with the credit limit and usage information.

Definition

GET https://app.docsumo.com/api/v1/eevee/apikey/limit/ 
GET https://app.docsumo.com/api/v1/eevee/apikey/limit/ 

Example

curl -X GET \
  https://app.docsumo.com/api/v1/eevee/apikey/limit/ \
  -H 'X-API-KEY: <apikey>' \
docsumo = Docsumo(apikey=<apikey>)
docsumo.user_detail_credit_limit()

Response of API

{
    "data": {
        "document_types": [
            {
                "title": "Invoice",
                "value": "invoice"
            },
            {
                "title": "Bill of Lading",
                "value": "bill_of_lading"
            }
        ],
        "email": "hello+new_check@docsumo.com",
        "full_name": "tootlip",
        "monthly_doc_current": 7,
        "monthly_doc_limit": 1000,
        "user_id": "5e36961fe1707125e15c20af"
    },
    "error": "",
    "error_code": "",
    "message": "",
    "status": "success",
    "status_code": 200
}
Json Response Detail  
data dict dict of response.
data.document_types list list of document types in user account.
data.document_types[].title string title of document.
data.document_types[].value string internal documents type.
data.email string email of user.
data.full_name string name of user.
data.monthly_doc_current string current number of documents.
data.monthly_doc_limit string monthly documents number limit.
data.user_id internal user id of user.

Upload Documents

Upload files

Upload files from your local machine. Files to be uploaded need to have the document type type assigned to it. Pretrained Models (if exists) for this document type is then used to capture the key-values and tabular data for this document. If you have URL or base64, check Upload files [url and base64]

Definition

POST https://app.docsumo.com/api/v1/eevee/apikey/upload/ 
POST https://app.docsumo.com/api/v1/eevee/apikey/upload/ 

Example Request

curl -X POST \
https://app.docsumo.com/api/v1/eevee/apikey/upload/ \
-H apikey: <apikey> \
-F type=<document_type> \
-F file=@ \
-F user_doc_id= \
-F doc_meta_data=
import os
import requests

## requests
# path of file
path = 'example.jpg'
filename = os.path.basename(path)
multipart_form_data = {"files": ( filename, open(path, 'rb')),
                        "type": (None, <document_type>)}
headers = {"X-API-KEY": '<apikey>'}

r = requests.post(
    "https://app.docsumo.com/api/v1/eevee/apikey/upload/" ,
    files=multipart_form_data,
    headers=headers,
)

r.json()

Example Response

{
    "data": {
        "document": [
            {
                "created_at": "Sat, 13 Jun 2020 20:14:38 GMT",
                "doc_id": "fffcb91ba02248d78af90d73cc1a6720",
                "email": "bikram.dahal+j14@docsumo.com",
                "review_url": "http://app.docsumo.com/review-document/fffcb91ba02248d78af90d73cc1a6720",
                "status": "new",
                "title": "sample_invoice_docsumo_2-merged.pdf",
                "type": "invoice",
                "user_doc_id": "",
                "user_id": "5ee52bb5cd4b9a1bd51df053"
            }
        ]
    },
    "error": "",
    "error_code": "",
    "message": "",
    "status": "success",
    "status_code": 200
}
Form Arguments  
type required one of the document types value obtained from User detail.
file required stream of files body.
user_doc_id optionalstring unique user_doc_id that can be send and use to track document.
doc_meta_data optionalstring additional metadata to be passed.
headers (python only) dictionary of credentials (apikey)
Json Response Detail  
data dict dict of response.
data.document list list of uploaded documents detail.
data.document[].doc_id string doc_id, this id is used to make query for all the data associated with this document.
data.document[].email string email of the user.
data.document[].review_url string this url is to review the document in the app.
data.document[].status string status of the document.
data.document[].title string title of the document.
data.document[].type string type of the document.
data.document[].user_id string internal user id of the user.

Upload files [url and base64]

Upload file using URL or base64. Similar to file upload, the document type type needs to be assigned. Pretrained Models (if exists) for this document type is then used to capture the key-values and tabular data for this document.

Definition

POST https://app.docsumo.com/api/v1/eevee/apikey/upload/custom/
POST https://app.docsumo.com/api/v1/eevee/apikey/upload/custom/

Example Request

curl -X POST \
https://app.docsumo.com/api/v1/eevee/apikey/upload/custom/ \
-H apikey: <apikey> \
-F type=<document_type> \
-F filename=<file_name> \
-F file= \
-F user_doc_id= \
-F doc_meta_data=

## requests
# path of file
url = "https://docsumo.com/img/other/logo.png"

multipart_form_data = {"file": (None, url),
                        "type": (None, <document_type>),
                    'filename': (None, <file_name>)}
headers = {"X-API-KEY": <apikey>}

r = requests.post(
    "https://app.docsumo.com/api/v1/eevee/apikey/upload/custom/" ,
    files=multipart_form_data,
    headers=headers,
)
r.json()

Example Response

{
    "data": {
        "document": [
            {
                "created_at": "Sat, 13 Jun 2020 20:14:38 GMT",
                "doc_id": "fffcb91ba02248d78af90d73cc1a6720",
                "email": "bikram.dahal+j14@docsumo.com",
                "review_url": "http://app.docsumo.com/review-document/fffcb91ba02248d78af90d73cc1a6720",
                "status": "new",
                "title": "sample_invoice_docsumo_2-merged.pdf",
                "type": "invoice",
                "user_doc_id": "",
                "user_id": "5ee52bb5cd4b9a1bd51df053"
            }
        ]
    },
    "error": "",
    "error_code": "",
    "message": "",
    "status": "success",
    "status_code": 200
}
Form Arguments  
type required one of the document types value obtained from User detail.
file required string url of file or base64 of the file.
filename required string name of the file that it will be save with.
user_doc_id optionalstring unique user_doc_id that can be send and use to track document.
doc_meta_data optionalstring additional metadata to be passed.
headers (python only) dictionary of credentials (apikey).
Json Response Detail  
data dict dict of response.
data.document list list of uploaded documents detail.
data.document[].created_at string created date and time.

Document List

Get the detailed list of the documents in your account.

Definition

GET https://app.docsumo.com/api/v1/eevee/apikey/documents/all/?offset=0&sort_by=created_date.desc&limit=1
GET https://app.docsumo.com/api/v1/eevee/apikey/documents/all/?offset=0&sort_by=created_date.desc&limit=1

Example

curl -X GET \
  'https://app.docsumo.com/api/v1/eevee/apikey/documents/all/?offset=0&sort_by=created_date.desc&limit=1' \
  -H 'X-API-KEY: <apikey>' \
docsumo = Docsumo(apikey=<apikey>)
docsumo.documents_list(offset=0, limit=20, status='', created_date_greater_than='', created_date_less_than='')

Response of API

{
    "data": {
        "documents": [
            {
                "converted_to_digital": true,
                "created_at_iso": "2020-07-23T04:15:26+00:00",
                "doc_id": "4c05f77f32d34104b4bd318692386af5",
                "doc_meta_data": "",
                "folder_id": "",
                "folder_name": "",
                "modified_at_iso": "2020-07-23T04:15:26+00:00",
                "preview_image": {
                    "height": 1061,
                    "url": "https://production-docsumo-documents.s3.ap-south-1.amazonaws.com/5c8e98d5e9e9b400093c2f8d/28173/4c05f77f32d34104b4bd318692386af5_thumbnail.jpg",
                    "width": 750
                },
                "review_url": "https://app.docsumo.com/review-document/4c05f77f32d34104b4bd318692386af5",
                "s3_filename": "5c8e98d5e9e9b400093c2f8d/28173/4c05f77f32d34104b4bd318692386af5.png",
                "status": "reviewing",
                "template_doc_id": "4c05f77f32d34104b4bd318692386af5",
                "time_dict": {
                    "processing_time": 35.476734,
                    "total_time": 36.104214
                },
                "title": "test.png",
                "type": "invoice",
                "type_title": "Invoice",
                "uploaded_by": {
                    "avatar_url": "",
                    "email": "bt@gmail.com",
                    "full_name": "Bikram Testing",
                    "user_id": "5c8e98d5e9e9b400093c2f8d"
                },
                "user_doc_id": ""
            }
        ],
        "limit": 1,
        "offset": 0,
        "total": 132
    },
    "error": "",
    "error_code": "",
    "message": "",
    "status": "success",
    "status_code": 200
}
Query Parameters  
offset number starting point of the documents list.
sort_by date sorting by date.
limit number total number of files to show.
Json Response Detail  
data dict dict of response.
data.documents list list of documents.
data.documents[].created_at_iso date date on which document was created.
data.documents[].doc_id string document id of the document.
data.documents[].doc_meta_data string metadata that is sent during document upload.
data.documents[].folder_id string folder id of the folder.
data.documents[].folder_name string name of the folder.
data.documents[].modified_at_iso date date on which the document was modified.
data.documents[].preview_image dict dict of document image property.
data.documents[].preview_image{}.height number height of the document image.
data.documents[].preview_image{}.url string url link of the document image.
data.documents[].preview_image{}.width number width of the document image.
data.documents[].review_url string url link of the reviewing document.
data.documents[].s3_filename string name of the document in s3 bucket.
data.documents[].status string status of the document.
data.documents[].template_doc_id string document id of the template document, same as doc_id if no template is found.
data.documents[].time_dict dict dict of the time required details.
data.documents[].time_dict{}.processing_time number time required for processing the document.
data.documents[].time_dict{}.total_time number total time required for the document.
data.documents[].title string name of the document.
data.documents[].type string internal documents type cant change.
data.documents[].type_title string title of the document type cant change.
data.documents[].uploaded_by dict dict of the uploader detail.
data.documents[].uploaded_by{}.avatar_url string url for the avatar of the uploader.
data.documents[].uploaded_by{}.email string email address of the uploader.
data.documents[].uploaded_by{}.full_name string full name of the uploader.
data.documents[].uploaded_by{}.user_id string user id of the uploader.
data.limit string total files to show.
data.offset string files shown from this offset value.
data.total number total number of documents.

Document Detail

Single document detail

Get all the upload detail (metadata) of a single document. In order to get the details, the document id doc_id of the document is required. This can be obtained from the documents list.

Definition

GET https://app.docsumo.com/api/v1/eevee/apikey/documents/detail/<doc_id>/
GET https://app.docsumo.com/api/v1/eevee/apikey/documents/detail/<doc_id>/

Example

curl -X GET \
  'https://app.docsumo.com/api/v1/eevee/apikey/documents/detail/<doc_id>/' \
  -H 'X-API-KEY: <apikey>' \
# We can get the single document details using python requests package.
import requests
headers = {"X-API-KEY": <apikey>}
requests.get("https://app.docsumo.com/api/v1/eevee/apikey/documents/detail/<doc_id>/",headers=headers)

Response of API

{
    "data": {
        "document": {
            "data": {
                "col1": "",
                "col2": "",
                "col3": ""
            },
            "doc_id": "6bcb42576ccc4679b00c23b8a976a6a9",
            "pages": [
                {
                    "id": 1,
                    "image": {
                        "height": 2200,
                        "url": "https://production-docsumo-documents.s3.amazonaws.com/5e9d33e7904eb9b51f19e89a/4701/6bcb42576ccc4679b00c23b8a976a6a9_image.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXW2HOGPLTCFC5S32%2F20200723%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20200723T061832Z&X-Amz-Expires=43200&X-Amz-SignedHeaders=host&X-Amz-Signature=cdd91f9dbb0a24eab915ab4f35e4d8c2cc3417e4d9a91e7630232be2cd00b268",
                        "width": 1700
                    }
                }
            ],
            "preview_image": {
                "height": 1100,
                "url": "https://production-docsumo-documents.s3.ap-south-1.amazonaws.com/5e9d33e7904eb9b51f19e89a/4701/6bcb42576ccc4679b00c23b8a976a6a9_thumbnail.jpg",
                "width": 850
            },
            "type": "invoice",
            "type_title": "Invoice",
            "uploaded_by": {
                "avatar_url": "",
                "email": "workingtest@email.com",
                "full_name": "Sunil Bista ",
                "user_id": "5e9d33e7904eb9b51f19e89a"
            },
            "user_id": "5e9d33e7904eb9b51f19e89a"
        }
    },
    "error": "",
    "error_code": "",
    "message": "",
    "status": "success",
    "status_code": 200
}
Query Parameters  
apikey string apikey can be found in account settings page.
doc_id string doc_id of the document whose details is required.
Json Response Detail  
data dict dict of response.
data.document dict dict of document data.
data.document.doc_id string document id of the document.
data.document.pages list list of pages in the document.
data.document.pages[].id string id of the document page.
data.document.pages[].image dict dict of image of the page.
data.document.pages[].image{}.height number height of the image of page.
data.document.pages[].image{}.url string url of image of page.
data.document.pages[].image{}.width number width of the image of page.
data.document.preview_image dict dict of the preview image detail of the document.
data.document.preview_image{}.height number height of image of the document.
data.document.preview_image{}.url string url of the image of the document.
data.document.preview_image{}.width number width of the image of the document.
data.document.type string internal document type. can’t change
data.document.type_title string title of the document type. can’t change
data.document.uploaded_by dict dict of the uploader detail.
data.document.uploaded_by{}.avatar_url string url for the avatar of the uploader.
data.document.uploaded_by{}.email string email address of the uploader.
data.document.uploaded_by{}.full_name string full name of the uploader.
data.document.uploaded_by{}.user_id string user id of the uploader.
data.userid string internal user id of user.

Extract data

Obtain the extracted data from the document in JSON format. The key-value or table data extracted from the document either manually or by existing models can be obtained. In order to get the details, the document id doc_id of the document is required. This can be obtained from the documents list.

Definition

GET https://app.docsumo.com/api/v1/eevee/apikey/data/<doc_id>/
GET https://app.docsumo.com/api/v1/eevee/apikey/data/<doc_id>/

Example

curl -X GET \
  'https://app.docsumo.com/api/v1/eevee/apikey/data/<doc_id>/' \
  -H 'X-API-KEY: <apikey>' \
docsumo = Docsumo(apikey=<apikey>)
docsumo.extracted_data(<doc_id>)

Response of API

{
    "data": {
        "Basic Information": {
            "Invoice Number": {
                "model": "template",
                "orig_value": "AEPL/18-19/027",
                "position": [
                    993,
                    192,
                    1179,
                    215
                ],
                "value": "AEPL/18-19/027"
            },
            "Issue Date": {
                "model": "template",
                "orig_value": "DT.31.08.2018",
                "position": [
                    1187,
                    192,
                    1352,
                    215
                ],
                "value": "31/08/2018"
            }
        },
        "Buyer Detail": {
            "Address": {
                "model": "template",
                "orig_value": "SUITE # 219, EDISON,",
                "position": [
                    205,
                    469,
                    468,
                    499
                ],
                "value": "SUITE # 219, EDISON"
            },
            "Name": {
                "model": "template",
                "orig_value": "SLT IMPORTS INC",
                "position": [
                    203,
                    440,
                    415,
                    462
                ],
                "value": "SLT IMPORTS INC"
            }
        },
        "Line Items": [
            {
                "Description": {
                    "orig_value": "",
                    "position": [],
                    "value": ""
                },
                "Quantity": {
                    "orig_value": "",
                    "position": [],
                    "value": ""
                },
                "Subtotal Line": {
                    "orig_value": "",
                    "position": [],
                    "value": ""
                },
                "Tax Rate Line": {
                    "orig_value": "",
                    "position": [],
                    "value": ""
                },
                "Unit Price": {
                    "orig_value": "",
                    "position": [],
                    "value": ""
                }
            },
            {
                "Description": {
                    "orig_value": "KHAZANA SONA MASOORI RICE",
                    "position": [
                        447,
                        843,
                        844,
                        866
                    ],
                    "value": "KHAZANA SONA MASOORI RICE"
                },
                "Quantity": {
                    "orig_value": 10401.0,
                    "position": [
                        1133,
                        840,
                        1202,
                        867
                    ],
                    "value": 10401.0
                },
                "Subtotal Line": {
                    "orig_value": 14435.3,
                    "position": [
                        1475,
                        845,
                        1576,
                        866
                    ],
                    "value": 14435.3
                },
                "Tax Rate Line": {
                    "orig_value": "",
                    "position": [],
                    "value": ""
                },
                "Unit Price": {
                    "orig_value": "",
                    "position": [],
                    "value": ""
                }
            }
        ],
        "Seller Detail": {
            "Address": {
                "model": "template",
                "orig_value": "2A, GRANT LANE, 1ST FLOOR, KOLKATA 700 012 BRANCH : D-374, TTC INDUSTRIAL AREA, MIDC, TURBHE, NAVI MUMBAI - 400703 A/C : RADHE AGRO INDUSTRIES INDIA PVT. LTD. RAICHUR - 584101",
                "position": [
                    198,
                    222,
                    793,
                    401
                ],
                "value": "2A, GRANT LANE, 1ST FLOOR, KOLKATA 700 012 BRANCH : D-374, TTC INDUSTRIAL AREA, MIDC, TURBHE, NAVI MUMBAI - 400703 A/C : RADHE AGRO INDUSTRIES INDIA PVT. LTD. RAICHUR - 584101"
            },
            "Name": {
                "model": "template",
                "orig_value": "ABHAYA EXPORTS (PVT) LTD.",
                "position": [
                    201,
                    190,
                    570,
                    220
                ],
                "value": "ABHAYA EXPORTS (PVT) LTD"
            }
        },
        "Session 06": {
            "Key 01": {
                "model": "",
                "orig_value": "",
                "position": "",
                "value": ""
            }
        },
        "Session 07": [
            {
                "Key 01": {
                    "orig_value": "",
                    "position": "",
                    "value": ""
                },
                "Key 02": {
                    "orig_value": "",
                    "position": "",
                    "value": ""
                }
            }
        ]
    },
    "error": "",
    "error_code": "",
    "message": "",
    "meta_data": {
        "doc_meta_data": "",
        "status": "reviewing",
        "title": "2758.jpg",
        "user_doc_id": null,
        "user_id": "5e9d33e7904eb9b51f19e89a"
    },
    "status": "success",
    "status_code": 200
}
Query Parameters  
apikey string apikey can be found in account settings page.
doc_id string doc_id of the document whose details is required.
Json Response Detail  
data dict dict of response containing the annotation details for each keys.
error string error message.
error_code string error code.
message string details on the error message.
status string document status.
status_code string document status code.
meta_data dict dict of the document metadata.
meta_data{}.doc_meta_data string metadata that is sent during document upload.
meta_data{}.status string status of the document.
meta_data{}.title string name of the document.
meta_data{}.user_doc_id string internal user document id.
meta_data{}.user_id string internal user id of user.

Document Summary

Get the summary of the document types along with the count and status of the documents uploaded in each of the document types.

Definition

GET https://app.docsumo.com/api/v1/mew/apikey/documents/summary/
GET https://app.docsumo.com/api/v1/mew/apikey/documents/summary/

Example

curl -X GET \
  'https://app.docsumo.com/api/v1/mew/apikey/documents/summary/' \
  -H 'X-API-KEY: <apikey>' \
docsumo = Docsumo(apikey=<apikey>)
docsumo.documents_summary()

Response of API

{
    "data": {
        "document": [
            {
                "can_upload": true,
                "default": true,
                "doc_counts": {
                    "all": 5,
                    "processed": 1,
                    "reviewing": 4
                },
                "doc_type": "invoice",
                "id": 1,
                "title": "Invoice",
                "upload_email": "invoice_62c174ee87d1@docs.docsumo.com",
                "user_id": "5e9d33e7904eb9b51f19e89a"
            },
            {
                "can_upload": true,
                "default": true,
                "doc_counts": {
                    "all": 1,
                    "processed": 0,
                    "reviewing": 1
                },
                "doc_type": "passport_front",
                "id": 3,
                "title": "Passport Front",
                "upload_email": "passportfront_f25b3c105b29@docs.docsumo.com",
                "user_id": "5e9d33e7904eb9b51f19e89a"
            }

        ]
    },
    "error": "",
    "error_code": "",
    "message": "",
    "status": "success",
    "status_code": 200
}
Query Parameters  
apikey string apikey can be found in account settings page.
Json Response Detail  
data dict dict of response.
data.document list list of document type data.
data.document[i].can_upload list boolean value if user can upload or not.
data.document[i].default list default value for the document.
data.document[i].doc_counts dict dict of document count.
data.document[i].doc_counts{}.all number number of total document for this document type.
data.document[i].doc_counts{}.processed number number of processed document for this document type.
data.document[i].doc_counts{}.reviewing number number of reviewing document for this document type.
data.document[i].doc_type string type of document.
data.document[i].id number id of the document type.
data.document[i].title string title of the document type.
data.document[i].upload_email email email address where documents can be emailed to get processed under this document type.
data.document[i].user_id user_id interal user id of the user.

Delete Document

Delete the document using the document id Document Id doc_id. This can be obtained from the documents list.

Definition

GET https://app.docsumo.com/api/v1/eevee/apikey/delete/<doc_id>/
GET https://app.docsumo.com/api/v1/eevee/apikey/delete/<doc_id>/

Example

curl -X GET \
  'https://app.docsumo.com/api/v1/eevee/apikey/delete/<doc_id>/' \
  -H 'X-API-KEY: <apikey>' \
docsumo = Docsumo(apikey=<apikey>)
docsumo.delete_documents(<doc_id>)
Query Parameters  
apikey string apikey can be found in account settings page.
doc_id string doc_id of the document whose details is required.
Json Response Detail  
error string error message.
error_code string error code.
message string details on the error message.
status string document status.
status_code string document status code.

Response of API

{
    "error": "",
    "error_code": "",
    "message": "",
    "status": "success",
    "status_code": 200
}
Docsumo Financial APIs

Introduction

Docsumo allows users to extract information from a variety of standard Identification Documents like Passports, Voter IDs, PAN cards, Driving License, Cerificate of Registration and many more.

Allowed file extension

Authentication

Same as Docsumo Web API

Errors

Status Code Error Code Detail
400 WRONG_DOCUMENT_TYPE No text in image or image is too blur to get text.
400 BAD_IMAGE file has bad lighting or has bright spot due to which required data could not be extracted.
400 BLUR_IMAGE image blur and text could not be extracted with high confidence.
400 IMAGE_MISSING_ON_REQUEST file is missing on form body.
400 FILE_TYPE_NOT_SUPPORTED file except png, jpg, jpeg, tiff, pdf.
400 WRONG_SIDE If document has two side and on params wrong side was send.
400 IO_FILE could not open the file, file is corrupted.
400 B_W_IMAGE photocopy of document.
400 SCANNED_IMAGE scan or color photocopy of document.
400 DOCUMENT_CROPPED document is cropped from any side.
400 PHOTO_OF_PHOTO screenshot of pan or photo of photo.
401 UNAUTHORIZED unauthorized access.
401 TOKEN_EXPIRED token used in the request has expired.
402 NO_ENOUGH_CREDIT the allocated credit has expired.
429 TOO_MANY_REQUEST the number of request exceeds the server capacity.

Indian KYC Documents

These API helps you extract the relevant key-values from the Indian Identification Documents uploaded by the users.

Fraud checks

Checks to determine if the document uploaded is Monochrome (Black and White), Scanned image or Photo of photo has to be carried out. Usually the images taken from secondary sources like scans, print outs or other documents are fraudulent. If ?fraud_check=true then the documents are checked for the following Frauds.
- B_W_IMAGE
- SCANNED_IMAGE
- DOCUMENT_CROPPED
- PHOTO_OF_PHOTO

Otherwise, these checks are skipped and all the fields that were extracted is returned.

Pan Extract

Extra information from Indian PAN Card documents.

Definition

POST https://panapi.docsumo.com/api/v1/pan/extract/?save_data=false&fraud_check=true
POST https://panapi.docsumo.com/api/v1/pan/extract/?save_data=false&fraud_check=true

Example Request

curl --location --request POST 'https://panapi.docsumo.com/api/v1/pan/extract/?save_data=false&fraud_check=true' \
--header 'X-API-KEY: {{apikey}}' \
--form 'files=@/path/to/file'
import requests

url = "https://panapi.docsumo.com/api/v1/pan/extract/?save_data=false&fraud_check=true"

payload = {}
files = [
  ('files', open(<file_path>,'rb'))
]
headers = {
  'X-API-KEY': <apikey>,
}

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

print(response.json())

Example Response

{
    "data": {
        "dob": {
            "conf": 0.9910000085830688,
            "position": [
                25,
                184,
                133,
                208
            ],
            "review_required": false,
            "value": "23/11/1974"
        },
        "father_name": {
            "conf": 0.9918181896209717,
            "position": [
                25,
                129,
                183,
                151
            ],
            "review_required": false,
            "value": "Suresh Gupta"
        },
        "name": {
            "conf": 0.9880000054836273,
            "position": [
                19,
                89,
                166,
                107
            ],
            "review_required": false,
            "value": "Rahul Gupta"
        },
        "pan": {
            "conf": 0.9920000076293946,
            "position": [
                22,
                235,
                155,
                257
            ],
            "review_required": false,
            "value": "ABCDE1234F"
        }
    },
    "message": "",
    "meta_data": {
        "id": "34de761fc9e54d72bc5c9a363b12b163",
        "review_required": false,
        "rotation_angle": 0,
        "title": "a4116bf3aeac45fa97e7eefb7e45718d.jpg"
    },
    "status_code": 200
}
Query Parameters  
save_data boolean save data true or false
fraud_check boolean check fraud true or false
Json Response Detail  
data dict dict of response.
data.{}.{key} string keys like number, name , dob
data.{}.{value}.conf float OCR confidence of text extracted.
data.{}.{value}.review_required boolean True if human review is required due to low OCR confidence or format doesnt match.
data.{}.{value}.position array position of extracted text.
data.{}.{value}.value string extracted text.
meta_data dict dict of metadata of the document.
meta_data{}.id string id of the document.
meta_data{}.review_required boolean status of review required for the document.
meta_data{}.title string name of the document.

Passport Extract

Extract information from Indian Passports.

Definition

POST https://passportapi.docsumo.com/api/v1/passport/extract/?side=back&save_data=false&fraud_check=true
POST https://passportapi.docsumo.com/api/v1/passport/extract/?side=back&save_data=false&fraud_check=true

Example Request

curl --location --request POST 'https://passportapi.docsumo.com/api/v1/passport/extract/?side=back&save_data=false&fraud_check=false' \
--header 'X-API-KEY: {{apikey}}' \
--form 'files=@/path/to/file'
import requests

url = "https://passportapi.docsumo.com/api/v1/passport/extract/?side=back&save_data=false&fraud_check=false"

payload = {}
files = [
  ('files', open(<file_path>,'rb'))
]
headers = {
  'X-API-KEY': '<apikey>',
}

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

print(response.json())

Example Response

{
    "data": {
        "birth_place": {
            "confidence": 0.9683333337306976,
            "position": [
                349,
                277,
                628,
                304
            ],
            "review_required": false,
            "value": "MANGALORE KARNATAKA"
        },
        "dob": {
            "confidence": 0.9880000054836273,
            "position": [
                585,
                232,
                730,
                258
            ],
            "review_required": false,
            "value": "01/11/1973"
        },
        "expiry_date": {
            "confidence": 0.9920000076293946,
            "position": [
                580,
                373,
                724,
                399
            ],
            "review_required": false,
            "value": "01/05/2016"
        },
        "gender": {
            "confidence": 0.949999988079071,
            "position": [
                523,
                234,
                525,
                253
            ],
            "review_required": false,
            "value": "F"
        },
        "given_name": {
            "confidence": 0.9944444497426351,
            "position": [
                299,
                185,
                407,
                204
            ],
            "review_required": false,
            "value": "AISHWARYA"
        },
        "issue_date": {
            "confidence": 0.9920000076293946,
            "position": [
                349,
                368,
                491,
                392
            ],
            "review_required": false,
            "value": "02/05/2006"
        },
        "issue_place": {
            "confidence": 0.9950000047683716,
            "position": [
                348,
                324,
                437,
                345
            ],
            "review_required": false,
            "value": "MUMBAI"
        },
        "nationality": {
            "confidence": 0.996666669845581,
            "position": [
                320,
                236,
                375,
                253
            ],
            "review_required": false,
            "value": "INDIAN"
        },
        "passport_no": {
            "confidence": 0.9437500163912773,
            "position": [
                586,
                116,
                731,
                139
            ],
            "review_required": false,
            "value": "F7802033"
        },
        "surname": {
            "confidence": 0.9900000095367432,
            "position": [
                302,
                144,
                337,
                160
            ],
            "review_required": false,
            "value": "RAI"
        }
    },
    "message": "",
    "meta_data": {
        "id": "c075f7147c82447eade817a51f5460d2",
        "review_required": false,
        "rotation_angle": -2.2457425658950716,
        "title": "582d99f8c8f94bf78777143c1e992171.jpg"
    },
    "status_code": 200
}
Query Parameters  
side string front or back side.
save_data boolean save data true or false.
fraud_check boolean check fraud true or false.
Json Response Detail  
data dict dict of response.
meta_data dict dict of metadata of the document.
meta_data{}.id string id of the document.
meta_data{}.review_required boolean status of review required for document.
meta_data{}.title string name of the document.

Aadhar Extract

Extracts information from Indian Aadhaar Cards.

Definition

POST https://nationalapi.docsumo.com/api/v1/national/extract/?side=back&save_data=false&return_redacted=false&fraud_check=true
POST https://nationalapi.docsumo.com/api/v1/national/extract/?side=back&save_data=false&return_redacted=false&fraud_check=true

Example Request

curl --location --request POST 'https://nationalapi.docsumo.com/api/v1/national/extract/?side=back&save_data=false&return_redacted=false&fraud_check=true' \
--header 'X-API-KEY: {{apikey}}' \
--form 'files=@/path/to/file'
import requests

url = "https://nationalapi.docsumo.com/api/v1/national/extract/?side=back&save_data=false&return_redacted=false&fraud_check=true"

payload = {}
files = [
  ('files', open(<file_path>,'rb'))
]
headers = {
  'X-API-KEY': <apikey>,
}

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

print(response.json())

Example Response

{
    "data": {
        "address": {
            "conf": 0.9,
            "position": [
                1193,
                365,
                2092,
                734
            ],
            "review_required": false,
            "value": "14-2-89 Govt High School Back line Khammam Urban Mandal Ballepalle Khammam"
        },
        "father_name": {
            "conf": 0.9,
            "position": [
                1193,
                355,
                2092,
                714
            ],
            "review_required": false,
            "value": "Jaripiti Srinivas"
        },
        "no": {
            "conf": 0.99,
            "position": [
                898,
                1021,
                1578,
                1111
            ],
            "review_required": false,
            "value": "444422223333"
        },
        "pin": {
            "conf": 1,
            "position": [
                412,
                645,
                634,
                718
            ],
            "review_required": false,
            "value": "507002"
        },
        "state": {
            "conf": 1,
            "position": [
                412,
                645,
                634,
                718
            ],
            "review_required": false,
            "value": "Andhra Pradesh"
        }
    },
    "message": "",
    "meta_data": {
        "id": "7640bccd993d4a438b8883e94f9f6f01",
        "review_required": false,
        "rotation_angle": 0.4,
        "title": "a141d50039d14a3f91424798c3b3829d.jpg"
    },
    "status_code": 200
}
Query Parameters  
side string front or back side.
save_data boolean save data true or false.
return_redacted boolean return image with aadhar number redacted as base64.
fraud_check boolean check fraud true or false.
Json Response Detail  
data dict dict of response.
meta_data dict dict of metadata of the document.
meta_data{}.id string id of the document.
meta_data{}.review_required boolean status of review required for document.
meta_data{}.title string name of the document.

Driving License Extract

Extract information from Indian Driving License.

Definition

POST https://dlrcapi.docsumo.com/api/v1/dl/extract/?save_data=false&fraud_check=true
POST https://dlrcapi.docsumo.com/api/v1/dl/extract/?save_data=false&fraud_check=true

Example Request

curl -X POST 'https://dlrcapi.docsumo.com/api/v1/dl/extract/?save_data=false&fraud_check=true' \
--header 'X-API-KEY: <apikey>' \
--form 'files=@/path/to/file'
import requests

url = "https://dlrcapi.docsumo.com/api/v1/dl/extract/?save_data=false&fraud_check=true"

payload = {}
files = [
  ('files', open(<file_path>,'rb'))
]
headers = {
  'X-API-KEY': <apikey>,
}

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

print(response.json())

Example Response

{
    "data": {
        "address": {
            "confidence": 0.97,
            "position": [
                129,
                111,
                268,
                153
            ],
            "review_required": false,
            "value": "HNO-178 A2/B MIG FLATS PASCHIM VIHAR, DELHI 110063"
        },
        "category_of_veh": {
            "confidence": 0.99,
            "position": [],
            "review_required": true,
            "value": "LMV"
        },
        "date_of_validity": {
            "confidence": 0,
            "position": [],
            "review_required": false,
            "value": "2026/2/8"
        },
        "dl_no": {
            "confidence": 0.98,
            "position": [
                130,
                59,
                254,
                75
            ],
            "review_required": false,
            "value": "DL0420110149646"
        },
        "dob": {
            "confidence": 0.99,
            "position": [
                180,
                98,
                256,
                112
            ],
            "review_required": false,
            "value": "1976/2/9"
        },
        "name": {
            "confidence": 0.99,
            "position": [
                21,
                72,
                62,
                100
            ],
            "review_required": false,
            "value": "ANURAG BREJA"
        },
        "pin": {
            "confidence": 0.97,
            "position": [],
            "review_required": false,
            "value": "110063"
        },
        "rto": {
            "confidence": 0.98,
            "position": [],
            "review_required": false,
            "value": "Delhi"
        }
    },
    "message": "",
    "meta_data": {
        "id": "0e839d37e805422f988f6e042c29e6c9",
        "rotation_angle": 0,
        "title": "38e7f9f86f0e417a878423b8b4179727.jpg"
    },
    "status_code": 200
}
Query Parameters  
save_data boolean save data true or false.
fraud_check boolean check fraud true or false.
Json Response Detail  
data dict dict of response.
meta_data dict dict of metadata of the document.
meta_data{}.id string id of the document.
meta_data{}.rotation_angle number angle of rotation of driving license.
meta_data{}.title string name of the document.

Voter Id

Extract information from Indian Voter IDs.

Definition

POST https://voteridapi.docsumo.com/api/v1/voterid/extract/?side=front&save_data=false&fraud_check=true
POST https://voteridapi.docsumo.com/api/v1/voterid/extract/?side=front&save_data=false&fraud_check=true

Example Request

curl -X POST 'https://voteridapi.docsumo.com/api/v1/voterid/extract/?side=back&save_data=false&fraud_check=true' \
--header 'X-API-KEY:  <apikey>' \
--form 'files=@/path/to/file'
import requests

url = "https://voteridapi.docsumo.com/api/v1/voterid/extract/?side=back&save_data=false&fraud_check=true"

payload = {}
files = [
  ('files', open(<file_path>,'rb'))
]
headers = {
  'X-API-KEY': <apikey>,
}

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

print(response.json())

Example Response

{
    "data": {
        "father_name": {
            "conf": 0.9187500104308128,
            "position": [
                372,
                840,
                489,
                871
            ],
            "review_required": false,
            "value": "Leonardo Caprio Sr"
        },
        "name": {
            "conf": 0.9891304425571277,
            "position": [
                244,
                693,
                673,
                739
            ],
            "review_required": false,
            "value": "Leonardo Caprio Jr"
        },
        "voter_id": {
            "conf": 0.9790000140666961,
            "position": [
                532,
                136,
                724,
                176
            ],
            "review_required": false,
            "value": "AXP1471000"
        }
    },
    "message": "",
    "meta_data": {
        "id": "a6b51234818e47fd990f42e1ab2da37e",
        "review_required": false,
        "rotation_angle": 1.16,
        "title": "img.jpg"
    },
    "status_code": 200
}
Query Parameters  
side string front or back side.
save_data boolean save data true or false.
fraud_check boolean check fraud true or false.
Json Response Detail  
data dict dict of response.
meta_data dict dict of metadata of the document.
meta_data{}.id string id of the document.
meta_data{}.review_required boolean status of review required for document.
meta_data{}.rotation_angle number angle of roation of voter id.
meta_data{}.title string name of the document.

Bank Statments - User Detail

Extract user account data from Indian digital bank statment PDFs.

Definition

POST https://bsuserdataapi.docsumo.com/api/v1/userinfo/
POST https://bsuserdataapi.docsumo.com/api/v1/userinfo/

Example Request

curl -X POST 'https://bsuserdataapi.docsumo.com/api/v1/userinfo/' \
--header 'X-API-KEY:  <apikey>' \
--form 'file=@/path/to/file' \
--form 'password=' \
--form 'user_bank_name=United Bank, India'
import requests

url = "https://bsuserdataapi.docsumo.com/api/v1/userinfo/"

payload = {'password': '',
'user_bank_name': 'United Bank, India'}
files = [
  ('file', open(<file_path>,'rb'))
]
headers = {
  'X-API-KEY': <apikey>,
}

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

print(response.json())

Example Response

{
  "data": {
    "account_number": {
      "conf": 1,
      "position": [],
      "review_required": "false",
      "value": "536502xxxxx015438"
    },
    "account_type": {
      "conf": 1,
      "position": [],
      "review_required": "false",
      "value": "Savings Account"
    },
    "address": {
      "conf": 1,
      "position": [],
      "review_required": "false",
      "value": "500 D/211 XXXX XXXXX NEAR XXXX ABC COLONY LKO"
    },
    "bank_name": {
      "conf": 1,
      "position": [],
      "review_required": "false",
      "value": "Union Bank of India, India"
    },
    "email": {
      "conf": 1,
      "position": [],
      "review_required": "false",
      "value": "xxxx@gmail.com"
    },
    "landline": {
      "conf": 1,
      "position": [],
      "review_required": "false",
      "value": ""
    },
    "mobile": {
      "conf": 1,
      "position": [],
      "review_required": "false",
      "value": "9186xxxxx"
    },
    "name": {
      "conf": 1,
      "position": [],
      "review_required": "false",
      "value": "GOPAL SINGH"
    },
    "pan": {
      "conf": 1,
      "position": [],
      "review_required": "false",
      "value": ""
    }
  },
  "error": "",
  "message": "",
  "meta_data": {
    "review_required": false
  },
  "status": "success",
  "status_code": 200
}

Error Code

Error Condition
E_DATE_RANGE The user does not have transactions for a large range of the days in the Bank statement shared. This can also be triggered when the user submits without uploading a bank statement.
E_NOT_ACCEPTED Insufficient data to generate a report. Often triggered if there are no transactions for a whole month or months.
E_STATEMENT_UNSUPPORTED_FORMAT Scanned image and not a PDF, MPassbook, etc.
E_MULTIPLE_ERRORS Aggregation of any errors in list.
E_FILE_EDITOR_BLACKLISTED Flag for whether a “blacklisted” editing tool was used on the PDF(metadata).
E_FILE_NOT_STATEMENT The uploaded file is not a valid bank statement. The uploaded file is a tax invoice, payslip, or some other invalid document.
E_FILE_NO_PASSWORD Statement password not provided.
E_OTHER Timed out due to inactivity or there were one or more fatal errors.
E_STATEMENT_WRONG_INSTITUTION The user uploaded the statement for the incorrect institution (chose ABC bank but uploaded statement for XYZ bank).
E_AMOUNT_BALANCE_MISMATCH Balances do not reconcile with transactions.
E_FILE_IO Damaged PDF or unable to open.
E_INCOMPLETE_MONTHS Flag for whether a full month is not reflected on the bank statement.
E_STATEMENT_NO_TRANSACTIONS There are no transactions in this statement. Please upload a valid bank statement.
E_STATEMENT_TOO_MANY_PAGES Cannot process files with more than 1000 pages.
Form Arguments  
file string path of the bank statement file.
password string password of the user.
user_bank_name string name of the bank.
Json Response Detail  
data dict dict of response.
meta_data dict dict of metadata of the document
meta_data{}.review_required boolean status of review required for document.

Bank Statments - Digital

Extract transaction data from Indian digital bank statement PDFs.

Definition

POST https://bankstatementapi.docsumo.com/api/v1/parse/pdf/?xml=true
POST https://bankstatementapi.docsumo.com/api/v1/parse/pdf/?xml=true

Example Request

curl --location --request POST 'https://bankstatementapi.docsumo.com/api/v1/parse/pdf/?xml=true' \
--header 'X-API-KEY: {{apikey}}' \
--form 'file_{id}=@/path/to/file' \
--form 'password_{id}=' \
--form 'doc_uploaded_date=2019-12-02' \
--form 'user_bank_name='
import requests

url = "https://bankstatementapi.docsumo.com/api/v1/parse/pdf/?xml=true"

payload = {'password_{id}': '',
'doc_uploaded_date': '2019-12-02',
'user_bank_name': ''}
files = [
  ('file_{id}', open(<file_path>,'rb'))
]
headers = {
  'X-API-KEY': <apikey>,
}

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

print(response.json())

Example Response

{
  "analysis": {
    "MonthlyAnalysis": {
      "2019-07": {
        "avgDailyBalance": "730.42",
        "balAvgOf6Dates": "165.27",
        "balanceOn10th": "155.10",
        "balanceOn15th": "155.10",
        "balanceOn1st": "203.10",
        "balanceOn20th": "155.10",
        "balanceOn25th": "155.10",
        "balanceOn30th": "3325.10",
        "balanceOn5th": "168.10",
      },
      "2019-08": {
        "avgDailyBalance": "353.03",
        "balAvgOf6Dates": "577.03",
        "balanceOn10th": "0.00",
        "balanceOn15th": "0.00",
        "balanceOn1st": "3325.10",
        "balanceOn20th": "0.00",
        "balanceOn25th": "0.00",
        "balanceOn30th": "505.00",
        "balanceOn5th": "137.10",
      },
      "2019-09": {
        "avgDailyBalance": "571.32",
        "balAvgOf6Dates": "862.72",
        "balanceOn10th": "506.00",
        "balanceOn15th": "53.10",
        "balanceOn1st": "4005.00",
        "balanceOn20th": "53.10",
        "balanceOn25th": "53.10",
        "balanceOn30th": "58.10",
        "balanceOn5th": "506.00",
      }
    },
    "Summary": {
      "avgBalanceOf6Dates": "535.01",
      "avgDailyBalance": "551.38",
      "avgMonthlyExpense": "3618.33",
      "avgMonthlyIncome": "3570.00",
      "avgMonthlySurplus": "-48.33",
      }
  },
  "error": "",
  "error_code": "",
  "message": "",
  "meta_data": {
    "accounts_data": {
      "account_number": "",
      "account_type": "SAVINGS-BASIC SAVINGS",
      "address": "",
      "bank_name": "Axis Bank, India",
      "closing_balance": "",
      "email": "",
      "landline": "",
      "mobile": "",
      "name": "",
      "opening_balance": "203.10",
      "pan": ""
    },
    "date_count": 26,
    "method": "box",
    "order": 1,
    "title": "axis_bank.pdf",
    "total_time_taken (in second)": 30,
    "validation_info_balance": {
      "extracted_count_balance": 26,
      "extracted_target_ratio_balance": 0.93,
      "target_count_balance": 28
    },
    "validation_info_date": {
      "extracted_count_date": 26,
      "extracted_target_ratio_date": 1,
      "target_count_date": 26
    }
  },
  "status": "success",
  "status_code": 200
}

Error Code

Error Condition
E_DATE_RANGE The user does not have transactions for a large range of the days in the Bank statement shared. This can also be triggered when the user submits without uploading a bank statement.
E_NOT_ACCEPTED Insufficient data to generate a report. Often triggered if there are no transactions for a whole month or months.
E_STATEMENT_UNSUPPORTED_FORMAT Scanned image and not a PDF, MPassbook, etc.
E_MULTIPLE_ERRORS Aggregation of any errors in list.
E_FILE_EDITOR_BLACKLISTED Flag for whether a “blacklisted” editing tool was used on the PDF(metadata).
E_FILE_NOT_STATEMENT The uploaded file is not a valid bank statement. The uploaded file is a tax invoice, payslip, or some other invalid document.
E_FILE_NO_PASSWORD Statement password not provided.
E_OTHER Timed out due to inactivity or there were one or more fatal errors.
E_STATEMENT_WRONG_INSTITUTION The user uploaded the statement for the incorrect institution (chose ABC bank but uploaded statement for XYZ bank).
E_AMOUNT_BALANCE_MISMATCH Balances do not reconcile with transactions.
E_FILE_IO Damaged PDF or unable to open.
E_INCOMPLETE_MONTHS Flag for whether a full month is not reflected on the bank statement.
E_STATEMENT_NO_TRANSACTIONS There are no transactions in this statement. Please upload a valid bank statement.
E_STATEMENT_TOO_MANY_PAGES Cannot process files with more than 1000 pages.
Query Parameter  
xml boolean get detail in xml true or false.
Form Arguments  
file_{id} string path of the bank statement file.
password_{id} string password of the file.
doc_uploaded_date date upload date of the document.
user_bank_name string name of the bank of the user.
Json Response Detail  
analysis dict dict of response.
meta_data dict dict of metadata of the document.
Json Response Sections Breakdown  
customerInfo This section contains the information on customer.
statementDetails Information about the valid statement files are shown in this section.
summaryInfo Summary of several useful quantitative attributes over the total time period of the statement.
monthwiseDetails Summary of several useful quantitative attributes of the statement on a monthly basis.
accountDetails This section contains details of accounts, such as name of the bank, account number and current balance.
bouncedPenalXns This section lists all bounced/rejected and penal transactions.
salaryPensionCredits This section lists all unambiguously identified Salary/Pension transactions.
highValueXns High value debit and credit transactions.
recurring.debts This section lists all transactions related to common recurring expenses. The criterion for considering a category to be recurring is that expense in the category must occur in 4 or more months.
recurring.uncategorized.expenses This section lists all recurring uncategorized transactions. Two transactions are grouped based on the transaction narration. The criterion for considering a group to be recurring is same as for recurring.debts.
recurring.amount.date Attempts to identify recurring monthly payments of fixed amounts, puts each such sequence of transactions in a group, and lists all such groups.
BouncedEmiXns It should contain date, chqNo, narration, amount, category, reason. Reason field should state whether the emi bounce is technical or non-technical.
xns This section lists all the transactions with amount.

Bank Statments - Images

Extract transaction data from Indian scan or images bank statement PDFs.

Definition

POST https://bankstatementimagesapi.docsumo.com/api/v1/parse/images/?xml=true&docsumo_upload=false
POST https://bankstatementimagesapi.docsumo.com/api/v1/parse/images/?xml=true&docsumo_upload=false

Example Request

curl --location --request POST 'https://bankstatementimagesapi.docsumo.com/api/v1/parse/images/?xml=true&docsumo_upload=false' \
--header 'X-API-KEY: {{apikey}}' \
--form 'file_{id}=@/path/to/file' \
--form 'password_{id}=' \
--form 'doc_uploaded_date=2019-12-02' \
--form 'user_bank_name='
import requests

url = "https://bankstatementimagesapi.docsumo.com/api/v1/parse/images/?xml=true&docsumo_upload=false"

payload = {'password_{id}': '',
'doc_uploaded_date': '2019-12-02',
'user_bank_name': ''}
files = [
  ('file_{id}', open(<file_path>,'rb'))
]
headers = {
  'X-API-KEY': <apikey>,
}

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

print(response.json())

Example Response

{
  "analysis": {
    "MonthlyAnalysis": {
      "2019-07": {
        "avgDailyBalance": "730.42",
        "balAvgOf6Dates": "165.27",
        "balanceOn10th": "155.10",
        "balanceOn15th": "155.10",
        "balanceOn1st": "203.10",
        "balanceOn20th": "155.10",
        "balanceOn25th": "155.10",
        "balanceOn30th": "3325.10",
        "balanceOn5th": "168.10",
      },
      "2019-08": {
        "avgDailyBalance": "353.03",
        "balAvgOf6Dates": "577.03",
        "balanceOn10th": "0.00",
        "balanceOn15th": "0.00",
        "balanceOn1st": "3325.10",
        "balanceOn20th": "0.00",
        "balanceOn25th": "0.00",
        "balanceOn30th": "505.00",
        "balanceOn5th": "137.10",
      },
      "2019-09": {
        "avgDailyBalance": "571.32",
        "balAvgOf6Dates": "862.72",
        "balanceOn10th": "506.00",
        "balanceOn15th": "53.10",
        "balanceOn1st": "4005.00",
        "balanceOn20th": "53.10",
        "balanceOn25th": "53.10",
        "balanceOn30th": "58.10",
        "balanceOn5th": "506.00",
      }
    },
    "Summary": {
      "avgBalanceOf6Dates": "535.01",
      "avgDailyBalance": "551.38",
      "avgMonthlyExpense": "3618.33",
      "avgMonthlyIncome": "3570.00",
      "avgMonthlySurplus": "-48.33"
      }
  },
  "error": "",
  "error_code": "",
  "message": "",
  "meta_data": {
    "accounts_data": {
      "account_number": "",
      "account_type": "SAVINGS-BASIC SAVINGS",
      "address": "",
      "bank_name": "Axis Bank, India",
      "closing_balance": "",
      "email": "",
      "landline": "",
      "mobile": "",
      "name": "",
      "opening_balance": "203.10",
      "pan": ""
    },
    "date_count": 26,
    "method": "box",
    "order": 1,
    "title": "axis_bank.pdf",
    "total_time_taken (in second)": 30,
    "validation_info_balance": {
      "extracted_count_balance": 26,
      "extracted_target_ratio_balance": 0.93,
      "target_count_balance": 28
    },
    "validation_info_date": {
      "extracted_count_date": 26,
      "extracted_target_ratio_date": 1,
      "target_count_date": 26
    }
  },
  "status": "success",
  "status_code": 200
}

Error Code

Error Condition
E_DATE_RANGE The user does not have transactions for a large range of the days in the Bank statement shared. This can also be triggered when the user submits without uploading a bank statement.
E_NOT_ACCEPTED Insufficient data to generate a report. Often triggered if there are no transactions for a whole month or months.
E_STATEMENT_UNSUPPORTED_FORMAT Scanned image and not a PDF, MPassbook, etc.
E_MULTIPLE_ERRORS Aggregation of any errors in list.
E_FILE_EDITOR_BLACKLISTED Flag for whether a “blacklisted” editing tool was used on the PDF(metadata).
E_FILE_NOT_STATEMENT The uploaded file is not a valid bank statement. The uploaded file is a tax invoice, payslip, or some other invalid document.
E_FILE_NO_PASSWORD Statement password not provided.
E_OTHER Timed out due to inactivity or there were one or more fatal errors.
E_STATEMENT_WRONG_INSTITUTION The user uploaded the statement for the incorrect institution (chose ABC bank but uploaded statement for XYZ bank).
E_AMOUNT_BALANCE_MISMATCH Balances do not reconcile with transactions.
E_FILE_IO Damaged PDF or unable to open.
E_INCOMPLETE_MONTHS Flag for whether a full month is not reflected on the bank statement.
E_STATEMENT_NO_TRANSACTIONS There are no transactions in this statement. Please upload a valid bank statement.
E_STATEMENT_TOO_MANY_PAGES Cannot process files with more than 1000 pages.
Query Parameter  
xml boolean get detail in xml true or false.
docsumo_upload boolean upload to docsumo webapp true or false.
Form Arguments  
file_{id} string path of the bank statement file.
password_{id} string password of the file.
doc_uploaded_date date upload date of the document.
user_bank_name string name of the bank of the user.
Json Response Detail  
analysis dict dict of response.
meta_data dict dict of metadata of the document.
Json Response Sections Breakdown  
customerInfo This section contains the information on customer.
statementDetails Information about the valid statement files are shown in this section.
summaryInfo Summary of several useful quantitative attributes over the total time period of the statement.
monthwiseDetails Summary of several useful quantitative attributes of the statement on a monthly basis.
accountDetails This section contains details of accounts, such as name of the bank, account number and current balance.
bouncedPenalXns This section lists all bounced/rejected and penal transactions.
salaryPensionCredits This section lists all unambiguously identified Salary/Pension transactions.
highValueXns High value debit and credit transactions.
recurring.debts This section lists all transactions related to common recurring expenses. The criterion for considering a category to be recurring is that expense in the category must occur in 4 or more months.
recurring.uncategorized.expenses This section lists all recurring uncategorized transactions. Two transactions are grouped based on the transaction narration. The criterion for considering a group to be recurring is same as for recurring.debts.
recurring.amount.date Attempts to identify recurring monthly payments of fixed amounts, puts each such sequence of transactions in a group, and lists all such groups.
BouncedEmiXns It should contain date, chqNo, narration, amount, category, reason. Reason field should state whether the emi bounce is technical or non-technical.
xns This section lists all the transactions with amount.

Accord Insurance

Acord 25 COI Form

Extract information from the Acord 25 COI Forms.

Definition

POST https://acord25api.docsumo.com/api/v1/acord25/extract/
POST https://acord25api.docsumo.com/api/v1/acord25/extract/

Example Request

curl -X POST 'https://acord25api.docsumo.com/api/v1/acord25/extract/' \
--header 'X-API-KEY:  <apikey>' \
--form 'files=@/path/to/file'
import requests

url = "https://acord25api.docsumo.com/api/v1/acord25/extract/"

payload = {}
files = [
  ('files', open(<file_path>,'rb'))
]
headers = {
  'X-API-KEY': <apikey>,
}

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

print(response.json())

Example Response

{
  "meta_data": {
    "id": "3905d3dd3569419b9b08f3b387590f1c",
    "title": "010436745_1-acfa20f61ab590f13770eb831a4735f7-converted.pdf"
  },
  "message": "",
  "status_code": 200,
  "data": {
    "id": "010436745_1-acfa20f61ab590f13770eb831a4735f7-converted",
    "pages": [
      {
        "page": 1,
        "acordTwentyFiveConfidence": 1,
        "acordVersion": "01/2014",
        "issueDate": "10/02/2015",
        "producer": {
          "companyName": "Peoples United Ins. Agency CT",
          "address": "One Goodwin Square",
          "city": "Hartford",
          "state": "CT",
          "zip": "06103",
          "licenseNumber": "",
          "contactName": "",
          "phone": "860 524-7663",
          "fax": "",
          "emailAddress": ""
        },
        "insurers": [
          {
            "index": "A",
            "companyName": "Hartford Fire Insurance Company",
            "naicNumber": "19682"
          },
          {
            "index": "B",
            "companyName": "Hartford Casualty Insurance Com",
            "naicNumber": "29424"
          },
          {
            "index": "c",
            "companyName": "Trumbull Insurance Company",
            "naicNumber": "27120"
          },
          {
            "index": "D",
            "companyName": "Natl Union Fire Ins. Co of Pit",
            "naicNumber": "19445"
          }
        ],
        "insured": {
          "companyName": "TouchNet Information Systems, Inc",
          "dba": "(Heartiand Payment Systems, Inc.)",
          "address": "15520 College Boulevard",
          "city": "Lenexa",
          "state": "KS",
          "zip": "66219"
        },
        "certificateNumber": "",
        "revisionNumber": "",
        "coverages": [
          {
            "type": "GENt AGGREGATE LIMIT APPLIES PER :",
            "insurerIndex": [
              "A"
            ],
            "typeOfInsurance": {
              "inEffect": "false",
              "claimsMade": "false",
              "occur": "true",
              "COMMERCIAL GENERAL LIABILITY": "true",
              "generalAggregateLimitAppliesPer": {
                "policy": "false",
                "project": "false",
                "location": "true",
                "other": {
                  "enabled": "false"
                }
              }
            },
            "additionalInsured": false,
            "subrogationWaived": false,
            "policies": [
              {
                "number": "O2UUNTD0886",
                "policyEff": "10/01/2015",
                "policyExp": "10/01/2016"
              }
            ],
            "limits": {
              "eachOccurrence": "$1,000,000",
              "damageToRentedPremisesEaOccurrence": "$300,000",
              "medExpAnyOnePerson": "$10,000",
              "personalAndAdvInjury": "$1,000,000",
              "generalAggregate": "$2,000,000",
              "productsCompOpAgg": "$2,000,000"
            }
          },
          {
            "type": "AUTOMOBILE LIABILITY",
            "insurerIndex": [
              "A"
            ],
            "typeOfInsurance": {
              "anyAuto": "false",
              "ownedAutosOnly": "false",
              "hiredAutosOnly": "false",
              "scheduledAutos": "false",
              "nonOwnedAutosOnly": "false",
              "ALL OWNED AUTOS": "false",
              "AUTOS SCHEDULED": "false",
              "HIRED AUTOS": "true",
              "AUTOS NON-OWNED": "true"
            },
            "additionalInsured": false,
            "subrogationWaived": false,
            "policies": [
              {
                "number": "02UUNTD0886",
                "policyEff": "10/01/2015",
                "policyExp": "10/01/2016"
              }
            ],
            "limits": {
              "combinedSingleLimitEaAccident": "$"
            }
          },
          {
            "type": "UMBRELL LIAB",
            "insurerIndex": [
              "B"
            ],
            "typeOfInsurance": {
              "inEffect": "true",
              "occur": "true",
              "excessLiab": "false",
              "claimsMade": "false",
              "ded": "false",
              "retention": "RETENTIONS10,00010,000"
            },
            "additionalInsured": false,
            "subrogationWaived": false,
            "policies": [
              {
                "number": "02RHURO5491",
                "policyEff": "10/01/2015",
                "policyExp": "10/01/2016"
              }
            ],
            "limits": {
              "eachOccurrence": "$25,000,000",
              "generalAggregate": "$25,000,000"
            }
          },
          {
            "type": "AND EMPLOYERS LIABSLITY WORKERS COMPENSATION",
            "insurerIndex": [
              "C"
            ],
            "typeOfInsurance": {
              "anyProprietorPartnerExecutiveOfficerMemeberExcluded": "false"
            },
            "additionalInsured": "false",
            "subrogationWaived": false,
            "policies": [
              {
                "number": "02WECR4310",
                "policyEff": "10/01/2015",
                "policyExp": "10/01/2016"
              }
            ],
            "limits": {
              "E.L DISEASE": "$1,000,000"
            }
          },
          {
            "type": "Professional E&O inct Cyber & Privacy Liability",
            "insurerIndex": [
              "D"
            ],
            "additionalInsured": false,
            "subrogationWaived": false,
            "policies": [
              {
                "number": "013478346",
                "policyEff": "05/31/2015",
                "policyExp": "05/31/2016"
              }
            ],
            "limits": {
              "additionalLimits": []
            }
          }
        ],
        "certificateHolder": [
          {
            "company name": "Stephen F. Austin State University",
            "dba": "Dora Fuselier, Controller",
            "address": "SFA Station",
            "dba address": "Box 13035",
            "city": "Nacogdoches",
            "state": "TX",
            "zip": "75962-3035"
          }
        ],
        "signature": true,
        "cancellation": "SHOULD ANY OF THE ABOVE DESCRIBED POLICIES BE CANCELLED BEFORE THE EXPIRATION DATE THEREOF, NOTICE WILL BE DELIVERED IN ACCORDANCE WITH THE POLICY PROVISIONS."
      }
    ]
  }
}
Status Code Error Code
400 NO_ACCORD
400 EXTRACTION_ISSUE
Form Arguments  
files string path to the file
Json Response Detail  
data dict dict of response.
meta_data dict dict of metadata of the document.
meta_data{}.id string id of the document.
meta_data{}.title string name of the document.

Acord 25 COI Form - File Url

Upload Acord 25 COI Form using file url.

Definition

POST https://acord25api.docsumo.com/api/v1/acord25/extract/?request_type=async
POST https://acord25api.docsumo.com/api/v1/acord25/extract/?request_type=async

Example Request

curl -X POST \
  'https://acord25api.docsumo.com/api/v1/acord25/extract/?request_type=async' \
  -H 'X-API-KEY: <apikey> \
  -d '{
    "file_url": "https://test.s3.amazonaws.com/test.pdf",
    "file_name": "test.pdf",
    "uuid": "7bdfdf35-280a-4a43-a72c-1ae3ad577665",
    "webhook_url": "https://hooks.zaiper.com/926792f2-a418-431a-a086-775a489983b9"
}'
import requests

url = "https://acord25api.docsumo.com/api/v1/acord25/extract/?request_type=async"

payload = "{\n    \"file_url\": \"https://test.s3.amazonaws.com/test.pdf?",\n    \"file_name\": \"test.pdf\",\n    \"uuid\": \"7bdfdf35-280a-4a43-a72c-1ae3ad577665\",\n    \"webhook_url\": \"https://hooks.zaiper.com/926792f2-a418-431a-a086-775a489983b9\"\n}"
headers = {
  'X-API-KEY': '<apikey>',
  'Content-Type': 'application/json',
}

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

print(response.json())

Example Response

{
  "meta_data": {
    "id": "3905d3dd3569419b9b08f3b387590f1c",
    "title": "010436745_1-acfa20f61ab590f13770eb831a4735f7-converted.pdf"
  },
  "message": "",
  "status_code": 200,
  "data": {
    "id": "010436745_1-acfa20f61ab590f13770eb831a4735f7-converted",
    "pages": [
      {
        "page": 1,
        "acordTwentyFiveConfidence": 1,
        "acordVersion": "01/2014",
        "issueDate": "10/02/2015",
        "producer": {
          "companyName": "Peoples United Ins. Agency CT",
          "address": "One Goodwin Square",
          "city": "Hartford",
          "state": "CT",
          "zip": "06103",
          "licenseNumber": "",
          "contactName": "",
          "phone": "860 524-7663",
          "fax": "",
          "emailAddress": ""
        },
        "insurers": [
          {
            "index": "A",
            "companyName": "Hartford Fire Insurance Company",
            "naicNumber": "19682"
          },
          {
            "index": "B",
            "companyName": "Hartford Casualty Insurance Com",
            "naicNumber": "29424"
          },
          {
            "index": "c",
            "companyName": "Trumbull Insurance Company",
            "naicNumber": "27120"
          },
          {
            "index": "D",
            "companyName": "Natl Union Fire Ins. Co of Pit",
            "naicNumber": "19445"
          }
        ],
        "insured": {
          "companyName": "TouchNet Information Systems, Inc",
          "dba": "(Heartiand Payment Systems, Inc.)",
          "address": "15520 College Boulevard",
          "city": "Lenexa",
          "state": "KS",
          "zip": "66219"
        },
        "certificateNumber": "",
        "revisionNumber": "",
        "coverages": [
          {
            "type": "GENt AGGREGATE LIMIT APPLIES PER :",
            "insurerIndex": [
              "A"
            ],
            "typeOfInsurance": {
              "inEffect": "false",
              "claimsMade": "false",
              "occur": "true",
              "COMMERCIAL GENERAL LIABILITY": "true",
              "generalAggregateLimitAppliesPer": {
                "policy": "false",
                "project": "false",
                "location": "true",
                "other": {
                  "enabled": "false"
                }
              }
            },
            "additionalInsured": false,
            "subrogationWaived": false,
            "policies": [
              {
                "number": "O2UUNTD0886",
                "policyEff": "10/01/2015",
                "policyExp": "10/01/2016"
              }
            ],
            "limits": {
              "eachOccurrence": "$1,000,000",
              "damageToRentedPremisesEaOccurrence": "$300,000",
              "medExpAnyOnePerson": "$10,000",
              "personalAndAdvInjury": "$1,000,000",
              "generalAggregate": "$2,000,000",
              "productsCompOpAgg": "$2,000,000"
            }
          },
          {
            "type": "AUTOMOBILE LIABILITY",
            "insurerIndex": [
              "A"
            ],
            "typeOfInsurance": {
              "anyAuto": "false",
              "ownedAutosOnly": "false",
              "hiredAutosOnly": "false",
              "scheduledAutos": "false",
              "nonOwnedAutosOnly": "false",
              "ALL OWNED AUTOS": "false",
              "AUTOS SCHEDULED": "false",
              "HIRED AUTOS": "true",
              "AUTOS NON-OWNED": "true"
            },
            "additionalInsured": false,
            "subrogationWaived": false,
            "policies": [
              {
                "number": "02UUNTD0886",
                "policyEff": "10/01/2015",
                "policyExp": "10/01/2016"
              }
            ],
            "limits": {
              "combinedSingleLimitEaAccident": "$"
            }
          },
          {
            "type": "UMBRELL LIAB",
            "insurerIndex": [
              "B"
            ],
            "typeOfInsurance": {
              "inEffect": "true",
              "occur": "true",
              "excessLiab": "false",
              "claimsMade": "false",
              "ded": "false",
              "retention": "RETENTIONS10,00010,000"
            },
            "additionalInsured": false,
            "subrogationWaived": false,
            "policies": [
              {
                "number": "02RHURO5491",
                "policyEff": "10/01/2015",
                "policyExp": "10/01/2016"
              }
            ],
            "limits": {
              "eachOccurrence": "$25,000,000",
              "generalAggregate": "$25,000,000"
            }
          },
          {
            "type": "AND EMPLOYERS LIABSLITY WORKERS COMPENSATION",
            "insurerIndex": [
              "C"
            ],
            "typeOfInsurance": {
              "anyProprietorPartnerExecutiveOfficerMemeberExcluded": "false"
            },
            "additionalInsured": "false",
            "subrogationWaived": false,
            "policies": [
              {
                "number": "02WECR4310",
                "policyEff": "10/01/2015",
                "policyExp": "10/01/2016"
              }
            ],
            "limits": {
              "E.L DISEASE": "$1,000,000"
            }
          },
          {
            "type": "Professional E&O inct Cyber & Privacy Liability",
            "insurerIndex": [
              "D"
            ],
            "additionalInsured": false,
            "subrogationWaived": false,
            "policies": [
              {
                "number": "013478346",
                "policyEff": "05/31/2015",
                "policyExp": "05/31/2016"
              }
            ],
            "limits": {
              "additionalLimits": []
            }
          }
        ],
        "certificateHolder": [
          {
            "company name": "Stephen F. Austin State University",
            "dba": "Dora Fuselier, Controller",
            "address": "SFA Station",
            "dba address": "Box 13035",
            "city": "Nacogdoches",
            "state": "TX",
            "zip": "75962-3035"
          }
        ],
        "signature": true,
        "cancellation": "SHOULD ANY OF THE ABOVE DESCRIBED POLICIES BE CANCELLED BEFORE THE EXPIRATION DATE THEREOF, NOTICE WILL BE DELIVERED IN ACCORDANCE WITH THE POLICY PROVISIONS."
      }
    ]
  }
}

Error

Status Code Error Code
400 NO_ACCORD
400 EXTRACTION_ISSUE
Query Parameter  
request_type string async and sync
Form Arguments  
file_url string url to the file.
file_name string name of the file.
uuid string id of the file.
webhook_url string webhook url to the file.
Json Response Detail  
data dict dict of response.
meta_data dict dict of metadata of the document.
meta_data{}.id string id of the document.
meta_data{}.title string name of the document.

Utility

Name Match

Check the similarity of the names from mutiple documents.

If similarity_scores >= 0.9 than name is similar

Definition

POST https://namematch.docsumo.com/api/v1/similarity/names/
POST https://namematch.docsumo.com/api/v1/similarity/names/

Example Request

curl -X POST 'https://namematch.docsumo.com/api/v1/similarity/names/' \
--header 'X-API-KEY:  <apikey>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "reference_name": "Bikram Dahal",
    "names": [
        "B Dahal",
        "Bikram D",
        "bikram dahal",
        "D bikram"
    ]
}'
import requests

url = "https://namematch.docsumo.com/api/v1/similarity/names/"

payload = "{\n    \"reference_name\": \"Bikram Dahal\",\n    \"names\": [\n        \"B Dahal\",\n        \"Bikram D\",\n        \"bikram dahal\",\n        \"D bikram\"\n    ]\n}"
headers = {
  'X-API-KEY': <apikey>,
  'Content-Type': 'application/json',
}

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

print(response.json())

Example Response

{
  "data": {
    "average_score": 0.917,
    "similarity_scores": [
      0.8,
      0.933,
      1,
      0.933
    ]
  },
  "error": "",
  "error_code": "",
  "message": "",
  "status_code": 200
}

Error

ERROR Condition
400 Json is not of required format. Please check body.
Form Arguments  
reference_name string reference for name.
names list list of names.
Json Response Detail  
data dict dict of response.
data.average_score number average score of name match.
data.similarity_scores list list of similarity_scores.

Selfie check

Check if selfie meets all requirements.

Definition

POST https://facematch.docsumo.com/api/v1/match/
POST https://facematch.docsumo.com/api/v1/match/

Example Request

curl -X POST 'https://facematch.docsumo.com/api/v1/match/' \
--header 'X-API-KEY:  <apikey>' \
--form 'file_selfie=@/path/to/file'
import requests

url = "https://facematch.docsumo.com/api/v1/match/"

payload = {}
files = [
  ('file_selfie', open('/path/to/file','rb'))
]
headers = {
  'X-API-KEY': '{{apikeybs}}',
}

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

print(response.json())

Example Response

{
  "data": "",
  "message": "",
  "meta_data": {
    "deltatime": 1.6522548198699951
  },
  "status_code": 200
}

Error

ERROR CODE Status Description
IMAGE_MISSING_ON_REQUEST 400 Files not found in the request.
FILE_SELFIE_MISSING_ON_REQUEST 400 filename_selfie not found in the request.
FILE_TYPE_NOT_SUPPORTED 400 File-type no supported.
IMAGE_INVALID 400 Corrupt/Invalid Image.
IMAGE_TOO_SMALL 400 Very low resolution image.
NO_FACE_DETECTED 400 Face is not detected.
MULTIPLE_FACE_DETECTED 400 Multiple faces present in the image.
PHOTO_OF_PHOTO 400 If the selfie is a photo of a picture (say photograph captured through mobile.
IMAGE_BLURRY 400 Image is blurry (or not very sharp).
IMAGE_BRIGHT 400 Image is too bright.
IMAGE_DARK 400 Image is too dark.
FACE_TOO_CLOSE 400 Face of the person is too close to the camera.
FACE_TOO_FAR 400 Face is too far from the camera.
EYES_CLOSED 400 Eyes are fully/partially closed.
FACE_POSE_WEIRD 400 selfie of the person is slanted, or person has turned his/her head.
IMAGE_ACCESSORY_GLASS 400 Person is wearing glasses (any).
Form Arguments  
file_selfie string file of selfie.
Json Response Detail  
meta_data dict dict of metadata.
meta_data{}.deltatime number time for selfie match.