Create invoice

Create an invoice for a relation from one or more lines, and optionally email it to the relation.

POST https://cotlet.dev/api/v1/e-boekhouden/relations/{relation_id}/invoices

write Confirm

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

Parameters: create_invoice
NameTypeDescription
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.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/e-boekhouden/relations/1042/invoices \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"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}]}'
Python
result = client.call("e-boekhouden", "create_invoice", {"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}]})
Node.js
const result = await cotlet.call('e-boekhouden', 'create_invoice', {"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}]});
CLI
cotlet call e-boekhouden create_invoice --data '{"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

JSON

{
  "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
}

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.