invoices.groups.groupSelected
Group 2 to 100 selected existing invoices as one split bill. Give the project, group name, currency and each invoice id with expectedRevision. Atomically creates a group and ties every selected invoice to that project. Invoices may belong to different businesses but must share the chosen currency and have no existing billing group. Stale invoices or an unavailable project refuse the whole change. Amounts, tax, recipients, payments, numbers, sending schedules and status stay as saved. Returns the saved group; inspect it with invoices.groups.get.
/api/v1/accounting/invoices.groups.groupSelectedPermissions
Who can call it
Retries
MCP
accounting_invoices_groups_group_selectedFields
projectIdstring (ID)RequiredThe ID of the related record.
namestringRequiredA display name.
1–200 characters
currencystringRequiredThree-letter currency code, such as CAD or USD.
invoicesarray of objectsRequired2–100 items
idempotencyKeystringRequiredAny unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match.
8–200 characters
Example
curl https://app.getoatmilk.com/api/v1/accounting/invoices.groups.groupSelected \
-H "Authorization: Bearer $OATMILK_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"projectId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
"name": "Synthetic Ventures Inc.",
"currency": "CAD",
"invoices": [
{
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"expectedRevision": 3
},
{
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"expectedRevision": 3
}
]
}'{
"data": { … }
}This action checks your data too, so replace the example values with your own before sending it.
Try it
Try it
Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.
curl https://app.getoatmilk.com/api/v1/accounting/invoices.groups.groupSelected \
-H "Authorization: Bearer $OATMILK_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"projectId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
"name": "Synthetic Ventures Inc.",
"currency": "CAD",
"invoices": [
{
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"expectedRevision": 3
},
{
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"expectedRevision": 3
}
]
}'More in Invoicing.