Create a credit note
Reverse a posted invoice with a credit note.
POST https://cotlet.dev/api/v1/odoo/invoices/{invoice_id}/credit-notes
write Confirm
Uses the Credit Note window of the invoice. In reverse mode the credit note is a draft prefilled from the original invoice. In reverse_and_new mode it is validated, reconciled with the original and a new draft invoice is opened. If money goes back to the customer, register that payment afterwards. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id integer required | integer | Invoice ID from list_invoices or create_draft_invoice. |
| reason string required | string | Reason shown on the credit note. |
| mode enum | enum | reverse: a draft credit note you can adjust; reverse_and_new: a validated credit note plus a new draft invoice. Default: reverse. |
Request
curl -X POST https://cotlet.dev/api/v1/odoo/invoices/1/credit-notes \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason":"reason"}' result = client.call("odoo", "create_credit_note", {"invoice_id":1,"reason":"reason"}) const result = await cotlet.call('odoo', 'create_credit_note', {"invoice_id":1,"reason":"reason"}); cotlet call odoo create_credit_note --data '{"invoice_id":1,"reason":"reason"}' Example response
{
"credit_note_id": 4230,
"reverses": "INV/2026/00398",
"mode": "reverse",
"status": "draft",
"reason": "Wrong quantity",
"amount_total": 2150,
"currency": "EUR"
}