Upload A Single Document And Get Batch ID

EndPoint Name: processdocument

Request type : POST

Authorization: Bearer token as header

EndPoint Details: This API is used to get the batch id for a single invoice (image/pdf) uploaded by the user.

Request Type

Method

URL

POST

URL/access/klearstack/processdocument

Request Body

Parameters

Values

Required

Description

company_name

string

Yes

Name of the company.

username

string

Yes

Username for a particular user of a company.

password

string

Yes

Password for a particular user of a company.

processing_pref

string

Yes

Either “Speed” or “Accuracy” (It’s not case sensitive)

invoice_type

string

Yes

“B2B” for invoices commissioned by a business to another business directly.

“B2C” for invoices commissioned by a business to a consumer.

“B2C” for Insurances.

file

binary

Yes

Single image (pdf/jpeg/png) or native pdf file.

source_name

string

No

API

priority_flag

string

No

true or false

userid

string

No

User ID of the user.

user_role

string

No

role of the user.

document_type

string

No

Type of document to be processed - “Invoices”,“Receipts”,“PurchaseOrders”,“NACH”,“LoanAgreement” or “Insurances”.

application_no

string

No

An identifier for correlating multiple documents. Example : Nach and FacilityAgreement should have same application_no.

additional_params

string

No

For LoanAgreement : {

"borrower_name":"xyz",

"co_borrower":"abc",

"loan_amount_in_figures":250000,

"tenure":5,

"rate_of_interest":8.5,

"partner_name":"abc limited"

}

For Nach : {

"account_number":200382193

}

account_id

string

No

Account_id number

set_reference_number

string

No

For adding document in Existing Set

set_name

string

No

For assigning Name to document set, it cannot be updated after set is created

create_new_set

string

No

Flag needs to be True for creating new set, the param if set to True will create a new set with the given set_name and assign new set_reference_number to the document.

Shell

  • Request Body

Python (Requests)

  • Request Body

Java (OkHttp)

  • Request Body

Node.js (Axios)

  • Request Body

JavaScript (XHR)

  • Request Body

API Response

Status

Example Response

200

{

"OCR_ref_no": "faaf38a9-2cc7-4b2b-89f2-182252d1638c",

"status": "pass",

"description": "",

"application_no": "",

"release_version": “7.8.9”,

"set_reference_number":"12345"

}

400

{"error": "Please provide username."}

400

{"error": "Please provide password."}

Last updated