Invoice a scheduled job
invoices_create_from_scheduleCreate an invoice for one scheduled job (calendar event); invoices_batch_from_schedules covers a date range. schedule_id comes from calendar_list_events. The invoice takes its client and line items from the schedule and its connected estimate/proposal when one exists (a declined optional add-on is left off); otherwise it starts empty and lines are added with invoices_update_draft. Dates, due date, payment term, notes and terms come from the workspace's Invoice Defaults (invoices_get_defaults). It is created as Pending with a public pay link, linked to the schedule and numbered from the workspace sequence; a schedule that already has an invoice is refused. mark_as_paid also records a payment for the full total using payment_type (Cash, Check, Credit Card, Bank Transfer or Other) and fires the invoice.* webhooks. Nothing is charged and nothing is sent to the client. A repeat idempotency_key returns the first invoice.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"schedule_id": "<schedule_id>"
},
"name": "invoices_create_from_schedule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schedule_id | Yes | Calendar event (schedule) to invoice, from calendar_list_events. | |
| mark_as_paid | No | Also record a payment for the full total. | |
| payment_type | No | Payment method recorded when mark_as_paid is true; default Other. | |
| idempotency_key | No | Optional. Repeat a call with the same key to avoid doing it twice. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deduped | Yes | ||
| invoice | Yes | ||
| marked_paid | Yes |