Upload A Single Document And Get Batch ID

EndPoint Name: processdocument

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

Authorization: Bearer token as header

Request Type

Method

URL

POST

URL/access/klearstack/processdocument

Request Body

Type

Params

Values

Description

POST

company_name

string

Name of the company

POST

username

string

Username for a particular user of a company

POST

password

string

Password for a particular user of a company

POST

POST

POST

POST

file

processing_pref

document_type

invoice_type

Binary

string

string

string

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

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

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

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

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

“B2C” for Insurances.

POST

application_no

String

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

POST

additional_params (Optional)

String (Valid JSON)

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

}

POST

source_name

String

API

POST

priority_flag

String

true or false

POST

account_id

String

Account_id number

POST

set_reference_number (Optional)

String

For adding document in Existing Set

POST

set_name

(Optional)

String

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

POST

create_new_set (Optional)

String

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.

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