Get Source Bounding Boxes
curl --request POST \
--url https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sources": [
{
"id": "<string>",
"document_id": "<string>",
"attachment_id": "<string>",
"attachment_mime_type": "<string>",
"quoted_text": "<string>",
"location_info": "<string>",
"location_type": "<string>",
"revision_id": "<string>"
}
]
}
'import requests
url = "https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes"
payload = { "sources": [
{
"id": "<string>",
"document_id": "<string>",
"attachment_id": "<string>",
"attachment_mime_type": "<string>",
"quoted_text": "<string>",
"location_info": "<string>",
"location_type": "<string>",
"revision_id": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sources: [
{
id: '<string>',
document_id: '<string>',
attachment_id: '<string>',
attachment_mime_type: '<string>',
quoted_text: '<string>',
location_info: '<string>',
location_type: '<string>',
revision_id: '<string>'
}
]
})
};
fetch('https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes', 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://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes",
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([
'sources' => [
[
'id' => '<string>',
'document_id' => '<string>',
'attachment_id' => '<string>',
'attachment_mime_type' => '<string>',
'quoted_text' => '<string>',
'location_info' => '<string>',
'location_type' => '<string>',
'revision_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes"
payload := strings.NewReader("{\n \"sources\": [\n {\n \"id\": \"<string>\",\n \"document_id\": \"<string>\",\n \"attachment_id\": \"<string>\",\n \"attachment_mime_type\": \"<string>\",\n \"quoted_text\": \"<string>\",\n \"location_info\": \"<string>\",\n \"location_type\": \"<string>\",\n \"revision_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sources\": [\n {\n \"id\": \"<string>\",\n \"document_id\": \"<string>\",\n \"attachment_id\": \"<string>\",\n \"attachment_mime_type\": \"<string>\",\n \"quoted_text\": \"<string>\",\n \"location_info\": \"<string>\",\n \"location_type\": \"<string>\",\n \"revision_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sources\": [\n {\n \"id\": \"<string>\",\n \"document_id\": \"<string>\",\n \"attachment_id\": \"<string>\",\n \"attachment_mime_type\": \"<string>\",\n \"quoted_text\": \"<string>\",\n \"location_info\": \"<string>\",\n \"location_type\": \"<string>\",\n \"revision_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"sources": [
{
"id": "<string>",
"status": "matched",
"bounding_boxes": [
{
"attachment_id": "<string>",
"page": 2,
"x": 0.5,
"y": 0.5,
"width": 0,
"height": 0
}
]
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}chat
Get Source Bounding Boxes
Locate the quoted text of one or more chat citations in their source attachments. This on-demand operation does not affect chat latency.
POST
/
assistant
/
api
/
v1
/
tenants
/
{tenant}
/
sources:getBoundingBoxes
Get Source Bounding Boxes
curl --request POST \
--url https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sources": [
{
"id": "<string>",
"document_id": "<string>",
"attachment_id": "<string>",
"attachment_mime_type": "<string>",
"quoted_text": "<string>",
"location_info": "<string>",
"location_type": "<string>",
"revision_id": "<string>"
}
]
}
'import requests
url = "https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes"
payload = { "sources": [
{
"id": "<string>",
"document_id": "<string>",
"attachment_id": "<string>",
"attachment_mime_type": "<string>",
"quoted_text": "<string>",
"location_info": "<string>",
"location_type": "<string>",
"revision_id": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sources: [
{
id: '<string>',
document_id: '<string>',
attachment_id: '<string>',
attachment_mime_type: '<string>',
quoted_text: '<string>',
location_info: '<string>',
location_type: '<string>',
revision_id: '<string>'
}
]
})
};
fetch('https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes', 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://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes",
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([
'sources' => [
[
'id' => '<string>',
'document_id' => '<string>',
'attachment_id' => '<string>',
'attachment_mime_type' => '<string>',
'quoted_text' => '<string>',
'location_info' => '<string>',
'location_type' => '<string>',
'revision_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes"
payload := strings.NewReader("{\n \"sources\": [\n {\n \"id\": \"<string>\",\n \"document_id\": \"<string>\",\n \"attachment_id\": \"<string>\",\n \"attachment_mime_type\": \"<string>\",\n \"quoted_text\": \"<string>\",\n \"location_info\": \"<string>\",\n \"location_type\": \"<string>\",\n \"revision_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sources\": [\n {\n \"id\": \"<string>\",\n \"document_id\": \"<string>\",\n \"attachment_id\": \"<string>\",\n \"attachment_mime_type\": \"<string>\",\n \"quoted_text\": \"<string>\",\n \"location_info\": \"<string>\",\n \"location_type\": \"<string>\",\n \"revision_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/sources:getBoundingBoxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sources\": [\n {\n \"id\": \"<string>\",\n \"document_id\": \"<string>\",\n \"attachment_id\": \"<string>\",\n \"attachment_mime_type\": \"<string>\",\n \"quoted_text\": \"<string>\",\n \"location_info\": \"<string>\",\n \"location_type\": \"<string>\",\n \"revision_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"sources": [
{
"id": "<string>",
"status": "matched",
"bounding_boxes": [
{
"attachment_id": "<string>",
"page": 2,
"x": 0.5,
"y": 0.5,
"width": 0,
"height": 0
}
]
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The domain of the customer
Example:
"example.com"
Body
application/json
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
Response
Successful Response
Show child attributes
Show child attributes