Approve or Reject a Document

Endpoint Name : approve_reject_doc

Request type : POST

Authorization : Bearer token as header

Endpoint Details : The approve_reject_doc endpoint will be used to approve or reject a document.

Method

URL

POST

URL/access/klearstack/approve_reject_doc

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

id

string

Yes

ID of document

approve_reject

string

Yes

Two possible values “approve” and “reject”.

comment

string

Yes

Comment for approving or rejecting the document.

Shell (cURL)

  • Request Body

curl --location "URL/access/klearstack/approve_reject_doc" \
  --header "Authorization: Bearer your_token_here" \
  --form "company_name=Replace_Company_Name_Here" \
  --form "collection_name=Replace_Collection_Name_Here" \
  --form "id=Replace_Document_ID_Here" \
  --form "approve_reject=approve" \
  --form "comment=Replace_Comment_Here"

Python

  • Request Body

Java (OkHttp)

  • Request Body

Node.js (Axios)

  • Request Body

JavaScript (XHR)

  • Request Body

API Response

Status code

Example Response

200

{

"success": "Document updated successfully",

“release_version”:”7.8.9”

}

400

{

"error": "Document is already rejected"

}

{

"error": "Document is already approved"

}

Last updated