Delete a document
delete_documentDeletes data: permanently deletes one document from its shipment, as the person who connected this app, and records it in the organization's audit log. The file, what was read from it and the invoice lines imported from it are gone and cannot be recovered, and the shipment's checks run again. A packing list imported from it stays on the shipment, with any pre-allocations on it, until another packing list is read. Use it only when the user asks to delete the document, and confirm which one (file name, shipment) before calling. To keep a document but set it aside, use set_document_relevance; to put an older version back, restore_document. Get document ids from list_documents. Safe to repeat: a second call answers that the document does not exist. Answers with the document as it was, with deleted true.
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": "delete_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | A document id such as "doc_45", as returned by list_documents. |