curl --request PUT \
--url https://go.aiinsurance.io/api/v1/companies/{companyId}/quotes/{quoteId}/invoicing/plan \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"incurredDate": "2026-01-01",
"voidInvoices": [],
"creates": [
{
"group": "Policy Invoice",
"dueDate": "2026-01-01",
"scheduledDate": "2026-01-01",
"payeeId": "550e8400-e29b-41d4-a716-446655440010",
"lineItems": [
{
"label": "Premium",
"amountCents": 250000
}
]
},
{
"group": "Policy Invoice",
"dueDate": "2026-07-01",
"scheduledDate": "2026-07-01",
"payeeId": "550e8400-e29b-41d4-a716-446655440010",
"lineItems": [
{
"label": "Premium",
"amountCents": 250000
}
]
}
]
}
'{
"quoteId": "550e8400-e29b-41d4-a716-446655440002",
"settings": {
"schedule": {
"paymentPeriod": "quarterly",
"installmentCount": 4,
"firstDueDate": "2026-01-01",
"owedLeadTimeDays": 14,
"avoidWeekendSends": true,
"downPayment": null
},
"payees": [
{
"group": "Policy Invoice",
"payeeId": "550e8400-e29b-41d4-a716-446655440010"
}
],
"endorsementHandling": {
"mode": "void",
"status": "scheduled"
}
},
"settingsSource": "quote",
"plan": {
"incurredDate": "2026-01-01",
"voidInvoices": [],
"creates": [
{
"group": "Policy Invoice",
"dueDate": "2026-01-01",
"scheduledDate": "2026-01-01",
"payeeId": "550e8400-e29b-41d4-a716-446655440010",
"lineItems": [
{
"label": "Premium",
"amountCents": 250000
}
]
},
{
"group": "Policy Invoice",
"dueDate": "2026-07-01",
"scheduledDate": "2026-07-01",
"payeeId": "550e8400-e29b-41d4-a716-446655440010",
"lineItems": [
{
"label": "Premium",
"amountCents": 250000
}
]
}
]
}
}Attach Quote Invoice Plan
Quote door. A quote owns its invoices. This attaches a plan you wrote to the quote, replacing any plan on it, and binding the quote uses it. The settings stay as they are.
The body is a PolicyInvoiceTransactionPlan: the policy’s existing
invoices to void, each with the headJournalId you read, and the invoices
to create. A new business or renewal quote has no existing invoices. Before
the plan is saved it gets the checks a bind runs on a quote’s plan:
billing continuity on an endorsement, cancellation or reinstatement; each
create’s payee; each void’s watermark and whether the invoice can still be
voided; invoice continuity; and that the kept and created invoices add up
to the quote’s fullTermBillingInfo, line item by line item. The plan is
checked again when the quote is bound, against the invoices then current.
To let the quote’s settings write the plan instead, use Generate Quote Invoices.
Refusals. A plan that does not add up returns
422 finv2-quote-invoices-do-not-match-pricing, naming each line that is
off and the fix. A create’s payee the invoice type does not accept returns
422 finv2-policy-create-payee-invalid. A change that drops billing the
policy already has, or voids every invoice while billing still owes,
returns 400 finv2-policy-billing-required or
400 finv2-policy-invoices-required. Nothing is saved. With policy
invoicing disabled, this returns 403 finv2-policy-invoicing-disabled. A
bound or cancelled quote returns 409.
Required permission: quote.edit
curl --request PUT \
--url https://go.aiinsurance.io/api/v1/companies/{companyId}/quotes/{quoteId}/invoicing/plan \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"incurredDate": "2026-01-01",
"voidInvoices": [],
"creates": [
{
"group": "Policy Invoice",
"dueDate": "2026-01-01",
"scheduledDate": "2026-01-01",
"payeeId": "550e8400-e29b-41d4-a716-446655440010",
"lineItems": [
{
"label": "Premium",
"amountCents": 250000
}
]
},
{
"group": "Policy Invoice",
"dueDate": "2026-07-01",
"scheduledDate": "2026-07-01",
"payeeId": "550e8400-e29b-41d4-a716-446655440010",
"lineItems": [
{
"label": "Premium",
"amountCents": 250000
}
]
}
]
}
'{
"quoteId": "550e8400-e29b-41d4-a716-446655440002",
"settings": {
"schedule": {
"paymentPeriod": "quarterly",
"installmentCount": 4,
"firstDueDate": "2026-01-01",
"owedLeadTimeDays": 14,
"avoidWeekendSends": true,
"downPayment": null
},
"payees": [
{
"group": "Policy Invoice",
"payeeId": "550e8400-e29b-41d4-a716-446655440010"
}
],
"endorsementHandling": {
"mode": "void",
"status": "scheduled"
}
},
"settingsSource": "quote",
"plan": {
"incurredDate": "2026-01-01",
"voidInvoices": [],
"creates": [
{
"group": "Policy Invoice",
"dueDate": "2026-01-01",
"scheduledDate": "2026-01-01",
"payeeId": "550e8400-e29b-41d4-a716-446655440010",
"lineItems": [
{
"label": "Premium",
"amountCents": 250000
}
]
},
{
"group": "Policy Invoice",
"dueDate": "2026-07-01",
"scheduledDate": "2026-07-01",
"payeeId": "550e8400-e29b-41d4-a716-446655440010",
"lineItems": [
{
"label": "Premium",
"amountCents": 250000
}
]
}
]
}
}Authorizations
API key authentication. Send your raw API key as the Authorization header value with NO scheme prefix — Authorization: YOUR-API-KEY. Do NOT prefix it with Bearer or ApiKey, and do not use an X-API-Key header; those are not accepted.
Path Parameters
Company identifier
Quote identifier
Body
A fully explicit, detached policy-invoice batch. Existing invoices not named in voidInvoices are kept. The complete kept-plus-created set must conserve each line item of the policy's stated billing. With invoicing enabled, a line item a kept invoice carries but billing omits conserves at 0: a create may credit it on the same line with a negative amount.
Response
The quote's invoicing, with the attached plan.
A quote's invoicing: the settings it generates invoices from and the plan saved on it. Binding the quote uses them. Every quote invoicing endpoint returns this.
The settings a quote generates its invoices from. A PUT sends every field and replaces them all. A GET returns the same shape, so you can change a field of a GET's settings and send the object back.
Show child attributes
Show child attributes
Where settings come from. quote once the quote has settings of its own: saved with Replace Quote Invoice Settings, kept by Generate Quote Invoices, or saved in the app's Billing step. A plan attached without settings counts too, because its schedule is what settings shows. company-defaults while nothing on the quote sets them: settings are the company's payment defaults, applied to this quote.
quote, company-defaults The plan saved on the quote, or null when it holds none.
- Option 1
- Option 2
Show child attributes
Show child attributes
