Reset document
curl --request POST \
--url https://api2.documate.ai/api/v1/documents/{documentId}/reset \
--header 'X-Api-Key: <api-key>'const url = 'https://api2.documate.ai/api/v1/documents/{documentId}/reset';
const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api2.documate.ai/api/v1/documents/{documentId}/reset"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api2.documate.ai/api/v1/documents/{documentId}/reset");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Api-Key", "<api-key>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api2.documate.ai/api/v1/documents/{documentId}/reset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"queueId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originalFileName": "<string>",
"contentType": "<string>",
"sizeBytes": 123,
"publicStatusKey": "<string>",
"internalStageKey": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"documentCount": 123,
"pageCount": 123,
"reprocessOfFileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"downloadUrl": "<string>",
"downloadUrlExpiresAt": "2023-11-07T05:31:56Z",
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"queueId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documentTypeId": 123,
"documentTypeKey": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publicStatusKey": "<string>",
"internalStageKey": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"resultJson": null,
"webhookStatusKey": "<string>",
"webhookAttempts": 123,
"webhookLastHttpStatus": 123,
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"downloadUrl": "<string>",
"downloadUrlExpiresAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}Documents
Reset document
Re-run extraction for this document only. Other documents on the file are left unchanged. When the run finishes, Documate sends document.ready or document.failed for this document, with event_id suffixed :r1, :r2, and so on. Sibling document webhooks are not repeated, and file.completed is not sent. Returns 202 with the parent file. 404 when the document is not found. 409 when the parent file is cancelled.
POST
/
api
/
v1
/
documents
/
{documentId}
/
reset
Reset document
curl --request POST \
--url https://api2.documate.ai/api/v1/documents/{documentId}/reset \
--header 'X-Api-Key: <api-key>'const url = 'https://api2.documate.ai/api/v1/documents/{documentId}/reset';
const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api2.documate.ai/api/v1/documents/{documentId}/reset"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api2.documate.ai/api/v1/documents/{documentId}/reset");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Api-Key", "<api-key>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api2.documate.ai/api/v1/documents/{documentId}/reset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"queueId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originalFileName": "<string>",
"contentType": "<string>",
"sizeBytes": 123,
"publicStatusKey": "<string>",
"internalStageKey": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"documentCount": 123,
"pageCount": 123,
"reprocessOfFileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"downloadUrl": "<string>",
"downloadUrlExpiresAt": "2023-11-07T05:31:56Z",
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"queueId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documentTypeId": 123,
"documentTypeKey": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publicStatusKey": "<string>",
"internalStageKey": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"resultJson": null,
"webhookStatusKey": "<string>",
"webhookAttempts": 123,
"webhookLastHttpStatus": 123,
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"downloadUrl": "<string>",
"downloadUrlExpiresAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Response
Accepted