Export a document
curl --request POST \
--url https://sandbox.circularo.com/api/v2/documents/{id}/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"includeAuditTrail": true,
"includeAttachments": true
}
'import requests
url = "https://sandbox.circularo.com/api/v2/documents/{id}/export"
payload = {
"includeAuditTrail": True,
"includeAttachments": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({includeAuditTrail: true, includeAttachments: true})
};
fetch('https://sandbox.circularo.com/api/v2/documents/{id}/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.circularo.com/api/v2/documents/{id}/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'includeAuditTrail' => true,
'includeAttachments' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.circularo.com/api/v2/documents/{id}/export"
payload := strings.NewReader("{\n \"includeAuditTrail\": true,\n \"includeAttachments\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.circularo.com/api/v2/documents/{id}/export")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"includeAuditTrail\": true,\n \"includeAttachments\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v2/documents/{id}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"includeAuditTrail\": true,\n \"includeAttachments\": true\n}"
response = http.request(request)
puts response.read_body{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 402,
"type": "SUBSCRIPTION:NOT_ACTIVE",
"message": "Subscription not active",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 429,
"type": "SYSTEM:RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Documents
Export a document
POST /documents/{id}/export
Exports the complete package of a single document as a ZIP archive: the document’s file, optionally combined with or accompanied by its audit trail and certificate of fulfillment, plus its attachments and recipient-submitted files on request. The exported PDF files can additionally be password-protected and sealed. The response is always a ZIP archive, even when it contains a single file. To export many documents at once, use POST /documents/export instead.
Export a document
curl --request POST \
--url https://sandbox.circularo.com/api/v2/documents/{id}/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"includeAuditTrail": true,
"includeAttachments": true
}
'import requests
url = "https://sandbox.circularo.com/api/v2/documents/{id}/export"
payload = {
"includeAuditTrail": True,
"includeAttachments": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({includeAuditTrail: true, includeAttachments: true})
};
fetch('https://sandbox.circularo.com/api/v2/documents/{id}/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.circularo.com/api/v2/documents/{id}/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'includeAuditTrail' => true,
'includeAttachments' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.circularo.com/api/v2/documents/{id}/export"
payload := strings.NewReader("{\n \"includeAuditTrail\": true,\n \"includeAttachments\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.circularo.com/api/v2/documents/{id}/export")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"includeAuditTrail\": true,\n \"includeAttachments\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v2/documents/{id}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"includeAuditTrail\": true,\n \"includeAttachments\": true\n}"
response = http.request(request)
puts response.read_body{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 402,
"type": "SUBSCRIPTION:NOT_ACTIVE",
"message": "Subscription not active",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 429,
"type": "SYSTEM:RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Path Parameters
Body
application/json
Options controlling what a document export archive contains and how the exported files are protected.
Response
The export ZIP archive is returned to you as an attachment.