Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developer.kodexa.ai/llms.txt

Use this file to discover all available pages before exploring further.

Document Family Commands

The kdx document-family command provides operational tools for document families that already exist in the platform. Use it to export extracted data, download the KDDB content object behind a processed document, and update labels or statuses for operational workflows. A document family is the platform record that ties a source document, its content objects, derived data, labels, status, tasks, and processing history together.

Available Commands

CommandDescription
dataExport extracted JSON data from the latest content object
content listList content objects in a document family
content downloadDownload a content object as a .kddb file
add-labelAdd a label to a document family
remove-labelRemove a label from a document family
set-statusSet the document-family status

Export Extracted Data

Retrieve the extracted and transformed data from a processed document family.
kdx document-family data <document-family-id> [flags]

Flags

FlagDefaultDescription
-o, --outputstdoutOutput file path
--include-idstrueInclude element IDs in output
--friendly-namesfalseUse friendly names for fields
--inline-auditsfalseInclude inline audit information
--include-exceptionsfalseInclude exception information

Examples

# Output to terminal
kdx document-family data a700ca3e-38e7-4e63-8974-59c2e9058cf3

# Save to file
kdx document-family data a700ca3e-38e7-4e63-8974-59c2e9058cf3 -o extracted.json

# Use field display names
kdx document-family data a700ca3e-38e7-4e63-8974-59c2e9058cf3 --friendly-names

# Include traceability and exception context
kdx document-family data a700ca3e-38e7-4e63-8974-59c2e9058cf3 \
  --include-ids \
  --inline-audits \
  --include-exceptions \
  -o full-export.json

Output Shape

The command exports formatted JSON from the latest content object.
{
  "Invoice": {
    "SupplierName": "Acme Supplies",
    "InvoiceNumber": "INV-10422",
    "InvoiceDate": "2026-04-30",
    "LineItems": [
      {
        "Description": "Managed services",
        "Quantity": 1,
        "Amount": 2450.0,
        "_id": 330
      }
    ]
  }
}
When --include-ids is enabled, each data element includes an _id field that can be used for traceability and audit review.

Content Object Operations

Document families contain one or more content objects. A content object is the KDDB representation of a processed document at a point in time.

List Content Objects

kdx document-family content list <document-family-id>
Example output:
Content Objects in Document Family 70b894f5-8d32-4584-b780-89f89210e078:
-----------------------------------------------------------------
ID                                     CREATED                   LABELS
-----------------------------------------------------------------
abc12345-1111-2222-3333-444444444444   2026-01-26T23:18:07.454Z
def67890-5555-6666-7777-888888888888   2026-01-26T23:22:18.980Z
8efba773-6cc9-4903-95ea-2405a53df853   2026-01-26T23:31:48.777Z   (latest)

Download Content

kdx document-family content download <document-family-id> [content-object-id] [flags]

Flags

FlagDescription
--latestDownload the most recent content object
-o, --outputOutput file path, defaulting to content-<id>.kddb

Examples

# Download the latest content object
kdx document-family content download 70b894f5-8d32-4584-b780-89f89210e078 --latest

# Download with a custom filename
kdx document-family content download 70b894f5-8d32-4584-b780-89f89210e078 --latest -o document.kddb

# Download a specific content object by ID
kdx document-family content download 70b894f5-8d32-4584-b780-89f89210e078 8efba773-6cc9-4903-95ea-2405a53df853 -o specific-version.kddb

Labels

Labels are often used for operational routing, progress tracking, and downstream filters.

Add a Label

kdx document-family add-label <document-family-id> <tag-id> [--path <path>]
Argument or flagDescription
document-family-idThe document family to update
tag-idThe label/tag UUID to apply
--pathOptional path within the document to scope the label
Examples:
kdx document-family add-label a700ca3e-38e7-4e63-8974-59c2e9058cf3 label-uuid
kdx document-family add-label a700ca3e-38e7-4e63-8974-59c2e9058cf3 label-uuid --path /invoice/header

Remove a Label

kdx document-family remove-label <document-family-id> <label-id>
Example:
kdx document-family remove-label a700ca3e-38e7-4e63-8974-59c2e9058cf3 label-uuid

Status

Statuses are useful when a project models lifecycle states such as received, reviewed, approved, rejected, or archived.
kdx document-family set-status <document-family-id> <status-id>
Example:
kdx document-family set-status a700ca3e-38e7-4e63-8974-59c2e9058cf3 status-uuid

When To Use Each Command

Use caseCommand
Get structured data for an integration checkkdx document-family data
Debug what the platform stored in a processed documentkdx document-family content download --latest
See whether multiple content versions existkdx document-family content list
Mark a document for an operational pathkdx document-family add-label
Clear an incorrect operational labelkdx document-family remove-label
Move a document to a known lifecycle statekdx document-family set-status

Upload, Wait, Export

# Upload document
kdx store upload acme/ap-processing ./invoice.pdf

# Wait for the target label
kdx store watch a700ca3e-38e7-4e63-8974-59c2e9058cf3 --timeout 900

# Export extracted data
kdx document-family data a700ca3e-38e7-4e63-8974-59c2e9058cf3 -o invoice.json

Troubleshooting

SymptomWhat to check
no content objects foundThe document may not have processed yet, or processing failed before content was saved.
Empty JSON exportConfirm the document reached the expected processing label and that the Activity Plan produced structured data.
Document family not foundConfirm the ID, profile, URL, and permissions.
Label or status update failsConfirm you are passing the server UUID for the label or status, not the display name.