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

Parameters: finalize_document
NameTypeDescription
document_id string required string Document ID from list_documents or create_invoice.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/lexware-office/documents/d_c44e19/finalize \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("lexware-office", "finalize_document", {"document_id":"d_c44e19"})
Node.js
const result = await cotlet.call('lexware-office', 'finalize_document', {"document_id":"d_c44e19"});
CLI
cotlet call lexware-office finalize_document --data '{"document_id":"d_c44e19"}'

Example response

JSON

{
  "document_id": "d_c44e19",
  "type": "invoice",
  "number": "RE1043",
  "status": "open",
  "total_gross": 1130.5,
  "currency": "EUR"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.