Invoices

Change a draft

invoices_update · Changes data · Markdown

Changes a draft quote or invoice; customer and lines replace the old ones.

$0.01 a call

From your agent’s balance. A call that fails costs nothing.

An example

Change the Elbblick quote to 45 chairs.

Your agent callsinvoices_update$0.01 a call

The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.

With these arguments
{
  "invoice_id": "2d9c4e7b-1a3f-4c5d-8e6f-0b1a2c3d4e5f",
  "items": [
    {
      "description": "Bistro chair, beech\nStackable, for terraces",
      "quantity": 45,
      "unit_price": "320.00",
      "discount": 10
    },
    {
      "description": "Delivery and setup",
      "unit_price": "150.00"
    }
  ]
}
What comes back
{
  "invoice": {
    "invoice_id": "2d9c4e7b-1a3f-4c5d-8e6f-0b1a2c3d4e5f",
    "kind": "quote",
    "number": null,
    "status": "draft",
    "currency": "EUR",
    "issue_date": null,
    "valid_until": null,
    "expired": false,
    "customer": {
      "contact_id": null,
      "company_id": null,
      "name": "Hotel Elbblick GmbH",
      "email": "lukas.meyer@hotel-elbblick.example",
      "address": "Elbchaussee 120\n22763 Hamburg",
      "tax_id": "",
      "country": null
    },
    "total": "15600.90",
    "total_formatted": "€15,600.90",
    "amount_paid": "0.00",
    "balance": "15600.90",
    "balance_formatted": "€15,600.90",
    "public_url": null,
    "created_at": "2026-10-14T08:00:00+00:00",
    "sent_at": null,
    "items": [
      {
        "description": "Bistro chair, beech\nStackable, for terraces",
        "quantity": "45",
        "unit_price": "320",
        "tax_rate": "19",
        "discount_percent": "10",
        "amount": "14400.00",
        "discount": "1440.00",
        "tax": "2462.40",
        "total": "15422.40"
      },
      {
        "description": "Delivery and setup",
        "quantity": "1",
        "unit_price": "150",
        "tax_rate": "19",
        "discount_percent": "0",
        "amount": "150.00",
        "discount": "0.00",
        "tax": "28.50",
        "total": "178.50"
      }
    ],
    "totals": {
      "subtotal": "14550.00",
      "subtotal_formatted": "€14,550.00",
      "discount": "1440.00",
      "discount_formatted": "€1,440.00",
      "tax": "2490.90",
      "tax_formatted": "€2,490.90",
      "total": "15600.90",
      "total_formatted": "€15,600.90",
      "credited": "0.00",
      "credited_formatted": "€0.00",
      "amount_paid": "0.00",
      "amount_paid_formatted": "€0.00",
      "balance": "15600.90",
      "balance_formatted": "€15,600.90",
      "taxes": [
        {
          "rate": "19",
          "base": "13110.00",
          "amount": "2490.90",
          "amount_formatted": "€2,490.90"
        }
      ]
    },
    "supply": null,
    "tax_exemption": null,
    "tax_note": null,
    "vat_exchange_rate": null,
    "national_vat": null,
    "e_invoice": null,
    "notes": "Thank you for your enquiry. The chairs can be delivered in week 49.",
    "payment_link": null,
    "ready_to_send": true,
    "business": {
      "name": "Hansen & Voss GmbH",
      "address": "Billbrookdeich 112\n22113 Hamburg\nGermany",
      "tax_id": "DE123456789",
      "email": "billing@hansenvoss.example",
      "phone": "+49 40 66969 100",
      "logo_file_id": "",
      "footer": "Please pay by bank transfer to Hansen & Voss GmbH\nIBAN DE89 3704 0044 0532 0130 00, BIC COBADEFFXXX",
      "tax_label": "VAT",
      "paper": "a4",
      "country": "DE",
      "legal_notes": "Hansen & Voss GmbH, Amtsgericht Hamburg HRB 123456\nManaging directors: Clara Hansen, Henrik Voss",
      "document_language": ""
    },
    "pdf": null,
    "payments": [],
    "invoice_ids": [],
    "response": {
      "name": null,
      "note": null
    },
    "viewed_at": null,
    "accepted_at": null,
    "declined_at": null,
    "paid_at": null,
    "voided_at": null,
    "void_reason": null,
    "last_emailed_at": null,
    "reminders_sent": 0,
    "history": [
      {
        "at": "2026-10-14T08:00:00+00:00",
        "event": "created",
        "detail": "",
        "by": "key 4101 (Pip)"
      },
      {
        "at": "2026-10-14T08:00:00+00:00",
        "event": "updated",
        "detail": "items",
        "by": "key 4101 (Pip)"
      }
    ]
  }
}

Use it when

A draft needs fixing before it is sent. A sent invoice is corrected with a credit note instead.

What it does

Change a draft quote or invoice: give only what changes; customer and items replace the old ones. A sent document can't change: void it with invoices_void and create a new one.

What comes back

