create_document
Create invoices, estimates, and other documents in Holded with line items, taxes, and discounts. Approve documents automatically or save as drafts.
Instructions
Create a new document (invoice, estimate, etc.). By default the document is approved (finalized) so it appears in the Holded UI; pass approveDoc:false to create a draft instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docType | Yes | Type of document to create | |
| contactId | Yes | Contact ID for the document | |
| items | Yes | Array of line items | |
| date | Yes | Document date as Unix timestamp | |
| notes | No | Notes for the document | |
| currency | No | Currency code (e.g., EUR, USD) | |
| invoiceNum | No | Document reference number (e.g. invoice number from supplier) | |
| salesChannelId | No | Sales channel ID to associate with the document | |
| expAccountId | No | Expense account ID for expense documents | |
| approveDoc | No | Whether to immediately approve (finalize) the document instead of saving it as a draft. Defaults to true so the document is visible in the Holded UI. When the Holded API receives no value it defaults to draft, and drafts do not appear in Sales > Invoices, the contact Sales tab or global search. Pass false only when you intentionally want a draft. Note: approved documents are permanently locked by Holded. |