• AI reference · Always listed
invoice
Change an invoice. Draft, change, send or remind an invoice; sends wait for the owner's yes. Only a draft changes or is sent. Marking one paid is the owner's.
Where it is
Always listed: call it by its name.
Does it need a yes?
Depends on what it changes: the everyday part runs at once, anything that reaches people or core files waits for the owner's yes. Here: a draft is busywork; sending it is an email's yes.
Inputs
| Input | Type | Needed | About |
|---|---|---|---|
action | "list" | "draft" | "change" | "send" | "remind" | "paid" | "payments" | yes | payments is read only. |
status | "draft" | "open" | "late" | "paid" | no | list: only these (late: sent and past due). |
number | integer | no | The invoice number. · 1 or more |
person_id | string | no | Who it is for (draft), or whose invoices (list). · format `^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$` |
lines | array of object | no | draft and change. · 1 to 50 items |
lines[].what | string | yes | What it is for. · 1 to 200 characters |
lines[].qty | number | yes | 1 to 10000 |
lines[].price | number | yes | Price of one, in the company's currency. · 0 to 10000000 |
due_on | string | no | draft and change: the day it is due, e.g. 2026-11-15. |
note | string | no | 1 to 1,000 characters |
request_key | string | no | draft: one key per invoice, so a retry makes one. · format `^[A-Za-z0-9][A-Za-z0-9:._-]{0,99}$` |
paid_on | string | no | paid: the day it came in (today if left out). |
run_id | string | yes | The run_id from start. Pass it on every call: it keeps your task held. · 1 to 100 characters |
Example
{
"name": "invoice",
"arguments": {
"action": "list",
"run_id": "the run_id from start"
}
}When it is refused
invalid: The input isn't right. The sentence names the field and the fix; nothing was done. Fix it and call again.not_found: No such thing in this company (a task, file, person, record). Check the number or name, or list first.not_allowed: Not without another step: the owner's yes, your own task held with pick_up, or a setting the owner turns on. The sentence says which.taken: Someone else holds it (another AI on that task). Pick another task.stale: It changed since you read it. Read it again and use the new version.failed: On our side or a service's, never your input. Try again in a minute; if it keeps failing, call report_problem.