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

Parameters: post_invoice
NameTypeDescription
invoice_id integer required integer Invoice ID from list_invoices or create_draft_invoice.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/odoo/invoices/1 \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("odoo", "post_invoice", {"invoice_id":1})
Node.js
const result = await cotlet.call('odoo', 'post_invoice', {"invoice_id":1});
CLI
cotlet call odoo post_invoice --data '{"invoice_id":1}'

Example response

JSON

{
  "invoice_id": 4201,
  "number": "INV/2026/00431",
  "status": "posted",
  "payment_status": "not_paid",
  "amount_total": 2400,
  "amount_due": 2400,
  "currency": "EUR"
}

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.