Extracted fields
The fields read out of every document, per document or as a table.
Base URL https://futuresmart.ai/document-intelligence/api · every request sends x-api-key. Samples read the key from DOCUMENT_INTELLIGENCE_API_KEY. All endpoints
Get a document's extracted fields
/v1/{knowledge_id}/documents/{object_id}/metadataReturn document-level metadata only (no chunks/text). Includes: document_outline, document_type, entities, keywords, organizations, prepended_doc_summary, summary, temporal_context, title, topics, file_name
Credential Document Intelligence API key (x-api-key)
Path parameters
| Name | Type | Description |
|---|---|---|
knowledge_idrequired | string | |
object_idrequired | string | Document Object ID |
Other responses
422Validation Error
Get every document's fields as a table (cursor pages)
/v1/{knowledge_id}/documents/metadata/allKey Features
Fixed schema (null for missing values)
Includes column metadata + total count + user selection flags
List[dict] fields expanded → exp_0_year, exp_1_year, …
Sorting capped at 10k docs (memory safety)
Efficient cursor-based pagination using Qdrant's next_page_offset
Column Selection with Availability Flag
All available columns are ALWAYS returned in the response
Each column has an is_user_selected flag indicating if it was explicitly requested
When columns parameter is omitted/null: all fields have is_user_selected=true
When columns=['field1', 'field2']: only those fields have is_user_selected=true
UI can use is_user_selected to determine default column visibility
Users can discover and add additional columns without re-fetching data
Transformation Rules
dict → flatten with _ (location.city)
List[str] → kept as array
List[dict] → expanded to indexed columns (controlled by max_nested_items, default=3)
+ overflow items collected in field_remaining_* columns as lists
Nested dicts → recursive flatten
Pagination (Cursor-Based)
Uses efficient cursor-based pagination via page_offset
First request: omit page_offset or set to null
Subsequent requests: use next_page_offset from previous response
Example first page: {"limit": 20}
Example next page: {"limit": 20, "page_offset": "qdrant_offset_token"}
Response includes next_page_offset (null when no more pages) and has_more flag
Filtering (examples)
{"document_type": "resume"}
{"location.city": "Bangalore"}
{"topics": ["rag", "llm"]} (any match)
{"experience[].year": {"gte": 2022}}
{"year": {"gte": 2020, "lte": 2025}}
{"degree": {"in": ["M.Tech", "MS"]}}
Sorting (uses Qdrant native order_by for efficiency)
[{"field": "created_at", "order": "desc"}]
[{"field": "title", "order": "asc"}, {"field": "created_at", "order": "desc"}]
Column Selection (optional)
["object_id", "title", "location.city"]
Notes
object_id always first
Max page size: 100
Only active document-level fields
System fields excluded
All rows = same columnsCredential Document Intelligence API key (x-api-key)
Path parameters
| Name | Type | Description |
|---|---|---|
knowledge_idrequired | string |
Request body · application/json (optional)
| Name | Type | Description |
|---|---|---|
limit | integer | Maximum number of documents to return (1-100) |
page_offset | string | null | Qdrant page offset token for efficient pagination. Use next_page_offset from previous response. Omit for the first page. |
columns | array<string> | null | Optional list of top-level field names to include. If not provided, all active fields are included. |
filters | object | null | Optional filter conditions. Supports scalar, nested, list, array-of-dicts, range, and in operators. |
sort | array<object> | null | Optional sort configuration. List of field/order pairs. Defaults to created_at descending. |
max_nested_items | integer | Maximum number of items to expand for List[dict] fields into field_0_*, field_1_* columns. Overflow collected into field_remaining_* columns. Set to 0 to disable. |
Response · 200
| Name | Type | Description |
|---|---|---|
columnsrequired | array<ColumnSchema> | Fixed schema definition for all columns in the data view. |
↳ namerequired | string | Column name as it appears in the row data |
↳ original_fieldrequired | string | Original field name from metadata before flattening |
↳ data_typerequired | string | Data type using Python type notation (str, int, float, bool, dict, List[str], List[dict]) |
↳ is_user_selected | boolean | True if user selected this column or if no columns filter was specified. False if user specified columns but this column was not included. |
rowsrequired | array<object> | Data rows conforming to the column schema. Every row contains all columns, null for missing values. |
total_countrequired | integer | Total number of documents matching the filter criteria (before pagination) |
current_countrequired | integer | Number of documents returned in the current response |
next_page_offset | string | null | Qdrant page offset token for fetching the next page. None if no more pages available. |
has_morerequired | boolean | True if more documents are available beyond this page |
extraction_context | object | Per returned object ID, latest successful field-name context. Unknown is not an attempted-empty result; definitions/types are not recorded. |
Other responses
422Validation Error
Example request body
{
"limit": 20,
"sort": [
{
"field": "title",
"order": "asc"
},
{
"field": "created_at",
"order": "desc"
}
],
"max_nested_items": 2
}Response shape (200)
{
"columns": [
{
"name": "<name>",
"original_field": "<original_field>",
"data_type": "<data_type>",
"is_user_selected": true
}
],
"rows": [
{}
],
"total_count": 0,
"current_count": 0,
"has_more": false
}Get every document's fields as a table
/v2/{knowledge_id}/documents/metadata/allSimplified API with page-based pagination (1, 2, 3...) for UI table views.
**Key Features**
- Fixed schema tabular format (null for missing values)
- Simple page numbers instead of cursor tokens
- Column schema includes field_path, subcolumn, parent_type for UI filter builder
- List[dict] fields expanded → experience_0_role, experience_1_role, …
- Overflow items collected in experience_remaining_role columns
**Column Schema (ColumnSchemaV2)**
- name: flattened column key used in row data (e.g. address_city)
- original_field: top-level field — use in columns/sort/filters (e.g. address)
- field_path: filter key in dot/bracket notation (e.g. address.city, experience[].role)
- subcolumn: leaf key for nested fields (e.g. city, role); null for scalar/List[str]
- parent_type: scalar | list_str | dict | list_dict
- is_user_selected: true if field was in columns request or columns was omitted
**Pagination**
- 1-indexed (page=1 is first page)
- has_more = current_page < total_pages
**Filter Syntax** — {"field": {"op": "<op>", "value": <val>}}
- eq: exact match — {"document_type": {"op": "eq", "value": "Resume"}}
- ne: not equal — {"document_type": {"op": "ne", "value": "Resume"}}
- contains: substring match — {"summary": {"op": "contains", "value": "Python"}}
- not_contains: does not contain — {"summary": {"op": "not_contains", "value": "Java"}}
- is_empty: null or empty field — {"phone": {"op": "is_empty"}}
- is_not_empty: non-null, non-empty — {"phone": {"op": "is_not_empty"}}
- gte / lte / gt / lt: range — {"education[].year": {"op": "gte", "value": "2018"}}
- in: match any in list — {"current_role": {"op": "in", "value": ["Dev", "Analyst"]}}
- Nested dict field: use dot notation key — {"address.city": {"op": "eq", "value": "Kochi"}}
- Array of dicts: use bracket notation key — {"experience[].company": {"op": "eq", "value": "KeralaSoft"}}
**Sorting**
- Default: created_at desc
- Single field: Qdrant native order_by (efficient)
- Multi-field: in-memory sort, capped at 10,000 docsCredential Document Intelligence API key (x-api-key)
Path parameters
| Name | Type | Description |
|---|---|---|
knowledge_idrequired | string |
Request body · application/json (optional)
| Name | Type | Description |
|---|---|---|
page | integer | 1-indexed page number (first page is 1) |
page_size | integer | Items per page (1-100) |
columns | array<string> | null | Optional list of top-level field names to include. If not provided, all active fields are included. |
filters | object | null | Optional filter conditions for document metadata. |
sort | array<object> | null | Optional sort configuration. Defaults to created_at descending. |
max_nested_items | integer | Maximum number of items to expand into individual columns for List[dict] fields. Set to 0 to disable. |
Response · 200
| Name | Type | Description |
|---|---|---|
columnsrequired | array<ColumnSchemaV2> | Schema definitions for each column in the data view |
↳ namerequired | string | Flattened column key used in row data (e.g. location_country) |
↳ original_fieldrequired | string | Top-level field name — use in filters/sort/columns requests (e.g. location) |
↳ field_pathrequired | string | Dot-notation path to use as the filter key (e.g. location.country, experience[].year) |
↳ subcolumn | string | null | Leaf key within nested field (e.g. country, year); null for scalar and List[str] |
↳ parent_typerequired | string | Parent field type: scalar, list_str, dict, or list_dict |
↳ data_typerequired | string | Data type using Python type notation (str, int, float, bool, dict, List[str], List[dict]) |
↳ sort_field | string | null | Payload key to use as sort field. scalar → field name, dict → dot path (e.g. address.city), list_dict with numeric index → bracket path (e.g. experience[1].company). Null for list_str and list_dict _remaining_ columns (not sortable). |
↳ is_user_selected | boolean | True if user selected this column or if no columns filter was specified. False if user specified columns but this column was not included. |
rowsrequired | array<object> | Data rows conforming to the column schema. Every row contains all columns, null for missing values. |
total_countrequired | integer | Total number of documents matching the filter criteria (before pagination) |
current_countrequired | integer | Number of documents returned in the current page |
current_pagerequired | integer | Current page number (1-indexed) |
total_pagesrequired | integer | Total number of pages available based on page_size and total_count |
extraction_context | object | Per returned object ID, latest successful field-name context. Unknown is not an attempted-empty result; definitions/types are not recorded. |
Other responses
422Validation Error
Example request body
{
"page": 1,
"page_size": 20,
"sort": [
{
"field": "title",
"order": "asc"
},
{
"field": "created_at",
"order": "desc"
}
],
"max_nested_items": 2
}Response shape (200)
{
"columns": [
{
"name": "<name>",
"original_field": "<original_field>",
"field_path": "<field_path>",
"parent_type": "<parent_type>",
"data_type": "<data_type>",
"is_user_selected": true
}
],
"rows": [
{}
],
"total_count": 0,
"current_count": 0,
"current_page": 0,
"total_pages": 0
}Get the field definitions
/v1/{knowledge_id}/enrichmentGet enrichment configuration v2 with metadata (unique values) per field.
When field_name is provided, returns possible values for that specific metadata field with optional filtering. When field_name is not provided, returns all field configurations (backward compatible behavior).
Credential Document Intelligence API key (x-api-key)
Path parameters
| Name | Type | Description |
|---|---|---|
knowledge_idrequired | string |
Query parameters
| Name | Type | Description |
|---|---|---|
include_metadata | boolean | Whether to include metadata in the response |
field_name | string | null | Return values only for this specific field. |
filters | string | null | JSON-encoded dict for filtering documents (e.g., '{"document_type": "case_study"}'). |
limit | integer | null | Limit number of results. |
Other responses
422Validation Error