The draft as it now is. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
invoice_idRequiredstringThe invoice_id invoices_create returned (quotes and credit notes have one too). Exactly 36 characters.
customerobjectWho the document is for. Link a CRM record with contact_id or company_id, or give name and email (an email that matches a CRM contact links it). What is given here is printed as it is.
customer.contact_idintegerA CRM contact; fills the name and email. At least 1.
customer.company_idintegerA CRM company; fills the name. At least 1.
customer.namestringWho is billed, as printed. Up to 200 characters.
customer.emailstringWhere the document is emailed. Up to 254 characters.
customer.addressstringPostal address, one line per row. Up to 1,000 characters.
customer.tax_idstringThe customer's VAT or tax number, for business customers. A reverse-charge or intra-EU invoice needs their EU VAT ID, e.g. "FR12345678901". Up to 60 characters.
customer.countrystringISO 3166-1 code of the customer's country, e.g. "FR". Checks intra_eu and export invoices; e-invoices need it. Up to 2 characters.
itemsarray of objects1 to 200 items.
items[].descriptionRequiredstringWhat was sold. Lines after the first print smaller, underneath. 1 to 2,000 characters.
items[].quantitynumber or stringDefault 1. Up to 6 decimals, e.g. 1.5 (hours). Up to 24 characters.
items[].unit_priceRequirednumber or stringThe price of one, before tax, e.g. "19.99". Negative for a credit line. Up to 24 characters.
items[].tax_ratenumber or stringTax percent, e.g. 19. Default: the profile's tax_rate. Up to 24 characters.
items[].discountnumber or stringDiscount percent on this line, e.g. 10. Up to 24 characters.
items[].accountstringWith books: the income account this line books to, e.g. "4100" for services. Default: the sales account. Up to 20 characters.
items[].trackingobjectWith books: tracking options, e.g. {"Department": "Service"}.
currencystringISO 4217, e.g. "USD", "EUR" or "JPY". Matches ^[A-Za-z]{3}$.
notesstringPrinted above the lines, e.g. "Thank you for your order" or a project reference. Up to 5,000 characters.
payment_linkstringAn https link to pay this document. Default: the profile's payment_link. Up to 500 characters.
tax_exemptionstringWhy lines with tax_rate 0 carry no tax, printed on the invoice as the law asks: exempt, zero_rated, reverse_charge (the customer accounts for the VAT), intra_eu (goods to a business in another EU country), export (goods leaving the EU), outside_scope, small_business (a business under its country's small-business VAT exemption, such as UStG §19 or art. 293 B CGI: no line may carry tax). Needed in the EU for any line without tax. Default: the profile's. One of: ,exempt,zero_rated,reverse_charge,intra_eu,export,outside_scope,small_business.
tax_exemption_notestringThe wording printed for the exemption instead of the standard one, e.g. "Steuerbefreit als Kleinunternehmer nach § 19 UStG". Up to 300 characters.
e_invoicestringInvoices and their credit notes as EN 16931 e-invoices (German B2B invoices must be from 2027): factur-x (Factur-X/ZUGFeRD, the XML inside the PDF/A-3) or xrechnung (XRechnung 3.0, its own XML beside the PDF), checked against the EN 16931 schema before sending. "" is the default: none, except that from 2027 an invoice from a German business to a German business above EUR 250 is a factur-x; "none" opts out (a business under the EUR 800,000 turnover allowance until 2028). Needs the customer's country. Default: the profile's. One of: ,factur-x,xrechnung,none.
vat_exchange_ratenumber or string or nullFor an invoice in another currency than the national one of the business's country: one unit of it in the national currency, for the VAT shown in both. Default in the EU: the European Central Bank's rate for the day of supply; UK businesses give it. Up to 24 characters.
issue_datestring or nullYYYY-MM-DD, or null to go back to the default. Matches ^\d{4}-\d{2}-\d{2}$.
due_datestring or nullYYYY-MM-DD, or null to go back to the default. Matches ^\d{4}-\d{2}-\d{2}$.
valid_untilstring or nullYYYY-MM-DD, or null to go back to the default. Matches ^\d{4}-\d{2}-\d{2}$.
supply_datestring or nullYYYY-MM-DD, or null to go back to the default. Matches ^\d{4}-\d{2}-\d{2}$.
supply_untilstring or nullYYYY-MM-DD, or null to go back to the default. Matches ^\d{4}-\d{2}-\d{2}$.
payment_terms_daysinteger or null0 to 365.

The call

Over MCP, call invoices_update on https://api.conecto.chat/mcp/invoices. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/invoices_update \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"invoice_id":"2d9c4e7b-1a3f-4c5d-8e6f-0b1a2c3d4e5f","items":[{"description":"Bistro chair, beech\nStackable, for terraces","quantity":45,"unit_price":"320.00","discount":10},{"description":"Delivery and setup","unit_price":"150.00"}]}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_found404No quote or invoice of the business has that invoice_id.Find it with invoices_list and use its invoice_id.
invalid_input400A line, amount, date, currency, country, email or link is not valid, or the total comes out negative or too large.Fix what the message names: amounts like 19.99, dates like 2026-11-20, currencies like EUR.
not_found404The customer's contact_id or company_id is not in the business's CRM.Find the record with crm_search, or give a name and email instead.
not_a_draft409The document was sent, so it cannot change.Void it with invoices_void (its number stays used) and create a new one.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md