Endpoint Name: URL/access/klearstack/getdocumentsetstatus
Request type : POST
Authorization: Bearer token as header
Endpoint Details: The getdocumentsetstatus
endpoint will be used to retrieve the upload status of documents in a document set. It will provide details on whether each document is in progress or completed.
URL/access/klearstack/getdocumentsetstatus
Request Body
Name of the company for which the user is logging in
Set Reference Number of the Document Set.
Accepts either of two values, "In Progress" or "Completed" to filter results based on status.
Shell (cURL)
Copy curl -X POST "URL/access/klearstack/getdocumentsetstatus" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_token_here" \
-d '{
"company_name": "Replace_Company_Name_Here",
"username": "Replace_Username_Here",
"set_reference_number": "Replace_Set_Reference_Number_Here",
"status": "Replace_Status_Here"
}'
Python
Copy import requests
# API URL
url = "URL/access/klearstack/getdocumentsetstatus"
# Request payload
data = {
"company_name": "Replace_Company_Name_Here",
"username": "Replace_Username_Here",
"set_reference_number": "Replace_Set_Reference_Number_Here",
"status": "Replace_Status_Here" # Optional, can be "In Progress" or "Completed"
}
# Headers
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer your_token_here"
}
# Make the POST request
response = requests.post(url, json=data, headers=headers)
# Print the response
if response.status_code == 200:
print(response.json())
else:
print("Error:", response.text)
Java
Copy import okhttp3.*;
import java.io.IOException;
public class GetDocumentSetStatusAPI {
public static void main(String[] args) {
OkHttpClient client = new OkHttpClient();
// JSON payload
String jsonPayload = "{ \"company_name\": \"Replace_Company_Name_Here\", " +
"\"username\": \"Replace_Username_Here\", " +
"\"set_reference_number\": \"Replace_Set_Reference_Number_Here\", " +
"\"status\": \"Replace_Status_Here\" }"; // Optional status
RequestBody body = RequestBody.create(
jsonPayload, MediaType.parse("application/json"));
Request request = new Request.Builder()
.url("URL/access/klearstack/getdocumentsetstatus")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer your_token_here")
.build();
try (Response response = client.newCall(request).execute()) {
if (response.isSuccessful()) {
System.out.println("Response: " + response.body().string());
} else {
System.out.println("Error: " + response.body().string());
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
Node.js
Copy var request = require('request');
const payload = {
"company_name": "Replace_Company_Name_Here",
"username": "Replace_Username_Here",
"set_reference_number": "Replace_Set_Reference_Number_Here",
"status": "Replace_Status_Here" // Optional: "In Progress" or "Completed"
};
const options = {
url: 'URL/access/klearstack/getdocumentsetstatus',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_token_here'
},
json: payload
};
request.post(options, function(err, httpResponse, body) {
if (err) {
console.error('Request failed:', err);
return;
}
console.log('Response:', body);
});
JavaScript (XMLHttpRequest)
Copy var payload = JSON.stringify({
company_name: "Replace_Company_Name_Here",
username: "Replace_Username_Here",
set_reference_number: "Replace_Set_Reference_Number_Here",
status: "Replace_Status_Here" // Optional: "In Progress" or "Completed"
});
var xhr = new XMLHttpRequest();
xhr.open("POST", "URL/access/klearstack/getdocumentsetstatus", true);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", "Bearer your_token_here");
// Handle response
xhr.onreadystatechange = function () {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200) {
console.log("Response:", xhr.responseText);
} else {
console.error("Error:", xhr.responseText);
}
}
};
xhr.send(payload);
API Response