Create a credit invoice
Credits a sales invoice in full or in part, as Crediteren does.
POST https://cotlet.dev/api/v1/snelstart/invoices/{invoice_id}/credit-invoices
write Confirm
Copies the invoice into a new one with negative amounts, optionally with fewer lines or quantities. Both invoices stay in the overview. Creating a credit invoice needs inStap, and writing off the original in the memorial journal needs inKaart. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id string required | string | Sales invoice ID from list_sales_invoices or create_sales_invoice. |
| lines array | array | Lines of {article_id, quantity} to credit. Omit to credit the whole invoice. |
| action string | string | One of: send, save_only. Default: save_only. |
Request
curl -X POST https://cotlet.dev/api/v1/snelstart/invoices/invoice_8c41d2/credit-invoices \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("snelstart", "create_credit_invoice", {"invoice_id":"invoice_8c41d2"}) const result = await cotlet.call('snelstart', 'create_credit_invoice', {"invoice_id":"invoice_8c41d2"}); cotlet call snelstart create_credit_invoice --data '{"invoice_id":"invoice_8c41d2"}' Example response
{
"credit_invoice_id": "inv_cr_0007",
"number": "2026-0414",
"credits": "2026-0388",
"amount_total": -919.6,
"status": "saved"
}