Read a contract back
Writing a contract and reading one back are different problems. Writing is a fixed sequence, and the rest of this guide walks it. Reading is a set of questions that arrive in no particular order — which cover did they buy, what will actually be debited, is this waiting on a payment, which draft is live — and the answers are spread across three endpoints and nested a few levels into their responses.
Questions to understand a contract
| Question | Call | Field |
|---|---|---|
| What cover did they buy? | GET /assets/{assetId}, then GET /quotes/{quoteId} | quoteId, then quote.options.tier, .excess, .perils |
| What is the premium? | GET /policies/{policyId}, then GET /quotes/{quoteId}/price?frequency[amount]=<amount>&frequency[unit]=<unit>&includeChildQuotes=true | quoteId, then recurringPrice.amountWithFeesAndTaxes |
| What gets debited first? | GET /policies/{policyId}/premium-schedule | the first entry's premium |
| Is it waiting on the first premium? | GET /policies/{policyId} | isAwaitingFirstPayment |
| Which draft is live? | GET /policies/{policyId}/branches | branchStatus === "BRANCH_OPEN" |
| When does cover really start? | GET /policies/{policyId} | startedAt, endedAt — as Paris days |
Every amount is an integer number of cents.
The cover is on the asset, not the policy
Cover is chosen per insured item, so the chosen tier is on the asset's quote — not on the policy's. The
policy and each asset carry the id of their quote as quoteId; the quote itself is read by that id:
GET /assets/{assetId}
quoteId "<quoteId>"
GET /quotes/<quoteId>
quote.options.tier "STANDARD"
quote.options.excess "DEFAULT"
quote.options.perils [ … ]
The policy's quote holds the price common to its assets — quote.basePrice, quote.components,
quote.totalPremium — but not the choice that produced it. A policy covering several items has a tier per
item, so read each asset's quote rather than looking for one contract-level value. See
Read a stored quote.
Do not recover the tier from quote.provider.id. It is a pricing-engine identifier whose shape varies per
product, so parsing it works on the product you tested and breaks on the next one.
What will actually be debited
The premium on a stored quote covers the whole contract. It is almost never the first amount charged, and showing it on a payment screen tells the customer the wrong number at the worst moment.
Three reads help, and they do not return the same amount:
frequencyquery parameterOn
GET /quotes/{quoteId}andGET /quotes/{quoteId}/price. Prorates the stored quote to one billing period. Pass the policy'sinvoicingConfig.frequencyDurationasfrequency[amount]andfrequency[unit].
GET /quotes/{quoteId}?includeChildQuotes=truereturns the asset quotes inchildQuotes. They are not added to the policy quote'stotalPremium.GET /quotes/{quoteId}/price?includeChildQuotes=trueadds the asset premiums intorecurringPrice, and keeps the one-off charges apart inoneOffCharges. WithoutincludeChildQuotes, it prices the quote alone.
Neither is the amount due: they price one period and keep one-off charges apart, and neither knows about the
first payment or an early-payment arrangement.
GET /policies/{policyId}/premium-schedule gives the full schedule as a list of intervals, each entry
carrying startAt, endAt, premium and components. Use it to show what will be paid and when, rather
than computing a schedule yourself from invoicingConfig.
The gap is wide enough to matter: a contract billed monthly debits a twelfth of the annual premium
first, and an early-payment arrangement debits several months at once. Deriving which from frequency,
timing, firstPayment and earlyPayment by hand is possible and easy to get wrong; the premium schedule
gives it to you directly.
Whether it is waiting on money
isAwaitingFirstPaymentbooleanOn the policy. True when the contract is signed and its start date reached, but the first premium has not been collected and the product requires it before cover begins.
This is the field behind the state described in Collect payment: a signed contract with a start date in the past that is still not in force. Read the boolean rather than inferring the state from a status plus a date comparison.
Which draft is live
A contract can have several branches, and a closed one still appears in some listings. Filter on status rather than taking the first entry:
GET /policies/{policyId}/branches
branchStatus BRANCH_OPEN | BRANCH_MERGED | BRANCH_CLOSED
closeReason why a closed branch was closed
BRANCH_OPEN is the work in progress. This matters most when resuming a visitor: see
Anonymous quoting.
Dates you read are not dates you display
startedAt and endedAt come back as instants, and they are Paris-day boundaries expressed in UTC — so
a contract starting 1 September reads as 2026-08-31T22:00:00.000Z. Slicing that string gives the wrong
calendar day, and rehydrating a date input from it corrupts the contract on every resume.
Convert through Europe/Paris before displaying a date or loading one into an input. The rule and the
worked example are in
Reading dates back.
What create calls return
Writes are deliberately thin. POST /assets returns { type, id }; POST /policies/{policyId}/quote
returns an empty body; PATCH calls return little or nothing. None of them echoes the stored entity.
So after any write whose result you intend to show, read the entity back. That is not only an asynchronous-step precaution — registry enrichment, document extraction, defaults and calculated pricing fields all mean the stored values differ from what you sent.