curl --request POST \
--url https://go.aiinsurance.io/api/v1/companies/{companyId}/financials/events/{eventId}/import \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"invoices": [
{
"actionId": "3a5b7c9d-1e2f-4a4b-6c8d-7e9f0a1b2c3d",
"categoryId": "550e8400-e29b-41d4-a716-446655440101",
"invoiceNumber": "SL-2026-0398",
"incurredDate": "2026-06-01",
"memo": "Imported loss",
"lineItems": [
{
"lineItemId": "550e8400-e29b-41d4-a716-446655440301",
"lineItemTypeId": "550e8400-e29b-41d4-a716-446655440111",
"amountCents": 250000
}
],
"payee": "550e8400-e29b-41d4-a716-446655440210"
}
],
"reserves": [
{
"actionId": "4b6c8d0e-2f3a-4b5c-7d9e-8f0a1b2c3d4e",
"categoryId": "550e8400-e29b-41d4-a716-446655440101",
"expectedTotalCents": 1200000,
"reserveDate": "2026-06-01"
}
]
}
'{
"journalIds": [
"5c7d9e1f-3a4b-4c6d-8e0f-9a1b2c3d4e5f",
"3a5b7c9d-1e2f-4a4b-6c8d-7e9f0a1b2c3d",
"4b6c8d0e-2f3a-4b5c-7d9e-8f0a1b2c3d4e"
],
"invoices": [
{
"id": "550e8400-e29b-41d4-a716-446655440701",
"transactionId": "INV-441202-118",
"invoiceNumber": "SL-2026-0398",
"categoryId": "550e8400-e29b-41d4-a716-446655440101",
"status": "owed",
"linkedEvent": {
"id": "550e8400-e29b-41d4-a716-446655440200",
"displayName": "Claim #1042"
},
"linkedPolicy": null,
"linkedPayee": {
"id": "550e8400-e29b-41d4-a716-446655440210",
"entityType": "Organization",
"displayName": "Smith & Loeb LLP"
},
"incurredDate": "2026-06-01",
"dueDate": null,
"memo": "Imported loss",
"fieldData": null,
"lineItems": [
{
"lineItemId": "550e8400-e29b-41d4-a716-446655440301",
"lineItemTypeId": "550e8400-e29b-41d4-a716-446655440111",
"memo": null,
"amountCents": 250000
}
],
"totalAmountCents": 250000,
"amountPaidCents": 0,
"balanceDueCents": 250000,
"draftAmountPaidCents": null,
"paidDate": null,
"lastPaymentDate": null,
"approved": false,
"approvedAt": null,
"approvalRequired": true,
"voidedAt": null,
"deletedAt": null,
"createdAt": "2026-06-01T10:30:00.000Z",
"updatedAt": "2026-06-01T10:30:00.000Z",
"headJournalId": "3a5b7c9d-1e2f-4a4b-6c8d-7e9f0a1b2c3d"
}
],
"reserves": [
{
"categoryId": "550e8400-e29b-41d4-a716-446655440101",
"expectedTotalCents": 1200000
}
]
}Import Event Financials
Replaces all of one claim’s (event’s) invoices and reserves in one atomic
call: it deletes the claim’s current invoices, creates the invoices you
send, and sets the expected total of each reserve you send. Use it to bulk
load or migrate a claim’s bills and indemnity or expense reserves from
another system, or to re-run that load; it records no payments, so add
them afterwards with Record Payment (recordFinancialsInvoicePayment). To
add one bill without replacing the rest, use Create Invoice
(createFinancialsInvoice), and to change one reserve, use Set Reserves
(setFinancialsReserve).
Wholesale refresh of one event’s financials, in ONE transaction — the
import composition: sweep (delete every non-deleted invoice currently
linked to the event — voided included), then create the new slate of
invoices (each linked to the path event, optional per-invoice payee),
then set the expected total per reserved category. An empty request
(invoices: [], reserves: []) clears the event’s invoices.
Importing replaces, it does not append. The request is the full, authoritative set of the event’s invoices and reserve expectations.
Idempotency — client-authored ids per action. Every create and every
reserve set carries its own client-minted actionId (all unique in one
request); sweep deletes mint their own. The composition commits
atomically, so ANY of your ids already journaled proves the whole prior
run committed: the retry short-circuits to your ids plus refreshed read
state, re-applying nothing. A mix of journaled and fresh ids is
409 ACTION_ID_REUSED (ids reused across different runs).
No If-Match — the composition locks every touched aggregate.
Member-action preconditions surface as 422 with the standard stable
codes (e.g. UNKNOWN_ID, DEPRECATED_CONFIG, NOT_RESERVED_CATEGORY,
FUTURE_DATE, LINK_TARGET_MISSING); preconditions fail closed — the
whole import rolls back. An expected total is UNCONSTRAINED: the
composed reserves.set may land a scope’s expected total below its
paid-to-date — a legal state whose remaining reserve reads negative
(see Set Reserves).
Attachments are sidecar — upload documents through the platform files API; this endpoint takes none.
Required permission: financials.import
curl --request POST \
--url https://go.aiinsurance.io/api/v1/companies/{companyId}/financials/events/{eventId}/import \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"invoices": [
{
"actionId": "3a5b7c9d-1e2f-4a4b-6c8d-7e9f0a1b2c3d",
"categoryId": "550e8400-e29b-41d4-a716-446655440101",
"invoiceNumber": "SL-2026-0398",
"incurredDate": "2026-06-01",
"memo": "Imported loss",
"lineItems": [
{
"lineItemId": "550e8400-e29b-41d4-a716-446655440301",
"lineItemTypeId": "550e8400-e29b-41d4-a716-446655440111",
"amountCents": 250000
}
],
"payee": "550e8400-e29b-41d4-a716-446655440210"
}
],
"reserves": [
{
"actionId": "4b6c8d0e-2f3a-4b5c-7d9e-8f0a1b2c3d4e",
"categoryId": "550e8400-e29b-41d4-a716-446655440101",
"expectedTotalCents": 1200000,
"reserveDate": "2026-06-01"
}
]
}
'{
"journalIds": [
"5c7d9e1f-3a4b-4c6d-8e0f-9a1b2c3d4e5f",
"3a5b7c9d-1e2f-4a4b-6c8d-7e9f0a1b2c3d",
"4b6c8d0e-2f3a-4b5c-7d9e-8f0a1b2c3d4e"
],
"invoices": [
{
"id": "550e8400-e29b-41d4-a716-446655440701",
"transactionId": "INV-441202-118",
"invoiceNumber": "SL-2026-0398",
"categoryId": "550e8400-e29b-41d4-a716-446655440101",
"status": "owed",
"linkedEvent": {
"id": "550e8400-e29b-41d4-a716-446655440200",
"displayName": "Claim #1042"
},
"linkedPolicy": null,
"linkedPayee": {
"id": "550e8400-e29b-41d4-a716-446655440210",
"entityType": "Organization",
"displayName": "Smith & Loeb LLP"
},
"incurredDate": "2026-06-01",
"dueDate": null,
"memo": "Imported loss",
"fieldData": null,
"lineItems": [
{
"lineItemId": "550e8400-e29b-41d4-a716-446655440301",
"lineItemTypeId": "550e8400-e29b-41d4-a716-446655440111",
"memo": null,
"amountCents": 250000
}
],
"totalAmountCents": 250000,
"amountPaidCents": 0,
"balanceDueCents": 250000,
"draftAmountPaidCents": null,
"paidDate": null,
"lastPaymentDate": null,
"approved": false,
"approvedAt": null,
"approvalRequired": true,
"voidedAt": null,
"deletedAt": null,
"createdAt": "2026-06-01T10:30:00.000Z",
"updatedAt": "2026-06-01T10:30:00.000Z",
"headJournalId": "3a5b7c9d-1e2f-4a4b-6c8d-7e9f0a1b2c3d"
}
],
"reserves": [
{
"categoryId": "550e8400-e29b-41d4-a716-446655440101",
"expectedTotalCents": 1200000
}
]
}Authorizations
Path Parameters
Body
Optional display label for the source system's author (e.g. the integrator-side user). Stamped as the journal record's display attribution; the acting principal stays the External API service user, so a label can never impersonate an in-app user. Ignored on idempotent replays
1 - 255Response
A fresh run returns EVERY emitted journal id in execution order (sweep — companions included — then creates, then sets); a short-circuited retry returns the client-authored ids. Either way: the created invoices' current rows and each set scope's refreshed expected total
