curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/documents/{id}/extract?token=' \
--header 'Content-Type: application/json' \
--data '
{
"extractTermDates": false,
"language": "en",
"summaryOnly": false
}
'import requests
url = "https://sandbox.circularo.com/api/v1/documents/{id}/extract?token="
payload = {
"extractTermDates": False,
"language": "en",
"summaryOnly": 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({extractTermDates: false, language: 'en', summaryOnly: false})
};
fetch('https://sandbox.circularo.com/api/v1/documents/{id}/extract?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/documents/{id}/extract?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([
'extractTermDates' => false,
'language' => 'en',
'summaryOnly' => 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/documents/{id}/extract?token="
payload := strings.NewReader("{\n \"extractTermDates\": false,\n \"language\": \"en\",\n \"summaryOnly\": false\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/documents/{id}/extract?token=")
.header("Content-Type", "application/json")
.body("{\n \"extractTermDates\": false,\n \"language\": \"en\",\n \"summaryOnly\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/documents/{id}/extract?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 \"extractTermDates\": false,\n \"language\": \"en\",\n \"summaryOnly\": false\n}"
response = http.request(request)
puts response.read_body{
"analysisError": {
"message": "The AI service did not answer in time.",
"reason": "timeout",
"retryable": true,
"type": "INTEGRATION:CONNECTION_TIMEOUT"
},
"category": {
"available": true,
"value": "Contract"
},
"labels": {
"available": true,
"value": [
"legal agreement",
"intellectual property",
"service contract"
]
},
"language": "en",
"pii": {
"available": true,
"value": [
"Bank Account Number",
"Financial Statements or Invoices"
]
},
"sensitivity": {
"available": true,
"value": "Confidential"
},
"summary": {
"available": true,
"keyPoints": [
"<string>"
],
"value": "<string>"
},
"summaryStored": true,
"termSuggestions": {
"available": true,
"error": {
"message": "The AI service did not answer in time.",
"reason": "timeout",
"retryable": true,
"type": "INTEGRATION:CONNECTION_TIMEOUT"
},
"expiresOn": [
{
"applicable": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"dateOrder": "unambiguous",
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "2027-12-31",
"warnings": [
"in_past"
]
}
],
"isAgreement": true,
"locatorAvailable": true,
"nonFixedTermNoticePeriod": [
{
"applicable": true,
"businessDays": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"purpose": "non_renewal",
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "1y",
"warnings": [
"in_past"
]
}
],
"nonFixedTermTerminationStartDate": [
{
"applicable": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"dateOrder": "unambiguous",
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "2027-12-31",
"warnings": [
"in_past"
]
}
],
"omittedPages": {
"from": 2,
"to": 2
},
"pageCount": 1,
"pagesWithText": 1,
"reminders": [
{
"applicable": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": {
"notifyOwner": true,
"period": "30d",
"recipients": [
"jane.doe@example.com"
],
"time": "09:00"
},
"warnings": [
"in_past"
]
}
],
"renewalFinalDate": [
{
"applicable": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"dateOrder": "unambiguous",
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "2027-12-31",
"warnings": [
"in_past"
]
}
],
"renewalMaxRenewals": [
{
"applicable": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": 50,
"warnings": [
"in_past"
]
}
],
"renewalNoticePeriod": [
{
"applicable": true,
"businessDays": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"purpose": "non_renewal",
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "1y",
"warnings": [
"in_past"
]
}
],
"renewalPeriod": [
{
"applicable": true,
"businessDays": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"purpose": "non_renewal",
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "1y",
"warnings": [
"in_past"
]
}
],
"renewalType": [
{
"applicable": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "auto",
"warnings": [
"in_past"
]
}
],
"searchIncomplete": true,
"status": "detected",
"truncated": true
}
}{
"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"
}{
"status": 500,
"type": "SYSTEM:INTERNAL_ERROR",
"message": "Internal error",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Analyze a document with a language model
POST /documents/{id}/extract
Runs the text already extracted from the document through a language model and returns what it made of it: a summary with its key points, a category taken from the ones configured for the tenant, a sensitivity label, the kinds of personal data it recognized, and tags it proposes - preferring tags already in use. The summary and its key points are written in the caller’s account language, then in the language of the caller’s settings, then in English, and the answer names the language used; the kinds of personal data are always named in English.
Asked with language or with summaryOnly, the call produces the summary section alone - the summary with its key points and the kinds of personal data - and the answer leaves out the category, the sensitivity and the tags. This is how a summary is read in another language or in a view that only reads the document, such as the Sign View; such a summary is never stored on the document. A language that is not one of the tenant’s active languages, or that the caller’s settings disable, is refused before anything is generated.
Only the summary is written back, into the document’s own summary field, and only when the caller may edit the document and asked for neither language nor summaryOnly; storing it advances the document’s version, which the answer reports. The category, the sensitivity, the personal-data findings and the tags are proposals that the client decides what to do with. Personal data is reported by kind, never quoted.
Asked with extractTermDates, the same call also detects the contract’s term, reading it straight from the document’s PDF. Every value found comes back as a suggestion with the verbatim passage it was read from, where that passage is printed - page and rectangles - and how certain that placement is; a value the platform worked out rather than read is marked as such, and several candidates for one field may come back for the caller to choose from. Nothing of the term is written to the document: applying a suggestion is an ordinary edit. When nothing can be detected the answer says why - a main file that is not a PDF, a document whose workflow state keeps it from being edited, a scan without a text layer, or a failure the caller may retry. With the term asked for, a failure of the other results does not fail the call: they come back unavailable together with the reason. The answer waits for both, which can take up to about two minutes for a long contract. For a file that is not a PDF yet, converting the file to PDF can detect the term instead.
A document whose text has not been extracted yet - because extraction has not run, or produced nothing - answers with empty analysis results rather than an error, so this can be called without checking the extraction state first. The term detection does not depend on that extraction.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
Required user rights: llm_extraction
curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/documents/{id}/extract?token=' \
--header 'Content-Type: application/json' \
--data '
{
"extractTermDates": false,
"language": "en",
"summaryOnly": false
}
'import requests
url = "https://sandbox.circularo.com/api/v1/documents/{id}/extract?token="
payload = {
"extractTermDates": False,
"language": "en",
"summaryOnly": 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({extractTermDates: false, language: 'en', summaryOnly: false})
};
fetch('https://sandbox.circularo.com/api/v1/documents/{id}/extract?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/documents/{id}/extract?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([
'extractTermDates' => false,
'language' => 'en',
'summaryOnly' => 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/documents/{id}/extract?token="
payload := strings.NewReader("{\n \"extractTermDates\": false,\n \"language\": \"en\",\n \"summaryOnly\": false\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/documents/{id}/extract?token=")
.header("Content-Type", "application/json")
.body("{\n \"extractTermDates\": false,\n \"language\": \"en\",\n \"summaryOnly\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/documents/{id}/extract?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 \"extractTermDates\": false,\n \"language\": \"en\",\n \"summaryOnly\": false\n}"
response = http.request(request)
puts response.read_body{
"analysisError": {
"message": "The AI service did not answer in time.",
"reason": "timeout",
"retryable": true,
"type": "INTEGRATION:CONNECTION_TIMEOUT"
},
"category": {
"available": true,
"value": "Contract"
},
"labels": {
"available": true,
"value": [
"legal agreement",
"intellectual property",
"service contract"
]
},
"language": "en",
"pii": {
"available": true,
"value": [
"Bank Account Number",
"Financial Statements or Invoices"
]
},
"sensitivity": {
"available": true,
"value": "Confidential"
},
"summary": {
"available": true,
"keyPoints": [
"<string>"
],
"value": "<string>"
},
"summaryStored": true,
"termSuggestions": {
"available": true,
"error": {
"message": "The AI service did not answer in time.",
"reason": "timeout",
"retryable": true,
"type": "INTEGRATION:CONNECTION_TIMEOUT"
},
"expiresOn": [
{
"applicable": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"dateOrder": "unambiguous",
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "2027-12-31",
"warnings": [
"in_past"
]
}
],
"isAgreement": true,
"locatorAvailable": true,
"nonFixedTermNoticePeriod": [
{
"applicable": true,
"businessDays": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"purpose": "non_renewal",
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "1y",
"warnings": [
"in_past"
]
}
],
"nonFixedTermTerminationStartDate": [
{
"applicable": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"dateOrder": "unambiguous",
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "2027-12-31",
"warnings": [
"in_past"
]
}
],
"omittedPages": {
"from": 2,
"to": 2
},
"pageCount": 1,
"pagesWithText": 1,
"reminders": [
{
"applicable": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": {
"notifyOwner": true,
"period": "30d",
"recipients": [
"jane.doe@example.com"
],
"time": "09:00"
},
"warnings": [
"in_past"
]
}
],
"renewalFinalDate": [
{
"applicable": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"dateOrder": "unambiguous",
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "2027-12-31",
"warnings": [
"in_past"
]
}
],
"renewalMaxRenewals": [
{
"applicable": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": 50,
"warnings": [
"in_past"
]
}
],
"renewalNoticePeriod": [
{
"applicable": true,
"businessDays": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"purpose": "non_renewal",
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "1y",
"warnings": [
"in_past"
]
}
],
"renewalPeriod": [
{
"applicable": true,
"businessDays": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"purpose": "non_renewal",
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "1y",
"warnings": [
"in_past"
]
}
],
"renewalType": [
{
"applicable": true,
"computation": {
"anchorDate": "2025-03-01",
"businessDays": 2,
"from": "2024-12-31",
"kind": "model",
"lead": "30d",
"noticePeriod": "3M",
"offset": "2y",
"period": "1y",
"recomputed": "2027-03-01",
"renewals": 2,
"rule": "Two years after the date of signature.",
"verified": true
},
"computed": true,
"derivedFrom": [
"expiresOn-1"
],
"duplicateValueOf": "expiresOn-1",
"errors": [
"invalid_value"
],
"id": "expiresOn-1",
"offerable": true,
"origin": "document",
"preferred": true,
"rawValue": "2027-02-30",
"sources": [
{
"documentText": "This Agreement is concluded for a fixed term until 31 December 2027.",
"issues": [
"quote_missing"
],
"location": {
"alternatives": [
{
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
]
}
],
"ambiguous": true,
"coherent": true,
"complete": true,
"exact": true,
"hiddenText": true,
"hintHonoured": true,
"interrupted": true,
"matchedRatio": 0.5,
"occurrences": 1,
"occurrencesCapped": true,
"pages": [
{
"page": 2,
"rectangles": [
{
"percentHeight": 0.06,
"percentWidth": 0.25,
"percentX": 0.12,
"percentY": 0.78
}
]
}
],
"readingOrder": true,
"status": "located",
"tokenBoundary": true
},
"page": 2,
"quote": "This Agreement is concluded for a fixed term until 31 December 2027",
"role": "value"
}
],
"value": "auto",
"warnings": [
"in_past"
]
}
],
"searchIncomplete": true,
"status": "detected",
"truncated": true
}
}{
"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"
}{
"status": 500,
"type": "SYSTEM:INTERNAL_ERROR",
"message": "Internal error",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Path Parameters
Body
Whether to also detect the contract's term - its expiration date, its renewal with the renewal period, notice and limits, and the notice of a contract that runs until it is terminated - and return every value found as a suggestion together with the passage it was read from and where that passage is printed. The term is read straight from the document's PDF, so it does not depend on the text extraction the other results come from. Nothing of it is written to the document. It cannot be asked for together with language or summaryOnly. Asking for it requires the right to use the document term (use_document_terms) and edit access to this document.
false
Language to write the summary and its key points in - one of the tenant's active languages that the caller's settings do not disable. Asking for a language narrows the answer to the summary section and never stores the summary on the document. Without it the summary is written in the caller's account language, then in the language of the caller's settings, then in English.
1^[a-z][a-z-]+$"en"
Response
Returns what the model extracted - empty results when the document has no extracted text - and the term suggestions when they were asked for.