PUSH API Structure

Endpoint Name: <Your end point goes here>

Request type : POST

Authorization: Bearer token as header

Endpoint Details: The <your endpoint> endpoint will be used to get a result JSON of documents.

Method

URL

POST

<Pls share your API endpoint>

Request Body

Params

Values

Description

company_name

string

Name of the company for which the user is logging in

username

string

<your endpoint credentials>

password

string

<your endpoint credentials>

document_type

string

Name of document type

batch_id

string

ID of document or Batch

Document_id

file_name

data

<entire result JSON will go here>

Sample JSON Result (added to the data attribute in the request)

Status code

Example Request

200

{

"result": [

{

"Document_id": "65269c006a8da8763b51c217",

"is_approved": 0,

"file_name": "Invoice 231799.pdf",

"overall_confidence": 0.8545232920427561,

"document_type": "Invoice",

"upload_time": "2023-10-11T18:28:40.322",

"finished_time": "2023-10-11T18:30:21.875",

"Inv_Number": {

"value": "231799",

"confidence": 0.9967719905645758,

"page_index": 1,

"coordinate": [

1297,

70,

1408,

98

]

},

"Inv_Date": {

"value": "15-Sep-2023",

"confidence": 0.9999483208203647,

"page_index": 1,

"coordinate": [

1297,

139,

1450,

164

]

},

"Total_VAT": {

"value": "2.37",

"confidence": 0.8846402077955501,

"page_index": 1,

"coordinate": [

1140,

1045,

1193,

1066

]

},

"Due_Date": {

"value": "16-Sep-2023",

"confidence": 0.874903804263095,

"page_index": 1

},

"PO_Number": {

"value": "369-1111-1111",

"confidence": 0.777240328679722,

"page_index": 1,

"coordinate": [

1297,

432,

1485,

455

]

},

"Total": {

"value": "80.4",

"confidence": 0.987641462429209,

"page_index": 1,

"coordinate": [

1556,

1095,

1641,

1121

]

},

"VAT_Percentage": {

"value": "0",

"confidence": 0.924382186378707,

"page_index": 1

},

"Sub-Total": {

"value": "80.40",

"confidence": 0.910711264124983,

"page_index": 1,

"coordinate": [

1554,

998,

1638,

1025

]

},

"CGST_Value": {

"value": "1",

"confidence": 0.99999,

"page_index": 1,

"coordinate": [

1093,

889,

1103,

910

]

},

"SGST_Value": {

"value": "1",

"confidence": 0.99999,

"page_index": 1,

"coordinate": [

1093,

889,

1103,

910

]

},

"CGST_%": {

"value": "2.5",

"confidence": 0.99999,

"page_index": 1

},

"SGST_%": {

"value": "2.5",

"confidence": 0.99999,

"page_index": 1

},

"Total_Pieces": {

"value": "2",

"confidence": 0.8,

"page_index": 1,

"coordinate": [

1179,

998,

1194,

1019

]

},

"Full_Box_Equivalent": {

"value": "0.5",

"confidence": 0.8,

"page_index": 1

},

"Inv_Supplier": {

"value": "Farm Direct",

"page_index": 1,

"coordinate": [

59,

312,

218,

336

],

"confidence": 0.6

},

"Customer_Name": {

"value": "winds Llc",

"confidence": 0.6,

"page_index": 1,

"coordinate": [

55,

608,

367,

633

]

},

"Ship-to_Party_Name": {

"value": "WINDS LLC",

"confidence": 0.9,

"page_index": 1,

"coordinate": [

55,

608,

367,

633

]

},

"Supplier_Contact_Reference_Name": {

"value": "Mike johansson",

"confidence": 0.959998239582176,

"page_index": 1,

"coordinate": [

1298,

347,

1495,

372

]

},

"Currency": {

"value": "USD",

"confidence": 0.9432,

"page_index": 1,

"coordinate": [

1155,

608,

367,

633

]

},

"Inv_Type": {

"value": "Tax Invoice",

"confidence": 0.907526923369042,

"page_index": 1,

"coordinate": [

55,

608,

367,

633

]

},

"Suppllier_Email_Address": {

"value": "mike@KlearStack.com",

"confidence": 0.925903840309437,

"page_index": 1,

"coordinate": [

1179,

998,

1194,

1019

]

},

"line_items": [

{

"row": {

"Description": "Spray Roses Red Rubicon 50 cm X 60 Stem (1.19 cubes)",

"Mark Code": "",

"Pieces": "1",

"Total Units": "60",

"Unit Price": "$ 0.590",

"Line_Item_Total": "$ 35.40",

"table_index": "1",

"Box Type": "QB",

"Units Per Box": "60.0",

"Total Bunches": "",

"Item Code": ""

},

"page_index": 1,

"coordinate": [

61,

886,

909.5,

919

],

"confidence": 0.516886749822407

},

{

"row": {

"Description": "Spray Roses White Snow Flake 50 cm X 100 Stem (1.19 cubes)",

"Mark Code": "MAU",

"Pieces": "1",

"Total Units": "100",

"Unit Price": "$ 0.450",

"Line_Item_Total": "$ 45.00",

"table_index": "1",

"Box Type": "QB",

"Units Per Box": "100.0",

"Total Bunches": "",

"Item Code": "100"

},

"page_index": 1,

"coordinate": [

36,

930,

1644,

963

],

"confidence": 0.510797353494844

}

],

"Customer_Address": {

"value": "WINDS LLC 1111 Pioneer Ave Vista, CA 92111 760-734-1111 Tax Id: 844307411",

"confidence": 0.8,

"page_index": 1,

"coordinate": [

54,

608,

367,

782

]

},

"Supplier_Address": {

"value": "Farm Direct, 1111 NW 11th Ct, Miami, Florida 33111, Phone 305611111, Email mike@KlearStack.com,",

"confidence": 0.8,

"page_index": 1,

"coordinate": [

59,

312,

218,

336

]

},

"Supplier_State_name": {

"value": "florida",

"confidence": 0.557732443688379,

"page_index": 1

},

"Customer_State_Name": {

"value": "ca",

"confidence": 0.610590142645783,

"page_index": 1

},

"Invoice_Lessor_Address_Value": {

"value": "WINDS LLC WINDS LLC 1111 Pioneer Ave 1111 Pioneer Ave",

"confidence": 0.9,

"page_index": 1

},

"Ship-to_Party_Address": {

"value": "EWINDS LLC 1111 Pioneer Ave 1111",

"confidence": 0.9,

"page_index": 1

},

"PDF_Creator": {

"value": "JasperReports (Komet Sales Standard Invoice)",

"confidence": 1.0,

"page_index": 1

},

"PDF_Modified_Date": {

"value": false,

"confidence": 1.0,

"page_index": 1

},

"PDF_Producer": {

"value": "iText 2.1.0 (by lowagie.com)",

"confidence": 1.0,

"page_index": 1

},

"Carrier": {

"value": "FARM DIRECT",

"confidence": 0.85,

"page_index": 1,

"coordinate": [

1254,

611,

1413,

635

]

},

"Airway_Bill_Number": {

"value": "3698781111",

"confidence": 0.95,

"page_index": 1,

"coordinate": [

1297,

432,

1485,

455

]

},

"Supplier_Contact_Number": {

"value": "30511111",

"confidence": 0.8,

"page_index": 1

},

"Ship_To_Party_Address": {

"value": "Ship To ,WINDS LLC , 1111 Pioneer Ave , Vista, CA 11111 ,",

"confidence": 0.92,

"page_index": 1

},

"Description_of_Goods": {

"value": "Spray Roses Red Rubicon 50 cm X 60 Stem (1.19 cubes)",

"confidence": 0.9,

"page_index": 1,

"coordinate": [

61,

886,

909.5,

919

]

},

"Concise_Description_of_Goods": {

"value": "Roses Red Rubicon 50 cm X 60 Stem",

"confidence": 0.9,

"page_index": 1,

"coordinate": [

61,

886,

909.5,

919

]

}

}

],

"Status": "complete",

"Application_No" : "41828193545",

"OCR_Ref_No":"e967f4c1-ca76-4d78-b8db-41828193545e",

"User_Name":"Admin",

"Company_Name":"KlearStack",

"Source_Name":"API",

"Image_list":["https://wfh.klearstack.com/document/details/KlearStack/Invoices/e967f4c1-ca76-4d78-b8db-41828193545e/e967f4c1-ca76-4d78-b8db-41828193545e/general-tab?selectedTab=0&pageNumber=1&documentPageIndex=1&sidebar=0"] ,

“release_version”:”7.8.9”

}

KlearStack will provide downloadable image links in a list format, KlearStack will also share access token with which URL’s can be accessible. For multipage pdf file image lists will contain the same number of URL’s as the number of pages in the document.

Last updated