Confirm (post) an invoice
Confirm a draft invoice so it becomes Posted and gets its number.
POST https://cotlet.dev/api/v1/odoo/invoices/{invoice_id}
write Confirm
Clicks Confirm on a draft invoice. The status changes to Posted, Odoo assigns the invoice number and creates the journal entry, and the invoice can no longer be edited. The call fails if the invoice is not a draft. To change a posted invoice, Odoo has Reset to draft. 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. |
Request
curl -X POST https://cotlet.dev/api/v1/odoo/invoices/1 \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("odoo", "post_invoice", {"invoice_id":1}) const result = await cotlet.call('odoo', 'post_invoice', {"invoice_id":1}); cotlet call odoo post_invoice --data '{"invoice_id":1}' Example response
{
"invoice_id": 4201,
"number": "INV/2026/00431",
"status": "posted",
"payment_status": "not_paid",
"amount_total": 2400,
"amount_due": 2400,
"currency": "EUR"
}