Private preview of the new site. Not live.

invoices.createBatch

Create many invoices at once (up to 100), each from a job and the lines the worker wrote. All or nothing. With send=true each is sent and its pay link returned.

WhoAgents can call this
RESTPOST /v1/invoices/batch
MCP toolinvoices_createBatch
Writesyes, send an Idempotency-Key
AreaShop

When to use it

Create many invoices at once (up to 100), each from a job and the lines the worker wrote. All or nothing.

What to tell the owner

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

Input

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

Example

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

{
  "shop_id": "00000000-0000-4000-8000-000000000000",
  "items": [
    {
      "job_id": "00000000-0000-4000-8000-000000000000",
      "lines": [
        {
          "description": "40 gallon gas heater, installed",
          "quantity": "...",
          "unit_price_minor": 50000
        }
      ]
    }
  ]
}

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.