documents
Update a document node
Changed onPartially 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}
Request
- Base URLhttps://your-reasondb-host
- Auth
- API key in header X-Api-Key
- or none
- TypeScriptA function with typed inputs. Its response is checked against the schema.
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"
}Changes
- info
endpoint added
- info
- breaking
api path removed without deprecation
- breaking