Retrieve a document
curl --request GET \
--url https://sandbox.circularo.com/api/v2/documents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox.circularo.com/api/v2/documents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.circularo.com/api/v2/documents/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.circularo.com/api/v2/documents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v2/documents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v2/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"annotations": [
{
"addedAt": "2024-11-02T09:15:30.000Z",
"addedBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"comment": "Reviewed and approved",
"text": "Approved",
"type": "annotation_generic"
}
],
"attachments": [
{
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"fileName": "LegalNotes.docx",
"isMerged": false,
"isPublic": false,
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"pageCount": 8,
"size": 522481
}
],
"category": "Contract",
"createdAt": "2024-11-02T09:15:30.000Z",
"createdBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"customFields": [
{
"displayName": "Internal reference",
"key": "internalReference",
"value": "ACME-2026-001",
"type": "string"
}
],
"expiresAt": "2026-12-31T22:59:59.999Z",
"folders": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"scope": "personal"
}
],
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"images": [
{
"addedAt": "2024-11-02T09:15:30.000Z",
"addedBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"comment": "Company logo",
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"
}
],
"mainFile": {
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"fileName": "Contract.pdf",
"mimeType": "application/pdf",
"pageCount": 12,
"size": 724158
},
"metadataDefinition": "d_default",
"metadataFields": {
"D_DEFAULT_DESCRIPTION": "Quarterly maintenance contract"
},
"owner": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"signatureProvider": "internal",
"signatures": [
{
"certificate": {
"fingerprintSha256": "A13767DDACA2D1B0ACAEB7CD3145D3D1CE14E208106318968FAF9882C8423F43",
"hasQcComplianceStatement": true,
"hasQcSscdStatement": true,
"isSelfSigned": true,
"issuer": "CN=Example Qualified CA,O=Example Trust Services,C=CZ",
"keyUsage": [
"digitalSignature",
"nonRepudiation"
],
"qcTypes": [
"eseal"
],
"serialNumber": "4DC32DD214A19795A2111484900663142F513989",
"signatureAlgorithm": "SHA256withRSA",
"subject": "CN=Example Ltd,O=Example Ltd,C=CZ",
"trustLists": [
"EUTL"
],
"validityEndsAt": "2024-11-02T09:15:30.000Z",
"validityStartsAt": "2024-11-02T09:15:30.000Z"
},
"comment": "Reviewed and approved",
"hasLongTermValidationData": true,
"isTimestamped": true,
"isVerified": true,
"sealProvider": "company-qseal",
"signatureProvider": "internal",
"signedAt": "2024-11-02T09:15:30.000Z",
"signedBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"signerName": "John Doe",
"timestampAuthority": "CN=Example TSA,O=Example Trust Services,C=CZ",
"tsaServer": "primary",
"type": "signature"
}
],
"submittedFiles": [
{
"createdAt": "2024-11-02T09:15:30.000Z",
"createdBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"fileName": "SignedConsentForm.pdf",
"isPublic": false,
"mimeType": "application/pdf",
"pageCount": 8,
"size": 522481
}
],
"templateId": "cba71ea5-9a68-431a-a5c2-6d9932792ec7",
"term": {
"nonFixedTerm": {
"noticePeriod": "3M",
"terminationStartedAt": "2024-11-02T09:15:30.000Z"
},
"reminders": [
{
"notifyOwner": true,
"period": "30d",
"recipients": [
{
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
}
],
"scheduledAt": "2024-11-02T09:15:30.000Z",
"sentAt": "2024-11-02T09:15:30.000Z",
"status": "scheduled",
"time": "09:00",
"timeZone": "Europe/Prague"
}
],
"renewal": {
"lastRenewedAt": "2024-11-02T09:15:30.000Z",
"latestExpiresAt": "2030-12-31T22:59:59.999Z",
"maxRenewals": 5,
"mode": "auto",
"noticeDueAt": "2027-03-31T22:00:00.000Z",
"noticePeriod": "3M",
"period": "1y",
"renewalCount": 2
},
"type": "fixed_term"
},
"title": "Client agreement",
"transaction": {
"completedAt": "2024-11-02T09:15:30.000Z",
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc590",
"status": "not-started",
"waitingFor": [
{
"expiresAt": "2024-11-02T09:15:30.000Z",
"hasTurn": true,
"order": 1,
"purpose": "sign",
"recipient": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"turnStartedAt": "2024-11-02T09:15:30.000Z"
}
]
},
"trashed": false,
"webUrl": "https://sandbox.circularo.com/home/detail?select=a0d01c9d-f72f-4c57-af11-e26bda19cc59"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"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": 429,
"type": "SYSTEM:RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Documents
Retrieve a document
GET /documents/{id}
Retrieves a document by its identifier, whether it is active or in the trash. The returned trashed field indicates which of the two it is.
Response headers
ETag— An opaque validator for the resource’s current version.
Retrieve a document
curl --request GET \
--url https://sandbox.circularo.com/api/v2/documents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox.circularo.com/api/v2/documents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.circularo.com/api/v2/documents/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.circularo.com/api/v2/documents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v2/documents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v2/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"annotations": [
{
"addedAt": "2024-11-02T09:15:30.000Z",
"addedBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"comment": "Reviewed and approved",
"text": "Approved",
"type": "annotation_generic"
}
],
"attachments": [
{
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"fileName": "LegalNotes.docx",
"isMerged": false,
"isPublic": false,
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"pageCount": 8,
"size": 522481
}
],
"category": "Contract",
"createdAt": "2024-11-02T09:15:30.000Z",
"createdBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"customFields": [
{
"displayName": "Internal reference",
"key": "internalReference",
"value": "ACME-2026-001",
"type": "string"
}
],
"expiresAt": "2026-12-31T22:59:59.999Z",
"folders": [
{
"folderId": "97cfb9de-92dd-413a-b5e7-175eff7506d6",
"scope": "personal"
}
],
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"images": [
{
"addedAt": "2024-11-02T09:15:30.000Z",
"addedBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"comment": "Company logo",
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"
}
],
"mainFile": {
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"fileName": "Contract.pdf",
"mimeType": "application/pdf",
"pageCount": 12,
"size": 724158
},
"metadataDefinition": "d_default",
"metadataFields": {
"D_DEFAULT_DESCRIPTION": "Quarterly maintenance contract"
},
"owner": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"signatureProvider": "internal",
"signatures": [
{
"certificate": {
"fingerprintSha256": "A13767DDACA2D1B0ACAEB7CD3145D3D1CE14E208106318968FAF9882C8423F43",
"hasQcComplianceStatement": true,
"hasQcSscdStatement": true,
"isSelfSigned": true,
"issuer": "CN=Example Qualified CA,O=Example Trust Services,C=CZ",
"keyUsage": [
"digitalSignature",
"nonRepudiation"
],
"qcTypes": [
"eseal"
],
"serialNumber": "4DC32DD214A19795A2111484900663142F513989",
"signatureAlgorithm": "SHA256withRSA",
"subject": "CN=Example Ltd,O=Example Ltd,C=CZ",
"trustLists": [
"EUTL"
],
"validityEndsAt": "2024-11-02T09:15:30.000Z",
"validityStartsAt": "2024-11-02T09:15:30.000Z"
},
"comment": "Reviewed and approved",
"hasLongTermValidationData": true,
"isTimestamped": true,
"isVerified": true,
"sealProvider": "company-qseal",
"signatureProvider": "internal",
"signedAt": "2024-11-02T09:15:30.000Z",
"signedBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"signerName": "John Doe",
"timestampAuthority": "CN=Example TSA,O=Example Trust Services,C=CZ",
"tsaServer": "primary",
"type": "signature"
}
],
"submittedFiles": [
{
"createdAt": "2024-11-02T09:15:30.000Z",
"createdBy": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"fileId": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"fileName": "SignedConsentForm.pdf",
"isPublic": false,
"mimeType": "application/pdf",
"pageCount": 8,
"size": 522481
}
],
"templateId": "cba71ea5-9a68-431a-a5c2-6d9932792ec7",
"term": {
"nonFixedTerm": {
"noticePeriod": "3M",
"terminationStartedAt": "2024-11-02T09:15:30.000Z"
},
"reminders": [
{
"notifyOwner": true,
"period": "30d",
"recipients": [
{
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
}
],
"scheduledAt": "2024-11-02T09:15:30.000Z",
"sentAt": "2024-11-02T09:15:30.000Z",
"status": "scheduled",
"time": "09:00",
"timeZone": "Europe/Prague"
}
],
"renewal": {
"lastRenewedAt": "2024-11-02T09:15:30.000Z",
"latestExpiresAt": "2030-12-31T22:59:59.999Z",
"maxRenewals": 5,
"mode": "auto",
"noticeDueAt": "2027-03-31T22:00:00.000Z",
"noticePeriod": "3M",
"period": "1y",
"renewalCount": 2
},
"type": "fixed_term"
},
"title": "Client agreement",
"transaction": {
"completedAt": "2024-11-02T09:15:30.000Z",
"id": "a0d01c9d-f72f-4c57-af11-e26bda19cc590",
"status": "not-started",
"waitingFor": [
{
"expiresAt": "2024-11-02T09:15:30.000Z",
"hasTurn": true,
"order": 1,
"purpose": "sign",
"recipient": {
"email": "jane.doe@example.com",
"fullname": "Jane Doe",
"userId": "jane.doe@example.com"
},
"turnStartedAt": "2024-11-02T09:15:30.000Z"
}
]
},
"trashed": false,
"webUrl": "https://sandbox.circularo.com/home/detail?select=a0d01c9d-f72f-4c57-af11-e26bda19cc59"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"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": 429,
"type": "SYSTEM:RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Path Parameters
Response
The document was found and returned.
A single document: its metadata, files, field values and lifecycle status.
The provider used to sign this document. A transaction fixes it — from the signatureProvider that transaction was created with, or from your account default at the moment the first signature is applied — and it cannot be changed afterwards. Null until a transaction has fixed it.
internal: The certificate Circularo manages for your environment.datasure: Datasure, an external trust service provider. Requires a Datasure certificate and Datasure account configured in your environment.emdha: EMDHA, the Saudi national digital signature service. The signer completes the signature in the web app.uaePassSign: UAE PASS, the national digital identity service of the United Arab Emirates. The signer completes the signature in the web app.icaQualified: I.CA qualified certificates on a hardware token. The signer completes the signature in the web app, using their own device.icaSwStore: I.CA certificates from the signer's software certificate store. The signer completes the signature in the web app, using their own device.
Available options:
internal, datasure, emdha, uaePassSign, icaQualified, icaSwStore, null Example:
"internal"