curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/export?token=' \
--header 'Content-Type: application/json' \
--data '
{
"exporterName": "pdf",
"query": {
"activity": {
"states": [
"signing"
],
"requests": [
"sign"
]
},
"aggs": {},
"allowFolders": true,
"assignedToGroups": [
"accounting"
],
"createdByGroups": [
"accounting"
],
"esFilters": [
{}
],
"esQuery": [
{}
],
"exclude": [
"file",
"workflow.history"
],
"fields": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
],
"filters": {
"document": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
],
"history": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
],
"workflow": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
]
},
"folder": {
"folder": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"global": false,
"recursive": false
},
"from": 0,
"highlight": {},
"inbox": true,
"lastAction": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
],
"lastActivity": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
],
"lastRequest": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
],
"limit": 20,
"nested_queryStrings": [
{}
],
"page": 0,
"query_string": {},
"scroll": {
"id": "<string>",
"timeout": 30
},
"signable": true,
"size": 100,
"sort": [
{}
],
"tags": {
"and": false,
"any": [
"invoice"
],
"global": [
"invoice"
],
"user": [
"to-review"
]
},
"trash": true,
"type": "d_default",
"unreadOnly": true,
"workflow": "wf_archive"
},
"downloadToken": "<string>",
"options": {
"includeAuditTrail": true,
"combineFiles": false
}
}
'import requests
url = "https://sandbox.circularo.com/api/v1/export?token="
payload = {
"exporterName": "pdf",
"query": {
"activity": {
"states": ["signing"],
"requests": ["sign"]
},
"aggs": {},
"allowFolders": True,
"assignedToGroups": ["accounting"],
"createdByGroups": ["accounting"],
"esFilters": [{}],
"esQuery": [{}],
"exclude": ["file", "workflow.history"],
"fields": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
],
"filters": {
"document": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
],
"history": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
],
"workflow": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
]
},
"folder": {
"folder": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"global": False,
"recursive": False
},
"from": 0,
"highlight": {},
"inbox": True,
"lastAction": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
],
"lastActivity": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
],
"lastRequest": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
],
"limit": 20,
"nested_queryStrings": [{}],
"page": 0,
"query_string": {},
"scroll": {
"id": "<string>",
"timeout": 30
},
"signable": True,
"size": 100,
"sort": [{}],
"tags": {
"and": False,
"any": ["invoice"],
"global": ["invoice"],
"user": ["to-review"]
},
"trash": True,
"type": "d_default",
"unreadOnly": True,
"workflow": "wf_archive"
},
"downloadToken": "<string>",
"options": {
"includeAuditTrail": True,
"combineFiles": False
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
exporterName: 'pdf',
query: {
activity: {states: ['signing'], requests: ['sign']},
aggs: {},
allowFolders: true,
assignedToGroups: ['accounting'],
createdByGroups: ['accounting'],
esFilters: [{}],
esQuery: [{}],
exclude: ['file', 'workflow.history'],
fields: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}],
filters: {
document: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}],
history: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}],
workflow: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}]
},
folder: {
folder: '8b312068-ecdf-4fa6-8f13-c6183da85f43',
global: false,
recursive: false
},
from: 0,
highlight: {},
inbox: true,
lastAction: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}],
lastActivity: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}],
lastRequest: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}],
limit: 20,
nested_queryStrings: [{}],
page: 0,
query_string: {},
scroll: {id: '<string>', timeout: 30},
signable: true,
size: 100,
sort: [{}],
tags: {and: false, any: ['invoice'], global: ['invoice'], user: ['to-review']},
trash: true,
type: 'd_default',
unreadOnly: true,
workflow: 'wf_archive'
},
downloadToken: '<string>',
options: {includeAuditTrail: true, combineFiles: false}
})
};
fetch('https://sandbox.circularo.com/api/v1/export?token=', 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/v1/export?token=",
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([
'exporterName' => 'pdf',
'query' => [
'activity' => [
'states' => [
'signing'
],
'requests' => [
'sign'
]
],
'aggs' => [
],
'allowFolders' => true,
'assignedToGroups' => [
'accounting'
],
'createdByGroups' => [
'accounting'
],
'esFilters' => [
[
]
],
'esQuery' => [
[
]
],
'exclude' => [
'file',
'workflow.history'
],
'fields' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
],
'filters' => [
'document' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
],
'history' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
],
'workflow' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
]
],
'folder' => [
'folder' => '8b312068-ecdf-4fa6-8f13-c6183da85f43',
'global' => false,
'recursive' => false
],
'from' => 0,
'highlight' => [
],
'inbox' => true,
'lastAction' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
],
'lastActivity' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
],
'lastRequest' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
],
'limit' => 20,
'nested_queryStrings' => [
[
]
],
'page' => 0,
'query_string' => [
],
'scroll' => [
'id' => '<string>',
'timeout' => 30
],
'signable' => true,
'size' => 100,
'sort' => [
[
]
],
'tags' => [
'and' => false,
'any' => [
'invoice'
],
'global' => [
'invoice'
],
'user' => [
'to-review'
]
],
'trash' => true,
'type' => 'd_default',
'unreadOnly' => true,
'workflow' => 'wf_archive'
],
'downloadToken' => '<string>',
'options' => [
'includeAuditTrail' => true,
'combineFiles' => false
]
]),
CURLOPT_HTTPHEADER => [
"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/v1/export?token="
payload := strings.NewReader("{\n \"exporterName\": \"pdf\",\n \"query\": {\n \"activity\": {\n \"states\": [\n \"signing\"\n ],\n \"requests\": [\n \"sign\"\n ]\n },\n \"aggs\": {},\n \"allowFolders\": true,\n \"assignedToGroups\": [\n \"accounting\"\n ],\n \"createdByGroups\": [\n \"accounting\"\n ],\n \"esFilters\": [\n {}\n ],\n \"esQuery\": [\n {}\n ],\n \"exclude\": [\n \"file\",\n \"workflow.history\"\n ],\n \"fields\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"filters\": {\n \"document\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"history\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"workflow\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ]\n },\n \"folder\": {\n \"folder\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"global\": false,\n \"recursive\": false\n },\n \"from\": 0,\n \"highlight\": {},\n \"inbox\": true,\n \"lastAction\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"lastActivity\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"lastRequest\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"limit\": 20,\n \"nested_queryStrings\": [\n {}\n ],\n \"page\": 0,\n \"query_string\": {},\n \"scroll\": {\n \"id\": \"<string>\",\n \"timeout\": 30\n },\n \"signable\": true,\n \"size\": 100,\n \"sort\": [\n {}\n ],\n \"tags\": {\n \"and\": false,\n \"any\": [\n \"invoice\"\n ],\n \"global\": [\n \"invoice\"\n ],\n \"user\": [\n \"to-review\"\n ]\n },\n \"trash\": true,\n \"type\": \"d_default\",\n \"unreadOnly\": true,\n \"workflow\": \"wf_archive\"\n },\n \"downloadToken\": \"<string>\",\n \"options\": {\n \"includeAuditTrail\": true,\n \"combineFiles\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/export?token=")
.header("Content-Type", "application/json")
.body("{\n \"exporterName\": \"pdf\",\n \"query\": {\n \"activity\": {\n \"states\": [\n \"signing\"\n ],\n \"requests\": [\n \"sign\"\n ]\n },\n \"aggs\": {},\n \"allowFolders\": true,\n \"assignedToGroups\": [\n \"accounting\"\n ],\n \"createdByGroups\": [\n \"accounting\"\n ],\n \"esFilters\": [\n {}\n ],\n \"esQuery\": [\n {}\n ],\n \"exclude\": [\n \"file\",\n \"workflow.history\"\n ],\n \"fields\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"filters\": {\n \"document\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"history\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"workflow\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ]\n },\n \"folder\": {\n \"folder\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"global\": false,\n \"recursive\": false\n },\n \"from\": 0,\n \"highlight\": {},\n \"inbox\": true,\n \"lastAction\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"lastActivity\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"lastRequest\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"limit\": 20,\n \"nested_queryStrings\": [\n {}\n ],\n \"page\": 0,\n \"query_string\": {},\n \"scroll\": {\n \"id\": \"<string>\",\n \"timeout\": 30\n },\n \"signable\": true,\n \"size\": 100,\n \"sort\": [\n {}\n ],\n \"tags\": {\n \"and\": false,\n \"any\": [\n \"invoice\"\n ],\n \"global\": [\n \"invoice\"\n ],\n \"user\": [\n \"to-review\"\n ]\n },\n \"trash\": true,\n \"type\": \"d_default\",\n \"unreadOnly\": true,\n \"workflow\": \"wf_archive\"\n },\n \"downloadToken\": \"<string>\",\n \"options\": {\n \"includeAuditTrail\": true,\n \"combineFiles\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/export?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"exporterName\": \"pdf\",\n \"query\": {\n \"activity\": {\n \"states\": [\n \"signing\"\n ],\n \"requests\": [\n \"sign\"\n ]\n },\n \"aggs\": {},\n \"allowFolders\": true,\n \"assignedToGroups\": [\n \"accounting\"\n ],\n \"createdByGroups\": [\n \"accounting\"\n ],\n \"esFilters\": [\n {}\n ],\n \"esQuery\": [\n {}\n ],\n \"exclude\": [\n \"file\",\n \"workflow.history\"\n ],\n \"fields\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"filters\": {\n \"document\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"history\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"workflow\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ]\n },\n \"folder\": {\n \"folder\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"global\": false,\n \"recursive\": false\n },\n \"from\": 0,\n \"highlight\": {},\n \"inbox\": true,\n \"lastAction\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"lastActivity\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"lastRequest\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"limit\": 20,\n \"nested_queryStrings\": [\n {}\n ],\n \"page\": 0,\n \"query_string\": {},\n \"scroll\": {\n \"id\": \"<string>\",\n \"timeout\": 30\n },\n \"signable\": true,\n \"size\": 100,\n \"sort\": [\n {}\n ],\n \"tags\": {\n \"and\": false,\n \"any\": [\n \"invoice\"\n ],\n \"global\": [\n \"invoice\"\n ],\n \"user\": [\n \"to-review\"\n ]\n },\n \"trash\": true,\n \"type\": \"d_default\",\n \"unreadOnly\": true,\n \"workflow\": \"wf_archive\"\n },\n \"downloadToken\": \"<string>\",\n \"options\": {\n \"includeAuditTrail\": true,\n \"combineFiles\": false\n }\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"
}Export documents
POST /export
Runs one of the exporters listed by GET /export over the documents a search selects, and answers with whatever that exporter produces. The selection reaches only the documents the caller may read - the one exception being the reporting exporter, which covers the caller’s whole organization for a caller holding the use_all_documents_export right.
A client has to be ready for four shapes of answer, because the exporter decides which one it is: the exported file itself; a ZIP archive, when the exporter handed back several files and they had to be packed together; a body holding nothing but a jobId, when the work was moved into a background job; and a plain acknowledgement, from an exporter whose result is not a file at all - mail, which sends the document to the addresses in its options.
A background job is announced through the jobId and then reports for itself: it appears in the caller’s own backgroundJobs list with a status, and once it succeeds the entry carries the hash of the finished file, which is then downloaded like any other file. An export moves that way either because the exporter is a background one and the selection crosses the tenant’s background threshold, or because the request asked for it outright through the exporter’s forceBackground option.
Not every exporter reads query: folder exports what options.documentIds names - documents by their own identifier, folders by everything filed under them - and userData exports all of the caller’s own documents, both ignoring the search entirely. To find out beforehand how much a request would take in, ask POST /export/count.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/export?token=' \
--header 'Content-Type: application/json' \
--data '
{
"exporterName": "pdf",
"query": {
"activity": {
"states": [
"signing"
],
"requests": [
"sign"
]
},
"aggs": {},
"allowFolders": true,
"assignedToGroups": [
"accounting"
],
"createdByGroups": [
"accounting"
],
"esFilters": [
{}
],
"esQuery": [
{}
],
"exclude": [
"file",
"workflow.history"
],
"fields": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
],
"filters": {
"document": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
],
"history": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
],
"workflow": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
]
},
"folder": {
"folder": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"global": false,
"recursive": false
},
"from": 0,
"highlight": {},
"inbox": true,
"lastAction": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
],
"lastActivity": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
],
"lastRequest": [
{
"field": "documentType",
"type": "term",
"inverse": true,
"value": "d_default"
}
],
"limit": 20,
"nested_queryStrings": [
{}
],
"page": 0,
"query_string": {},
"scroll": {
"id": "<string>",
"timeout": 30
},
"signable": true,
"size": 100,
"sort": [
{}
],
"tags": {
"and": false,
"any": [
"invoice"
],
"global": [
"invoice"
],
"user": [
"to-review"
]
},
"trash": true,
"type": "d_default",
"unreadOnly": true,
"workflow": "wf_archive"
},
"downloadToken": "<string>",
"options": {
"includeAuditTrail": true,
"combineFiles": false
}
}
'import requests
url = "https://sandbox.circularo.com/api/v1/export?token="
payload = {
"exporterName": "pdf",
"query": {
"activity": {
"states": ["signing"],
"requests": ["sign"]
},
"aggs": {},
"allowFolders": True,
"assignedToGroups": ["accounting"],
"createdByGroups": ["accounting"],
"esFilters": [{}],
"esQuery": [{}],
"exclude": ["file", "workflow.history"],
"fields": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
],
"filters": {
"document": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
],
"history": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
],
"workflow": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
]
},
"folder": {
"folder": "8b312068-ecdf-4fa6-8f13-c6183da85f43",
"global": False,
"recursive": False
},
"from": 0,
"highlight": {},
"inbox": True,
"lastAction": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
],
"lastActivity": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
],
"lastRequest": [
{
"field": "documentType",
"type": "term",
"inverse": True,
"value": "d_default"
}
],
"limit": 20,
"nested_queryStrings": [{}],
"page": 0,
"query_string": {},
"scroll": {
"id": "<string>",
"timeout": 30
},
"signable": True,
"size": 100,
"sort": [{}],
"tags": {
"and": False,
"any": ["invoice"],
"global": ["invoice"],
"user": ["to-review"]
},
"trash": True,
"type": "d_default",
"unreadOnly": True,
"workflow": "wf_archive"
},
"downloadToken": "<string>",
"options": {
"includeAuditTrail": True,
"combineFiles": False
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
exporterName: 'pdf',
query: {
activity: {states: ['signing'], requests: ['sign']},
aggs: {},
allowFolders: true,
assignedToGroups: ['accounting'],
createdByGroups: ['accounting'],
esFilters: [{}],
esQuery: [{}],
exclude: ['file', 'workflow.history'],
fields: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}],
filters: {
document: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}],
history: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}],
workflow: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}]
},
folder: {
folder: '8b312068-ecdf-4fa6-8f13-c6183da85f43',
global: false,
recursive: false
},
from: 0,
highlight: {},
inbox: true,
lastAction: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}],
lastActivity: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}],
lastRequest: [{field: 'documentType', type: 'term', inverse: true, value: 'd_default'}],
limit: 20,
nested_queryStrings: [{}],
page: 0,
query_string: {},
scroll: {id: '<string>', timeout: 30},
signable: true,
size: 100,
sort: [{}],
tags: {and: false, any: ['invoice'], global: ['invoice'], user: ['to-review']},
trash: true,
type: 'd_default',
unreadOnly: true,
workflow: 'wf_archive'
},
downloadToken: '<string>',
options: {includeAuditTrail: true, combineFiles: false}
})
};
fetch('https://sandbox.circularo.com/api/v1/export?token=', 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/v1/export?token=",
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([
'exporterName' => 'pdf',
'query' => [
'activity' => [
'states' => [
'signing'
],
'requests' => [
'sign'
]
],
'aggs' => [
],
'allowFolders' => true,
'assignedToGroups' => [
'accounting'
],
'createdByGroups' => [
'accounting'
],
'esFilters' => [
[
]
],
'esQuery' => [
[
]
],
'exclude' => [
'file',
'workflow.history'
],
'fields' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
],
'filters' => [
'document' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
],
'history' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
],
'workflow' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
]
],
'folder' => [
'folder' => '8b312068-ecdf-4fa6-8f13-c6183da85f43',
'global' => false,
'recursive' => false
],
'from' => 0,
'highlight' => [
],
'inbox' => true,
'lastAction' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
],
'lastActivity' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
],
'lastRequest' => [
[
'field' => 'documentType',
'type' => 'term',
'inverse' => true,
'value' => 'd_default'
]
],
'limit' => 20,
'nested_queryStrings' => [
[
]
],
'page' => 0,
'query_string' => [
],
'scroll' => [
'id' => '<string>',
'timeout' => 30
],
'signable' => true,
'size' => 100,
'sort' => [
[
]
],
'tags' => [
'and' => false,
'any' => [
'invoice'
],
'global' => [
'invoice'
],
'user' => [
'to-review'
]
],
'trash' => true,
'type' => 'd_default',
'unreadOnly' => true,
'workflow' => 'wf_archive'
],
'downloadToken' => '<string>',
'options' => [
'includeAuditTrail' => true,
'combineFiles' => false
]
]),
CURLOPT_HTTPHEADER => [
"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/v1/export?token="
payload := strings.NewReader("{\n \"exporterName\": \"pdf\",\n \"query\": {\n \"activity\": {\n \"states\": [\n \"signing\"\n ],\n \"requests\": [\n \"sign\"\n ]\n },\n \"aggs\": {},\n \"allowFolders\": true,\n \"assignedToGroups\": [\n \"accounting\"\n ],\n \"createdByGroups\": [\n \"accounting\"\n ],\n \"esFilters\": [\n {}\n ],\n \"esQuery\": [\n {}\n ],\n \"exclude\": [\n \"file\",\n \"workflow.history\"\n ],\n \"fields\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"filters\": {\n \"document\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"history\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"workflow\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ]\n },\n \"folder\": {\n \"folder\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"global\": false,\n \"recursive\": false\n },\n \"from\": 0,\n \"highlight\": {},\n \"inbox\": true,\n \"lastAction\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"lastActivity\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"lastRequest\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"limit\": 20,\n \"nested_queryStrings\": [\n {}\n ],\n \"page\": 0,\n \"query_string\": {},\n \"scroll\": {\n \"id\": \"<string>\",\n \"timeout\": 30\n },\n \"signable\": true,\n \"size\": 100,\n \"sort\": [\n {}\n ],\n \"tags\": {\n \"and\": false,\n \"any\": [\n \"invoice\"\n ],\n \"global\": [\n \"invoice\"\n ],\n \"user\": [\n \"to-review\"\n ]\n },\n \"trash\": true,\n \"type\": \"d_default\",\n \"unreadOnly\": true,\n \"workflow\": \"wf_archive\"\n },\n \"downloadToken\": \"<string>\",\n \"options\": {\n \"includeAuditTrail\": true,\n \"combineFiles\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/export?token=")
.header("Content-Type", "application/json")
.body("{\n \"exporterName\": \"pdf\",\n \"query\": {\n \"activity\": {\n \"states\": [\n \"signing\"\n ],\n \"requests\": [\n \"sign\"\n ]\n },\n \"aggs\": {},\n \"allowFolders\": true,\n \"assignedToGroups\": [\n \"accounting\"\n ],\n \"createdByGroups\": [\n \"accounting\"\n ],\n \"esFilters\": [\n {}\n ],\n \"esQuery\": [\n {}\n ],\n \"exclude\": [\n \"file\",\n \"workflow.history\"\n ],\n \"fields\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"filters\": {\n \"document\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"history\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"workflow\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ]\n },\n \"folder\": {\n \"folder\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"global\": false,\n \"recursive\": false\n },\n \"from\": 0,\n \"highlight\": {},\n \"inbox\": true,\n \"lastAction\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"lastActivity\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"lastRequest\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"limit\": 20,\n \"nested_queryStrings\": [\n {}\n ],\n \"page\": 0,\n \"query_string\": {},\n \"scroll\": {\n \"id\": \"<string>\",\n \"timeout\": 30\n },\n \"signable\": true,\n \"size\": 100,\n \"sort\": [\n {}\n ],\n \"tags\": {\n \"and\": false,\n \"any\": [\n \"invoice\"\n ],\n \"global\": [\n \"invoice\"\n ],\n \"user\": [\n \"to-review\"\n ]\n },\n \"trash\": true,\n \"type\": \"d_default\",\n \"unreadOnly\": true,\n \"workflow\": \"wf_archive\"\n },\n \"downloadToken\": \"<string>\",\n \"options\": {\n \"includeAuditTrail\": true,\n \"combineFiles\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/export?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"exporterName\": \"pdf\",\n \"query\": {\n \"activity\": {\n \"states\": [\n \"signing\"\n ],\n \"requests\": [\n \"sign\"\n ]\n },\n \"aggs\": {},\n \"allowFolders\": true,\n \"assignedToGroups\": [\n \"accounting\"\n ],\n \"createdByGroups\": [\n \"accounting\"\n ],\n \"esFilters\": [\n {}\n ],\n \"esQuery\": [\n {}\n ],\n \"exclude\": [\n \"file\",\n \"workflow.history\"\n ],\n \"fields\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"filters\": {\n \"document\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"history\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"workflow\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ]\n },\n \"folder\": {\n \"folder\": \"8b312068-ecdf-4fa6-8f13-c6183da85f43\",\n \"global\": false,\n \"recursive\": false\n },\n \"from\": 0,\n \"highlight\": {},\n \"inbox\": true,\n \"lastAction\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"lastActivity\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"lastRequest\": [\n {\n \"field\": \"documentType\",\n \"type\": \"term\",\n \"inverse\": true,\n \"value\": \"d_default\"\n }\n ],\n \"limit\": 20,\n \"nested_queryStrings\": [\n {}\n ],\n \"page\": 0,\n \"query_string\": {},\n \"scroll\": {\n \"id\": \"<string>\",\n \"timeout\": 30\n },\n \"signable\": true,\n \"size\": 100,\n \"sort\": [\n {}\n ],\n \"tags\": {\n \"and\": false,\n \"any\": [\n \"invoice\"\n ],\n \"global\": [\n \"invoice\"\n ],\n \"user\": [\n \"to-review\"\n ]\n },\n \"trash\": true,\n \"type\": \"d_default\",\n \"unreadOnly\": true,\n \"workflow\": \"wf_archive\"\n },\n \"downloadToken\": \"<string>\",\n \"options\": {\n \"includeAuditTrail\": true,\n \"combineFiles\": false\n }\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"
}Authorizations
Body
Response
Returns the exported file, an archive of several files, the identifier of the background job that will produce it, or a bare acknowledgement from an exporter that returns no data.