Create invoice

Create an invoice for a client, with lines, VAT and a due date.

POST https://cotlet.dev/api/v1/fatture-in-cloud/clients/{client_id}/invoices

write Confirm

Creates an invoice, auto-numbered when no number is given, and returns its ID, totals and e-invoice status. Totals are net, VAT and gross, and the due date becomes the payment due date. Creating the invoice does not send it to SDI; use send_einvoice for that. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: create_invoice
NameTypeDescription
company_id integer integer Company ID. Optional when your account has one company.
client_id integer required integer Client ID from list_clients or create_client.
date string required string Invoice date, ISO.
subject string string Subject shown on the invoice.
e_invoice boolean boolean true issues it as an electronic invoice. Default: false.
lines array required array Objects with description, quantity, net_price and vat_percent.
due_date string string Payment due date, ISO.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/fatture-in-cloud/clients/5107/invoices \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"2026-10-31","subject":"October consulting","e_invoice":true,"lines":[{"description":"Consulting, 10 hours","quantity":10,"net_price":150,"vat_percent":22}],"due_date":"2026-11-30"}'
Python
result = client.call("fatture-in-cloud", "create_invoice", {"client_id":5107,"date":"2026-10-31","subject":"October consulting","e_invoice":True,"lines":[{"description":"Consulting, 10 hours","quantity":10,"net_price":150,"vat_percent":22}],"due_date":"2026-11-30"})
Node.js
const result = await cotlet.call('fatture-in-cloud', 'create_invoice', {"client_id":5107,"date":"2026-10-31","subject":"October consulting","e_invoice":true,"lines":[{"description":"Consulting, 10 hours","quantity":10,"net_price":150,"vat_percent":22}],"due_date":"2026-11-30"});
CLI
cotlet call fatture-in-cloud create_invoice --data '{"client_id":5107,"date":"2026-10-31","subject":"October consulting","e_invoice":true,"lines":[{"description":"Consulting, 10 hours","quantity":10,"net_price":150,"vat_percent":22}],"due_date":"2026-11-30"}'

Example response

JSON

{
  "id": 88120,
  "number": 14,
  "date": "2026-10-31",
  "client_id": 5107,
  "e_invoice": true,
  "ei_status": "not_sent",
  "amount_net": 1500,
  "amount_vat": 330,
  "amount_gross": 1830,
  "due_date": "2026-11-30"
}

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.