documents
Update a document node
Partially updates a single node by its document and node IDs. Only provided fields are changed. metadata.attributes is merged key-by-key. cross_ref_node_ids is replaced when provided.
patch/v1/documents/{id}/nodes/{node_id}
Path parameters
idstring required
Example:doc_abc123
Document ID
node_idstring required
Example:node_xyz789
Node ID
Request body
Example request
{
"title": "Chapter 3: Neural Networks — Revised",
"summary": "This chapter covers neural network fundamentals including backpropagation.",
"content": "Neural networks are computing systems loosely inspired by biological neural networks...",
"image_path": "/uploads/figure-3-1.png",
"metadata": {
"page_number": 3,
"section_type": "section",
"confidence_score": 0.95,
"attributes": {
"source": "manual",
"reviewed": "true"
},
"cross_ref_node_ids": [
"node_abc",
"node_def"
]
}
}Response
Node updated successfully
Example response
{
"id": "node_xyz789",
"document_id": "doc_abc123",
"title": "Chapter 3: Neural Networks",
"summary": "This chapter covers neural network fundamentals...",
"depth": 1,
"image_path": "/uploads/figure-3-1.png",
"parent_id": "node_root_abc",
"children_ids": [
"node_child1",
"node_child2"
],
"page_number": 3,
"section_type": "chapter",
"confidence_score": 0.95,
"attributes": {
"source": "manual"
},
"cross_ref_node_ids": [],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:35:00Z"
}