Create invoice
Create an invoice for a relation from one or more lines, and optionally email it to the relation.
MCP tool e_boekhouden_write → create_invoice
Creates one invoice in the books. Required: relation_id, term_of_payment in days, template_id and at least one line. Leave invoice_number empty and e-Boekhouden assigns the next one. Amounts are excluding or including VAT as in_ex_vat says; a line takes a fixed discount or a percentage, not both. Pass send_email to mail it to the relation straight away, otherwise it only exists in e-Boekhouden. The invoice is a legal document and cannot be edited or deleted through the API. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| relation_id integer required | integer | Relation ID from list_relations. |
| term_of_payment integer required | integer | Payment term in days. |
| template_id integer required | integer | Template ID from list_invoice_templates. |
| items array required | array | Lines: description, quantity, price_per_unit, vat_code, ledger_id, optional product_id, discount_amount or discount_percentage. vat_code is one of HOOG_VERK_21, LAAG_VERK_9, VERL_VERK, VERL_VERK_L9, AFW, BU_EU_VERK, BI_EU_VERK, BI_EU_VERK_D, AFST_VERK, GEEN. |
| in_ex_vat enum | enum | IN if line prices include VAT, EX if they exclude it. |
| date date | date | Invoice date. Default: today. |
| invoice_number string | string | Your own number, must end with a digit. Empty: next number. |
| reference string | string | Payment reference. |
| text string | string | Text on the invoice. |
| send_email boolean | boolean | true to email the invoice to the relation now. Default: false. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "e_boekhouden_write",
"arguments": {
"operation": "create_invoice",
"arguments": {
"relation_id": 1042,
"template_id": 3,
"term_of_payment": 14,
"in_ex_vat": "EX",
"items": [
{
"description": "Consulting October 2026",
"quantity": 10,
"price_per_unit": 85,
"vat_code": "HOOG_VERK_21",
"ledger_id": 8000
}
]
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"invoice_id": 9021,
"invoice_number": "2026-0143",
"date": "2026-10-12",
"relation_id": 1042,
"total_excl_vat": 850,
"vat": 178.5,
"total_incl_vat": 1028.5,
"emailed": false
},
"isError": false
}