merit_create_sales_invoice
Create sales invoices in Merit Aktiva with required customer, invoice rows, tax amounts, and total. Supports credit invoices via negative quantities.
Instructions
Create a Merit Aktiva sales invoice (POST /api/v2/sendinvoice). Invoices cannot be updated — delete and recreate. Credit invoice: use negative quantity and totalAmount. customer may be an existing Id or a new record (name + notTDCustomer + countryCode). invoiceRows, taxAmount[], and totalAmount (ex-VAT) are required. Dates are ISO YYYY-MM-DD.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| refNo | No | ||
| docDate | Yes | Document date YYYY-MM-DD (required) | |
| dueDate | No | Due date YYYY-MM-DD | |
| customer | Yes | Customer object (id of existing, or name+countryCode+notTDCustomer) | |
| fComment | No | ||
| hComment | No | ||
| invoiceNo | Yes | Invoice number, max 35 (required) | |
| taxAmount | Yes | VAT totals per TaxId (required) | |
| invoiceRows | Yes | Invoice lines (required) | |
| totalAmount | Yes | Amount without VAT (required) | |
| currencyCode | No | ||
| roundingAmount | No | ||
| transactionDate | No | Transaction date YYYY-MM-DD |