Push Annotated Text for a Document to KlearStack

Endpoint Name: gettext

Request type : POST

Authorization: Bearer token as header

Endpoint Details: The gettext endpoint will be used to push annotated text for a document to KlearStack.

Method

URL

POST

URL/access/klearstack/gettext

Request Body

Params

Values

Required

Description

company_name

string

Yes

Name of the company for which the user is logging in

collection_name

string

Yes

Name of collection of document

ocr_text_id

string

Yes

ID received from key “ocr_id” of response from api getdocument

coordinates

string

Yes

JSON list of co-ordinates

Example : [top_left_x,top_left_y,bottom_right_x,bottom_right_y]

Shell (cURL)

  • Request Body

curl --location "URL/access/klearstack/gettext" \
  --header "Authorization: Bearer your_token_here" \
  --form "company_name=Replace_Company_Name_Here" \
  --form "collection_name=Replace_Collection_Name_Here" \
  --form "ocr_text_id=Replace_OCR_Text_ID_Here" \
  --form "coordinates=[top_left_x, top_left_y, bottom_right_x, bottom_right_y]"

Python

  • Request Body

Java (OkHttp)

  • Request Body

Node.js (Axios)

  • Request Body

JavaScript (XHR)

  • Request Body

API Response

Status code

Example Response

200

{

"text": [

"27"

],

“release_version”:”7.8.9”

}

Last updated