Save a recurring invoice
recurring_invoiceSave or end a recurring invoice: a template with a rhythm. A job makes an ordinary invoice draft when one is due and asks for its issue at once (submit, default true while the owner's switch for the AI's issue of invoices is on): under My AI decides it is issued then, otherwise it waits on the approval page. submit=false keeps the drafts as drafts. what=save: name (left out: the customer and the rhythm), customer (code), rhythm (weekly, monthly, quarterly, yearly), start_date (the day of the opening draft, left out: today), lines (item_code and quantity alone take the product's name, price, VAT code and account), optional end_date, notes, buyer_reference, order_reference, language, series; '{period}' in a line description or the notes becomes the period of each draft; the same idempotency_key again replaces an active template of this connection; recurring_id with the fields edits one (start_date is then the next invoice date; a new rhythm or next date of one that made drafts carries on as a new template). what=end: end one, with reason. what=pause and what=resume (round 830): recurring_id; a paused one makes no draft, and resumed it goes on from the next date of its rhythm from today. email=true on save, or what=email with recurring_id and email true or false (round 842): each invoice it makes is emailed to the customer as it is issued. Terms (round 877), on save or alone with what=terms and recurring_id: billing advance (dated the opening day of its period) or arrears (made and dated on the last day, for the period that ended); pro_rata_first true charges the opening period from start_date to the next calendar month, quarter, year or week for its days only; price_changes [{"from": "2027-01-01", "unit_price": "120.00", "line": 1}] (line left out: every line) gives a period that starts on or after the date the new price; notice_months the notice period, counted in notice_unit (days, weeks or months; months when left out); an end_date inside a period makes the last draft pro rata to that day. what=notice with recurring_id and notice_on (left out: today): the contract ends on the last day of the earliest period that ends after the notice period. Writes only; reading is a separate tool. Money going out regularly (rent, salaries, subscriptions, loans) is a rule too: what=payment adds one or changes one the books learned (key from the cash forecast, field regular): name, amount, currency, rhythm (weekly, monthly, quarterly, yearly, once), start_date as its next day, end_date; every field may stay empty, one left out keeps what it had. what=payment_stop with key takes one off. Nothing is booked.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "recurring_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | ||
| name | No | ||
| what | No | save | |
| No | |||
| lines | No | ||
| notes | No | ||
| amount | No | ||
| reason | No | ||
| rhythm | No | ||
| series | No | ||
| submit | No | ||
| billing | No | ||
| company | No | ||
| currency | No | ||
| customer | No | ||
| end_date | No | ||
| language | No | ||
| notice_on | No | ||
| start_date | No | ||
| notice_unit | No | ||
| recurring_id | No | ||
| notice_months | No | ||
| price_changes | No | ||
| pro_rata_first | No | ||
| buyer_reference | No | ||
| idempotency_key | No | ||
| order_reference | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||