Get file
curl --request GET \
--url https://api2.documate.ai/api/v1/files/{fileId} \
--header 'X-Api-Key: <api-key>'const url = 'https://api2.documate.ai/api/v1/files/{fileId}';
const options = {method: 'GET', 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}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api2.documate.ai/api/v1/files/{fileId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Api-Key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api2.documate.ai/api/v1/files/{fileId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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"
}
]
}Files
Get file
Get a file by ID, including pageCount and child documents when they exist. downloadUrl is the original uploaded file. Each child document’s downloadUrl is null until that document PDF is stored, and it is never the file download URL.
GET
/
api
/
v1
/
files
/
{fileId}
Get file
curl --request GET \
--url https://api2.documate.ai/api/v1/files/{fileId} \
--header 'X-Api-Key: <api-key>'const url = 'https://api2.documate.ai/api/v1/files/{fileId}';
const options = {method: 'GET', 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}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api2.documate.ai/api/v1/files/{fileId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Api-Key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api2.documate.ai/api/v1/files/{fileId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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"
}
]
}Authorizations
Response
OK