invoices.createFromVisit

Create one invoice for a completed visit using the series' standing prices (or custom lines). Prevents double-billing the same visit while an open or paid invoice exists for it; voiding that invoice lets you bill the visit again. Pass send=true when a person who can send invoices sends immediately.

WhoAgents can call this
RESTPOST /v1/invoices/from-visit
MCP toolinvoices_createFromVisit
Writesyes, send an Idempotency-Key
AreaShop

When to use it

Create one invoice for a completed visit using the series' standing prices (or custom lines). Prevents double-billing the same visit while an open or paid invoice exists for it; voiding that invoice lets you bill the visit again.

What to tell the owner

Say what you did in plain words and what happens next.

Input

FieldTypeRequired
visit_idstring (uuid)yes
linesarrayno
lines[].descriptionstringyes
lines[].quantitynumberyes
lines[].unit_price_minorintegeryes
lines[].kindstring (one of item, fee, discount)no
lines[].taxablebooleanno
due_onstringno
memostringno
tax_rate_id['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')']no
sendbooleanno

Example

POST https://doingwork.work/v1/invoices/from-visit
content-type: application/json
Idempotency-Key: 3f1c...

{
  "visit_id": "00000000-0000-4000-8000-000000000000"
}

Output

JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are {code, message, status}.

Errors

CodeStatusWhat to do
invalid_input, invalid_token, rate_limitedCan happen on any call. See errors.