Download document content
curl --request GET \
--url https://api2.documate.ai/api/v1/documents/{documentId}/content \
--header 'X-Api-Key: <api-key>'const url = 'https://api2.documate.ai/api/v1/documents/{documentId}/content';
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/documents/{documentId}/content"
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/documents/{documentId}/content");
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/documents/{documentId}/content",
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;
}"<string>"{
"error": "<string>"
}Documents
Download document content
Download the stored document PDF (API key) when the document status is ready and that PDF exists. Does not read the original file. When the file is one document covering every page, the bytes may equal the upload. 409 until the document is ready and the PDF is stored. This is the fallback when a document.* webhook top-level url (or a file.completed documents[].url) is missing or expired.
GET
/
api
/
v1
/
documents
/
{documentId}
/
content
Download document content
curl --request GET \
--url https://api2.documate.ai/api/v1/documents/{documentId}/content \
--header 'X-Api-Key: <api-key>'const url = 'https://api2.documate.ai/api/v1/documents/{documentId}/content';
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/documents/{documentId}/content"
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/documents/{documentId}/content");
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/documents/{documentId}/content",
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;
}"<string>"{
"error": "<string>"
}