Reprocess file
curl --request POST \
--url https://api2.documate.ai/api/v1/files/{fileId}/reprocess \
--header 'X-Api-Key: <api-key>'const url = 'https://api2.documate.ai/api/v1/files/{fileId}/reprocess';
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/files/{fileId}/reprocess"
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/files/{fileId}/reprocess");
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/files/{fileId}/reprocess",
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,
"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>"
}Files
Reprocess file
Create a new file from the same source and enqueue processing. Returns 202.
POST
/
api
/
v1
/
files
/
{fileId}
/
reprocess
Reprocess file
curl --request POST \
--url https://api2.documate.ai/api/v1/files/{fileId}/reprocess \
--header 'X-Api-Key: <api-key>'const url = 'https://api2.documate.ai/api/v1/files/{fileId}/reprocess';
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/files/{fileId}/reprocess"
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/files/{fileId}/reprocess");
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/files/{fileId}/reprocess",
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,
"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>"
}Authorizations
API key from the Documate app (Settings → API keys). You may also send Authorization: ApiKey YOUR_API_KEY.
Path Parameters
Response
Accepted
Show child attributes
Show child attributes