curl --request GET \
--url https://api.{environment}.corti.app/v2/documents/ \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <tenant-name>'import { CortiClient, CortiEnvironment } from "@corti/sdk";
const client = new CortiClient({
environment: CortiEnvironment.Eu,
auth: {
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
},
tenantName: "YOUR_TENANT_NAME"
});
await client.documents.list();
using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
await client.Documents.ListAsync(new GuidedDocumentsListRequest());
import requests
url = "https://api.{environment}.corti.app/v2/documents/"
headers = {
"Tenant-Name": "<tenant-name>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/v2/documents/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Tenant-Name: <tenant-name>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.{environment}.corti.app/v2/documents/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Tenant-Name", "<tenant-name>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.{environment}.corti.app/v2/documents/")
.header("Tenant-Name", "<tenant-name>")
.header("Authorization", "Bearer <token>")
.asString();[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outputLanguage": "<string>",
"stringDocument": {},
"labels": [
{
"key": "<string>",
"value": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"interactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"structuredDocument": {},
"sections": [
{
"sectionId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"heading": "Chief Complaint",
"labels": [
{
"key": "inlineTemplate",
"value": "true"
}
]
},
{
"sectionId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"heading": "Assessment and Plan",
"labels": [
{
"key": "inlineTemplate",
"value": "true"
}
]
}
]
}
]{
"requestid": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"validationErrors": [
{}
]
}List documents
Returns a list of previously generated documents. Use query parameters to filter by template, interaction, or label.
curl --request GET \
--url https://api.{environment}.corti.app/v2/documents/ \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <tenant-name>'import { CortiClient, CortiEnvironment } from "@corti/sdk";
const client = new CortiClient({
environment: CortiEnvironment.Eu,
auth: {
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
},
tenantName: "YOUR_TENANT_NAME"
});
await client.documents.list();
using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
await client.Documents.ListAsync(new GuidedDocumentsListRequest());
import requests
url = "https://api.{environment}.corti.app/v2/documents/"
headers = {
"Tenant-Name": "<tenant-name>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/v2/documents/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Tenant-Name: <tenant-name>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.{environment}.corti.app/v2/documents/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Tenant-Name", "<tenant-name>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.{environment}.corti.app/v2/documents/")
.header("Tenant-Name", "<tenant-name>")
.header("Authorization", "Bearer <token>")
.asString();[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outputLanguage": "<string>",
"stringDocument": {},
"labels": [
{
"key": "<string>",
"value": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"interactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"structuredDocument": {},
"sections": [
{
"sectionId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"heading": "Chief Complaint",
"labels": [
{
"key": "inlineTemplate",
"value": "true"
}
]
},
{
"sectionId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"heading": "Assessment and Plan",
"labels": [
{
"key": "inlineTemplate",
"value": "true"
}
]
}
]
}
]{
"requestid": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"validationErrors": [
{}
]
}Authorizations
Input your token
Headers
Identifies a distinct entity within Corti's multi-tenant system. Ensures correct routing and authentication of the request.
"base"
Query Parameters
Filter documents by template UUID.
Filter documents by interaction UUID.
Filter documents by label in key:value format. Repeatable; matches documents that have any of the given labels.
Response
OK
The template ID used for generation. For a plain templateRef with no overrides this is the referenced template. For other paths it is the newly saved auto-generated template aggregate.
The specific template version that was used for generation.
The BCP 47 language tag of the generated output.
The generated document as a map of section ID to rendered string output. The sections array lists every section ID and its heading.
Show child attributes
Show child attributes
Key/value labels attached to this document.
Show child attributes
Show child attributes
The interaction whose context was used to generate this document, if supplied.
The generated document as a structured object keyed by section ID. The sections array lists every section ID and its heading.
Every section in the template version, in template order, including sections the model left empty. Use sectionId as the key into stringDocument and structuredDocument. The heading and labels let you render the section without a GET request per section.
Show child attributes
Show child attributes
[
{
"sectionId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"heading": "Chief Complaint",
"labels": [
{ "key": "inlineTemplate", "value": "true" }
]
},
{
"sectionId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"heading": "Assessment and Plan",
"labels": [
{ "key": "inlineTemplate", "value": "true" }
]
}
]
Was this page helpful?