curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/search/reports?token=' \
--header 'Content-Type: application/json' \
--data '
{
"fields": [
"documentTitle",
"shareStateName",
"transactionDuration"
],
"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": 10,
"sort": [
{}
],
"tags": {
"and": false,
"any": [
"invoice"
],
"global": [
"invoice"
],
"user": [
"to-review"
]
},
"trash": true,
"type": "d_default",
"unreadOnly": true,
"workflow": "wf_archive"
}
}
'import requests
url = "https://sandbox.circularo.com/api/v1/search/reports?token="
payload = {
"fields": ["documentTitle", "shareStateName", "transactionDuration"],
"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": 10,
"sort": [{}],
"tags": {
"and": False,
"any": ["invoice"],
"global": ["invoice"],
"user": ["to-review"]
},
"trash": True,
"type": "d_default",
"unreadOnly": True,
"workflow": "wf_archive"
}
}
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({
fields: ['documentTitle', 'shareStateName', 'transactionDuration'],
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: 10,
sort: [{}],
tags: {and: false, any: ['invoice'], global: ['invoice'], user: ['to-review']},
trash: true,
type: 'd_default',
unreadOnly: true,
workflow: 'wf_archive'
}
})
};
fetch('https://sandbox.circularo.com/api/v1/search/reports?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/search/reports?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([
'fields' => [
'documentTitle',
'shareStateName',
'transactionDuration'
],
'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' => 10,
'sort' => [
[
]
],
'tags' => [
'and' => false,
'any' => [
'invoice'
],
'global' => [
'invoice'
],
'user' => [
'to-review'
]
],
'trash' => true,
'type' => 'd_default',
'unreadOnly' => true,
'workflow' => 'wf_archive'
]
]),
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/search/reports?token="
payload := strings.NewReader("{\n \"fields\": [\n \"documentTitle\",\n \"shareStateName\",\n \"transactionDuration\"\n ],\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\": 10,\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}")
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/search/reports?token=")
.header("Content-Type", "application/json")
.body("{\n \"fields\": [\n \"documentTitle\",\n \"shareStateName\",\n \"transactionDuration\"\n ],\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\": 10,\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/search/reports?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 \"fields\": [\n \"documentTitle\",\n \"shareStateName\",\n \"transactionDuration\"\n ],\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\": 10,\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}"
response = http.request(request)
puts response.read_body{
"aggs": {},
"from": 0,
"results": [
{
"alreadyProcessed": [
{
"date": "2023-11-07T05:31:56Z",
"dateOfReceivingTheAction": "2023-11-07T05:31:56Z",
"delegatedUser": true,
"duration": 120000,
"expiration": "2023-11-07T05:31:56Z",
"lastAction": true,
"order": 1,
"reminder": "2023-11-07T05:31:56Z",
"rights": [
"print",
"metadata"
],
"seen": true,
"selfSign": true,
"shareId": "sd0oAvfpB4k0yDf787x4",
"shareType": "sign",
"user": "jane.roe@example.com",
"verification": "sms"
}
],
"createDate": "2023-11-07T05:31:56Z",
"createName": "john.doe@example.com",
"customMetadata": {
"D_DEFAULT_DESCRIPTION": "Quarterly maintenance contract"
},
"delegations": [
{
"date": "2023-11-07T05:31:56Z",
"from": "jane.roe@example.com",
"fromShareId": "sd0oAvfpB4k0yDf787x4",
"order": 1,
"to": "john.roe@example.com",
"toShareId": "Ck4tPq7fMz1wLb92Xr0v",
"type": "sign"
}
],
"documentCategory": "Contracts",
"documentDefinition": "d_default",
"documentId": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"documentTitle": "Client agreement",
"organization": "d0a72e51-728e-4a1d-9a5c-13796122b6f8",
"owner": "john.doe@example.com",
"pages": 3,
"rights": [
{
"editGroups": [
"d0a72e51-728e-4a1d-9a5c-13796122b6f8"
],
"editUsers": [
"john.doe@example.com"
],
"readGroups": [
"d0a72e51-728e-4a1d-9a5c-13796122b6f8"
],
"readUsers": [
"john.doe@example.com"
]
}
],
"sender": "john.doe@example.com",
"sharedWith": [
"jane.roe@example.com"
],
"shareStateName": "completed",
"signingTemplate": "0a2d3b2a-2e91-4de0-a2f6-6bb2c72b9d31",
"size": 215040,
"tags": [
"contract",
"2026"
],
"totalActions": 6,
"totalProcessed": 2,
"totalRecipients": 3,
"totalWaitingFor": 1,
"transactionDuration": 86400000,
"transactionEndDate": "2023-11-07T05:31:56Z",
"transactionEndReason": "share_actions_completed",
"transactionStartDate": "2023-11-07T05:31:56Z",
"uniqueProcessedParticipants": 2,
"unused": [
{
"date": "2023-11-07T05:31:56Z",
"dateOfReceivingTheAction": "2023-11-07T05:31:56Z",
"delegatedUser": true,
"duration": 120000,
"expiration": "2023-11-07T05:31:56Z",
"lastAction": true,
"order": 1,
"reminder": "2023-11-07T05:31:56Z",
"rights": [
"print",
"metadata"
],
"seen": true,
"selfSign": true,
"shareId": "sd0oAvfpB4k0yDf787x4",
"shareType": "sign",
"user": "jane.roe@example.com",
"verification": "sms"
}
],
"waitingFor": [
{
"date": "2023-11-07T05:31:56Z",
"dateOfReceivingTheAction": "2023-11-07T05:31:56Z",
"delegatedUser": true,
"duration": 120000,
"expiration": "2023-11-07T05:31:56Z",
"lastAction": true,
"order": 1,
"reminder": "2023-11-07T05:31:56Z",
"rights": [
"print",
"metadata"
],
"seen": true,
"selfSign": true,
"shareId": "sd0oAvfpB4k0yDf787x4",
"shareType": "sign",
"user": "jane.roe@example.com",
"verification": "sms"
}
],
"waitingForTurn": [
{
"date": "2023-11-07T05:31:56Z",
"dateOfReceivingTheAction": "2023-11-07T05:31:56Z",
"delegatedUser": true,
"duration": 120000,
"expiration": "2023-11-07T05:31:56Z",
"lastAction": true,
"order": 1,
"reminder": "2023-11-07T05:31:56Z",
"rights": [
"print",
"metadata"
],
"seen": true,
"selfSign": true,
"shareId": "sd0oAvfpB4k0yDf787x4",
"shareType": "sign",
"user": "jane.roe@example.com",
"verification": "sms"
}
]
}
],
"scrollId": "8kZtoG59p8qvO4a5LepHCNaR7LGH7BKFIAU1rd5DAEBPi4pxxIA6NVOAd0GXKB1m",
"total": 137
}{
"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"
}Report on documents and their transactions
POST /search/reports
Reports on the documents a search matches, one row per document, pairing what each document is with how the transaction on it has gone.
A row carries the document’s own facts - its title, identifier, metadata definition, category, owner and creator, its size and page count, its tags, permissions and metadata field values - next to the transaction: where it stands, who started it, when it began and ended, how long it ran and what closed it. The actions asked for on the document come with it, sorted by where each of them stands: carried out, awaited now, still to come, and no longer needed because the round they belonged to was satisfied without them. Handovers are listed apart from those, as a ledger of who passed which action to whom.
The report reaches past the documents the caller has to do with, out to those of the whole organization they belong to, which is what separates it from a plain search; the query then narrows that down. Rows are paged by the search’s own paging, so a report is read a page at a time like any other result set.
Because a row is a large object of which most reports need only a handful of properties, fields cuts it down to the ones asked for. A search matching no document at all is answered as not found rather than as an empty report.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
Required user rights: use_all_documents_export
curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/search/reports?token=' \
--header 'Content-Type: application/json' \
--data '
{
"fields": [
"documentTitle",
"shareStateName",
"transactionDuration"
],
"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": 10,
"sort": [
{}
],
"tags": {
"and": false,
"any": [
"invoice"
],
"global": [
"invoice"
],
"user": [
"to-review"
]
},
"trash": true,
"type": "d_default",
"unreadOnly": true,
"workflow": "wf_archive"
}
}
'import requests
url = "https://sandbox.circularo.com/api/v1/search/reports?token="
payload = {
"fields": ["documentTitle", "shareStateName", "transactionDuration"],
"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": 10,
"sort": [{}],
"tags": {
"and": False,
"any": ["invoice"],
"global": ["invoice"],
"user": ["to-review"]
},
"trash": True,
"type": "d_default",
"unreadOnly": True,
"workflow": "wf_archive"
}
}
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({
fields: ['documentTitle', 'shareStateName', 'transactionDuration'],
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: 10,
sort: [{}],
tags: {and: false, any: ['invoice'], global: ['invoice'], user: ['to-review']},
trash: true,
type: 'd_default',
unreadOnly: true,
workflow: 'wf_archive'
}
})
};
fetch('https://sandbox.circularo.com/api/v1/search/reports?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/search/reports?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([
'fields' => [
'documentTitle',
'shareStateName',
'transactionDuration'
],
'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' => 10,
'sort' => [
[
]
],
'tags' => [
'and' => false,
'any' => [
'invoice'
],
'global' => [
'invoice'
],
'user' => [
'to-review'
]
],
'trash' => true,
'type' => 'd_default',
'unreadOnly' => true,
'workflow' => 'wf_archive'
]
]),
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/search/reports?token="
payload := strings.NewReader("{\n \"fields\": [\n \"documentTitle\",\n \"shareStateName\",\n \"transactionDuration\"\n ],\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\": 10,\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}")
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/search/reports?token=")
.header("Content-Type", "application/json")
.body("{\n \"fields\": [\n \"documentTitle\",\n \"shareStateName\",\n \"transactionDuration\"\n ],\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\": 10,\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/search/reports?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 \"fields\": [\n \"documentTitle\",\n \"shareStateName\",\n \"transactionDuration\"\n ],\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\": 10,\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}"
response = http.request(request)
puts response.read_body{
"aggs": {},
"from": 0,
"results": [
{
"alreadyProcessed": [
{
"date": "2023-11-07T05:31:56Z",
"dateOfReceivingTheAction": "2023-11-07T05:31:56Z",
"delegatedUser": true,
"duration": 120000,
"expiration": "2023-11-07T05:31:56Z",
"lastAction": true,
"order": 1,
"reminder": "2023-11-07T05:31:56Z",
"rights": [
"print",
"metadata"
],
"seen": true,
"selfSign": true,
"shareId": "sd0oAvfpB4k0yDf787x4",
"shareType": "sign",
"user": "jane.roe@example.com",
"verification": "sms"
}
],
"createDate": "2023-11-07T05:31:56Z",
"createName": "john.doe@example.com",
"customMetadata": {
"D_DEFAULT_DESCRIPTION": "Quarterly maintenance contract"
},
"delegations": [
{
"date": "2023-11-07T05:31:56Z",
"from": "jane.roe@example.com",
"fromShareId": "sd0oAvfpB4k0yDf787x4",
"order": 1,
"to": "john.roe@example.com",
"toShareId": "Ck4tPq7fMz1wLb92Xr0v",
"type": "sign"
}
],
"documentCategory": "Contracts",
"documentDefinition": "d_default",
"documentId": "a0d01c9d-f72f-4c57-af11-e26bda19cc59",
"documentTitle": "Client agreement",
"organization": "d0a72e51-728e-4a1d-9a5c-13796122b6f8",
"owner": "john.doe@example.com",
"pages": 3,
"rights": [
{
"editGroups": [
"d0a72e51-728e-4a1d-9a5c-13796122b6f8"
],
"editUsers": [
"john.doe@example.com"
],
"readGroups": [
"d0a72e51-728e-4a1d-9a5c-13796122b6f8"
],
"readUsers": [
"john.doe@example.com"
]
}
],
"sender": "john.doe@example.com",
"sharedWith": [
"jane.roe@example.com"
],
"shareStateName": "completed",
"signingTemplate": "0a2d3b2a-2e91-4de0-a2f6-6bb2c72b9d31",
"size": 215040,
"tags": [
"contract",
"2026"
],
"totalActions": 6,
"totalProcessed": 2,
"totalRecipients": 3,
"totalWaitingFor": 1,
"transactionDuration": 86400000,
"transactionEndDate": "2023-11-07T05:31:56Z",
"transactionEndReason": "share_actions_completed",
"transactionStartDate": "2023-11-07T05:31:56Z",
"uniqueProcessedParticipants": 2,
"unused": [
{
"date": "2023-11-07T05:31:56Z",
"dateOfReceivingTheAction": "2023-11-07T05:31:56Z",
"delegatedUser": true,
"duration": 120000,
"expiration": "2023-11-07T05:31:56Z",
"lastAction": true,
"order": 1,
"reminder": "2023-11-07T05:31:56Z",
"rights": [
"print",
"metadata"
],
"seen": true,
"selfSign": true,
"shareId": "sd0oAvfpB4k0yDf787x4",
"shareType": "sign",
"user": "jane.roe@example.com",
"verification": "sms"
}
],
"waitingFor": [
{
"date": "2023-11-07T05:31:56Z",
"dateOfReceivingTheAction": "2023-11-07T05:31:56Z",
"delegatedUser": true,
"duration": 120000,
"expiration": "2023-11-07T05:31:56Z",
"lastAction": true,
"order": 1,
"reminder": "2023-11-07T05:31:56Z",
"rights": [
"print",
"metadata"
],
"seen": true,
"selfSign": true,
"shareId": "sd0oAvfpB4k0yDf787x4",
"shareType": "sign",
"user": "jane.roe@example.com",
"verification": "sms"
}
],
"waitingForTurn": [
{
"date": "2023-11-07T05:31:56Z",
"dateOfReceivingTheAction": "2023-11-07T05:31:56Z",
"delegatedUser": true,
"duration": 120000,
"expiration": "2023-11-07T05:31:56Z",
"lastAction": true,
"order": 1,
"reminder": "2023-11-07T05:31:56Z",
"rights": [
"print",
"metadata"
],
"seen": true,
"selfSign": true,
"shareId": "sd0oAvfpB4k0yDf787x4",
"shareType": "sign",
"user": "jane.roe@example.com",
"verification": "sms"
}
]
}
],
"scrollId": "8kZtoG59p8qvO4a5LepHCNaR7LGH7BKFIAU1rd5DAEBPi4pxxIA6NVOAd0GXKB1m",
"total": 137
}{
"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"
}Authorizations
Body
Properties of a report row to keep, everything else being left out. Left empty, a row comes back whole. A name nothing in a row answers to is ignored, and a selection that would leave a row with nothing in it at all is refused.
[
"documentTitle",
"shareStateName",
"transactionDuration"
]
Response
Returns a report row for every document the search matched.