• 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

InputTypeNeededAbout
action"list" | "draft" | "change" | "send" | "remind" | "paid" | "payments"yespayments is read only.
status"draft" | "open" | "late" | "paid"nolist: only these (late: sent and past due).
numberintegernoThe invoice number. · 1 or more
person_idstringnoWho 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}$`
linesarray of objectnodraft and change. · 1 to 50 items
lines[].whatstringyesWhat it is for. · 1 to 200 characters
lines[].qtynumberyes1 to 10000
lines[].pricenumberyesPrice of one, in the company's currency. · 0 to 10000000
due_onstringnodraft and change: the day it is due, e.g. 2026-11-15.
notestringno1 to 1,000 characters
request_keystringnodraft: one key per invoice, so a retry makes one. · format `^[A-Za-z0-9][A-Za-z0-9:._-]{0,99}$`
paid_onstringnopaid: the day it came in (today if left out).
run_idstringyesThe 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.