Finalise document
Finalise a draft invoice or quote: it gets its number and can no longer be edited.
POST https://cotlet.dev/api/v1/lexware-office/documents/{document_id}/finalize
write Confirm
Clicks Abschließen on a draft. The invoice or quote gets its final number from your number range, appears in the list as open, and a PDF is generated. A finalised invoice is legally binding and cannot be edited; the only way back is cancel_invoice, which blocks the number for good. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| document_id string required | string | Document ID from list_documents or create_invoice. |
Request
curl -X POST https://cotlet.dev/api/v1/lexware-office/documents/d_c44e19/finalize \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("lexware-office", "finalize_document", {"document_id":"d_c44e19"}) const result = await cotlet.call('lexware-office', 'finalize_document', {"document_id":"d_c44e19"}); cotlet call lexware-office finalize_document --data '{"document_id":"d_c44e19"}' Example response
{
"document_id": "d_c44e19",
"type": "invoice",
"number": "RE1043",
"status": "open",
"total_gross": 1130.5,
"currency": "EUR"
}