Restore an older version of a document
restore_documentDeletes data: puts a replaced version of a packing list or an invoice back as the current document, as the person who connected this app, and records it in the organization's audit log. The version that replaced it becomes the older one, and the data imported from it (a packing list's pallets and boxes, an invoice's lines) is deleted and replaced by what the restored version says. Use it only when the user asks to go back to the earlier file, and say which version you will bring back. Get the id of a replaced version from list_documents with view "superseded". Refused, with nothing changed, when the shipment has arrived, when boxes are pre-allocated on the current packing list (delete those pre-allocations first), and for a document that cannot be rebuilt this way (a bill of lading: replace it with replace_document instead). Restoring a document that is already current changes nothing. Answers with the restored document.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"document_id": "<document_id>"
},
"name": "restore_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | The replaced version to bring back, such as "doc_45", from list_documents with view "superseded". |