Documentation Index
Fetch the complete documentation index at: https://docs.chamelio.ai/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Authentication
This endpoint requires authentication via API key. Include your API key in theX-API-Key header:
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document_id | integer | Yes | Unique identifier for the document |
Request Body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
include_summary | boolean | No | false | Include the AI-generated document summary in the response |
include_attributes | boolean | No | false | Include document attributes (category, visibility, active status, exhibits, etc.) |
include_extracted_fields | boolean | No | true | Include the extracted document fields in the response |
Request Example
Response
Success Response
Status Code:200 OK
Response Fields
| Field | Type | Description |
|---|---|---|
document_id | integer | Unique identifier for the document |
org_id | integer | Organization identifier |
version | integer | Document schema version |
file_name | string | Original file name |
document_title | string or null | Human-readable document title |
document_type | string | Type of document (e.g., “MSA”, “NDA”, “SOW”) |
category | string | Document category: contract, policy, template, archive |
visibility | string | Visibility level: none, visible, admin_only, archive |
active | object | Active status with verification flag (see below) |
summary | string or null | AI-generated summary of the document |
exhibits | array of strings | List of exhibit names found in the document |
attachments_ids | array of integers | IDs of attached documents |
previous_versions | array of integers | Document IDs of previous versions |
fields | array | Extracted document fields (see below) |
mapped_fields | object | Key-value pairs grouped by type (see below) |
workflow_metadata | object or null | Workflow context if the document is part of a workflow |
related_template | object or null | Associated template information |
document_created_at | string or null | ISO 8601 timestamp of the original document date |
source | string or null | How the document was ingested: drive, sharepoint, local, email, workflow, integration, external_api, docusign, salesforce |
uploaded_by_user_id | integer or null | ID of the user who uploaded the document |
Active Object
| Field | Type | Description |
|---|---|---|
value | string | Active status: active, inactive, unknown |
is_verified | boolean | Whether the active status has been verified by a user |
Field Object
Each field in thefields array represents an extracted data point from the document. The value field varies by type.
Common Fields
| Field | Type | Description |
|---|---|---|
field_name | string | Display name of the field |
field_value_type | string | Type discriminator: text, clause, enum, number, boolean, date, bullet_list, business, user_party |
org_field_id | integer | Organization-level field definition ID |
is_verified | boolean | Whether the value has been verified by a user |
is_unclear | boolean | Whether the AI could not determine a clear value |
reasoning | string or null | AI reasoning for the extracted value |
source_text | array of strings or null | Relevant text excerpts from the document |
chunk_ids | array of integers or null | Document chunk IDs where the value was found |
Value Fields by Type
field_value_type | Value Field | Type | Description |
|---|---|---|---|
text | text_value | string or null | Plain text value |
clause | text_value | string or null | Contract clause text |
enum | enum_value | string or null | Selected option from a predefined list |
business | enum_value | string or null | Business entity name |
business | business_id | integer or null | Business entity ID |
user_party | enum_value | string or null | User party value |
number | number_value | number or null | Numeric value |
boolean | boolean_value | boolean or null | True/false value |
date | date_value | string or null | ISO 8601 date |
bullet_list | json_value | object/array or null | Structured list data |
When
is_unclear is true, the value field will be null — this means the AI found conflicting or ambiguous information in the document.Mapped Fields Object
Pre-mapped key-value pairs organized by data type. These are populated from workflow metadata.| Field | Type | Description |
|---|---|---|
text | object | String key-value pairs |
number | object | Numeric key-value pairs |
boolean | object | Boolean key-value pairs |
date | object | Date key-value pairs (ISO 8601 values) |
link | object | URL key-value pairs |
Workflow Metadata Object
Present when the document is associated with a workflow.| Field | Type | Description |
|---|---|---|
workflow_state_id | string | Workflow state identifier |
workflow_id | string | Workflow definition identifier |
org_id | integer | Organization ID |
user_id | integer | User who initiated the workflow |
workflow_version | integer or null | Workflow version number |
task_id | integer or null | Associated task ID |
Related Template Object
Present when the document was created from a template.| Field | Type | Description |
|---|---|---|
template_id | integer | Template identifier |
template_version | integer | Template version number |
Error Responses
401 Unauthorized
Returned when authentication fails. See the authentication errors section for details.404 Not Found
Returned when the document doesn’t exist or you don’t have access to it.500 Internal Server Error
Returned when the request fails due to a server error.Use Cases
- Contract review - Retrieve all extracted fields and metadata for a contract
- Data synchronization - Pull contract data into external systems (CRM, ERP)
- Reporting - Build dashboards from extracted contract fields
- Compliance checks - Verify key contract terms like renewal dates and values
- Workflow integration - Access document data as part of automated workflows