invoices.createMonthlyRollup

Aggregate all completed, unbilled visits in a date range for a customer (optionally narrowed to one job) into one itemized invoice using each series' standing prices. Returns visit_count: 0 when nothing is unbilled. Never double-bills visits already on a live invoice.

WhoAgents can call this
RESTPOST /v1/invoices/monthly-rollup
MCP toolinvoices_createMonthlyRollup
Writesyes, send an Idempotency-Key
AreaShop

When to use it

Aggregate all completed, unbilled visits in a date range for a customer (optionally narrowed to one job) into one itemized invoice using each series' standing prices. Returns visit_count: 0 when nothing is unbilled.

What to tell the owner

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

Input

FieldTypeRequired
shop_idstring (uuid)yes
customer_idstring (uuid)yes
job_idstring (uuid)no
from_datestringyes
to_datestringyes
due_onstringno
memostringno
sendbooleanno

Example

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

{
  "shop_id": "00000000-0000-4000-8000-000000000000",
  "customer_id": "00000000-0000-4000-8000-000000000000",
  "from_date": "...",
  "to_date": "..."
}

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.