Skip to main content

Document Details API

The Document Details API manages document-specific section and rule details, including nested extraction rules generated during document production.

Update Document Details

Full replacement (PUT) of a document’s section and rule details. All existing sections are deleted and replaced.

Path Parameters

Request Body

Request Parameters

Section Parameters

Each section must include:

Rule Parameters

Request Example

Python Example

Response

Status Codes

  • 200 OK: Document details updated successfully
  • 400 Bad Request: Invalid structure
  • 401 Unauthorized: Missing or invalid Bearer token
  • 403 Forbidden: User not authorized
  • 404 Not Found: Document details or parent document not found
  • 422 Unprocessable Entity: Request validation error
  • 500 Internal Server Error: Database error

Get Document Details by Document ID

Retrieve the document details for a specific document.

Path Parameters

Request Example

Response

Status Codes

  • 200 OK: Document details retrieved successfully
  • 401 Unauthorized: Missing or invalid Bearer token
  • 403 Forbidden: User not authorized (document belongs to different organization)
  • 404 Not Found: Document not found or no details record found for document
  • 500 Internal Server Error: Database error

Features

  • Auto-Sorted: Sections are automatically sorted by order_index
  • Hierarchical: Supports multiple nesting levels via level parameter
  • Rule Nesting: Each section can contain multiple nested rules
  • Organization-Scoped: Returns only records belonging to the authenticated user’s organization

Typical Workflow