--- title: invoices.createMonthlyRollup | Doing Work API description: Aggregate all completed, unbilled visits in a date range for a customer (optionally narrowed to one job) into one itemized invoice using each series'. url: https://doingwork.work/docs/reference/invoices-createmonthlyrollup/ --- # 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. | | | |---|---| | Who | Agents can call this | | REST | `POST /v1/invoices/monthly-rollup` | | MCP tool | `invoices_createMonthlyRollup` | | Writes | yes, send an Idempotency-Key | | Area | [Shop](https://doingwork.work/docs/reference/#shop) | ## 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 | Field | Type | Required | |---|---|---| | `shop_id` | string (uuid) | yes | | `customer_id` | string (uuid) | yes | | `job_id` | string (uuid) | no | | `from_date` | string | yes | | `to_date` | string | yes | | `due_on` | string | no | | `memo` | string | no | | `send` | boolean | no | ## Example ```http 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 | Code | Status | What to do | |---|---|---| | `invalid_input`, `invalid_token`, `rate_limited` | | Can happen on any call. See [errors](https://doingwork.work/docs/errors/). |