Migration Guide
Migrating to 2025-01-01
Summary
This migration covers three version jumps (2021-01-01 -> 2023-03-15 -> 2024-06-01 -> 2025-01-01) and includes significant restructuring of the API. The collection endpoints have been reorganized under a new /insurance/collection path, policyholder fields have been consolidated into a dedicated Holder object, monetary integer fields have been replaced with MonetaryAmount objects, and the Premium structure has changed to a oneOf polymorphic type.
Breaking Changes
Endpoint paths restructured
All /insurance-collection/* and /insurance-company/* endpoints have been removed and replaced with new paths under /insurance/collection.
Action: Update all endpoint URLs in your integration according to the mapping below.
| Old Endpoint | New Endpoint |
|---|---|
POST /insurance-collection/collect-info | POST /insurance/collection |
GET /insurance-collection/get-data/{collectionId} | GET /insurance/collection/{collectionId}/data |
GET /insurance-collection/status/{collectionId} | GET /insurance/collection/{collectionId}/status |
POST /insurance-collection/supplement-info | POST /insurance/collection/{collectionId}/supplement-info |
GET /insurance-collection/get-parameters | Removed (use GET /companies/availability) |
GET /insurance-collection/parameters/{country} | Removed (use GET /companies/availability) |
GET /insurance-company/status | Removed (use GET /companies/availability) |
Policyholder fields moved to Holder object
The insuranceHolder* fields and otherInsuranceHolder have moved from individual insurance objects into a new Holder object, accessible via the holder field on each insurance type:
insuranceHolderName→holder.nameinsuranceHolderEmail→holder.emailinsuranceHolderPhoneNumber→holder.phoneNumberinsuranceHolderStreetAddress→holder.streetAddressinsuranceHolderPostalCode→holder.postalCodeinsuranceHolderCity→holder.cityotherInsuranceHolder→holder.otherInsuranceHolder
The fields insuranceHolderDateOfBirth, insuranceHolderGender, and insuranceHolderOccupation have been removed entirely with no replacement.
Action: Replace all reads of insuranceHolder* fields with the equivalent fields on the holder object. For example, change insurance.insuranceHolderName to insurance.holder.name and insurance.otherInsuranceHolder to insurance.holder.otherInsuranceHolder.
Removed fields from Insurance base object
The following fields have been removed from Insurance and all insurance type objects:
externalIdpaymentMethodpremiumAmountYearRoundedpremiumFrequencydiscountAmountdiscountPercentagerenewalDate
Action: Remove any references to these fields. Premium frequency and amount information is now available through the restructured Premium object.
MonetaryAmount structure changed
The MonetaryAmount object has been restructured:
currencyCodehas been renamed tocurrency(type changed from string enum to string, still ISO 4217)minorUnitAmount(long, minor units) has been replaced byamount(decimal, major units)
Warning: This is a semantic change, not just a rename. The old minorUnitAmount was expressed in minor currency units (e.g., 1032 for 10.32 EUR). The new amount is expressed in major currency units (e.g., 10.32). Simply renaming the field without adjusting the value interpretation will cause ~100x magnitude errors.
Action: Replace monetaryAmount.currencyCode with monetaryAmount.currency. Replace monetaryAmount.minorUnitAmount with monetaryAmount.amount and remove any minor-to-major unit conversion logic (e.g., dividing by 100), since amount is already in major units.
Integer monetary fields changed to MonetaryAmount
Multiple fields across insurance types that were previously plain integer values are now MonetaryAmount objects with amount and currency fields. This affects:
veterinaryCareAmount,veterinaryCareAmountRemainingon InsuranceAnimal (note:animalPurchasePricehas been removed entirely)insuredMovablesAmounton InsuranceCottage, InsuranceHome, InsuranceVillainsuredAmountandinsuredMonthlyAmounton InsuranceIncomeinsuredAmountBaseEconomicalDisability,insuredAmountBaseMedicalDisability,insuredAmountLife,insuredAmountMaxMedicalDisabilityon InsuranceAccident, InsuranceChildinsuredAmountLifeon InsuranceLifeinsuredAmountBaseMedicalDisabilityon InsurancePregnancy
Note: insuredMovablesAmount on InsuranceFarm remains an integer.
Action: Update all reads of these fields from field (integer) to field.amount (number) and field.currency (string).
Premium structure changed
The Premium object has changed from a flat object to a oneOf polymorphic type with market-specific variants.
Field changes on the base Premium:
amountis now a MonetaryAmount object (was a plain number)frequency(string enum) has been renamed topaymentFrequency(integer — number of payments per year)period(PremiumPeriod) is a new field describing the billing periodtaxationhas moved to FrenchPremium (still available in FR)
Action: Update your Premium parsing logic to handle the new polymorphic structure. Rename premium.frequency to premium.paymentFrequency and update the type from string enum to integer. Read premium.amount as a MonetaryAmount object. Access taxation via the FrenchPremium variant.
InsuranceCar coverage enum changed
On InsuranceCar, the coverage enum value COMPREHENSIVE has been removed and THIRD_PARTY and THIRD_PARTY_PLUS have been added.
Action: Update any logic that checks for the COMPREHENSIVE coverage value. Map it to the appropriate new value (THIRD_PARTY or THIRD_PARTY_PLUS) based on your use case.
Removed fields on specific insurance types
insuranceLevelremoved from InsuranceCar
Action: Remove any references to these fields in your code.
InsuranceWrapper variants reduced
The InsuranceWrapper oneOf has been reduced from 12 variants to 8: InsuranceAnimal, InsuranceVehicle (oneOf InsuranceCar, InsuranceOtherVehicle), InsurancePerson, InsuranceHouseContent (oneOf InsuranceHome, InsuranceVilla), InsuranceIncome, InsuranceCottage, InsuranceFarm, InsuranceGeneral. The removed top-level types InsuranceAccident, InsuranceChild, InsurancePregnancy, and InsuranceLife are now sub-types of InsurancePerson, along with a new CoreInsurancePerson variant for generic person/health insurance. Market-specific types (e.g., FrenchInsuranceCar, FrenchInsuranceHome) have been folded into the base types with a @market discriminator field.
Action: Update your insurance type handling logic. If you previously matched on InsuranceAccident, InsuranceChild, InsurancePregnancy, or InsuranceLife as top-level wrapper variants, access them through the InsurancePerson wrapper instead. Handle the new CoreInsurancePerson variant. Use the @market field on insurance objects to determine market-specific behavior.
CompanyAvailability field renames
insuranceCompanyrenamed tocompanyinsuranceCompanyDisplayNamerenamed tocompanyDisplayName- New field
companyGroupadded
Action: Update field references from insuranceCompany to company and insuranceCompanyDisplayName to companyDisplayName.
CollectionStatus information map changes
The CollectionStatusInformationMap has new keys and removed keys:
- Added:
AVAILABLE_TWO_FACTOR_METHODS,INSTRUCTIONS,REFERENCE_NUMBER,REQUIRED_INPUT_TYPES,RESEND_CODE_THRESHOLD_SECONDS,TWO_FACTOR_AUTHENTICATION_INSTRUCTION - Removed:
SELECTED_TWO_FACTOR_METHOD
Action: Update your status polling logic to handle the new information map keys. The two-factor authentication flow has been restructured around the new AVAILABLE_TWO_FACTOR_METHODS and TWO_FACTOR_AUTHENTICATION_INSTRUCTION keys.
New Features
New collection endpoints
DELETE /insurance/collection/{collectionId}— delete a collection and its associated dataGET /insurance/collection/{collectionId}/policy/{policyId}/document/{documentId}— download policy documents
New collection status values
The CollectionStatus status enum includes many new values that your status-polling logic must handle:
ACCOUNT_TEMPORARILY_LOCKED— end user's access temporarily blocked; retry after ~15 minutesAUTHENTICATION_CANCELLED— user cancelled the authentication flowAUTHENTICATION_CONFLICT— another authentication session is already in progressAUTHENTICATION_MISMATCH— authenticated identity does not match the expected userAUTHENTICATION_TIMEOUT— authentication was not completed in timeCOLLECTION_INPUT_PENDING— waiting for additional input via supplement-infoCOLLECTION_INPUT_TIMEOUT— supplement-info input was not provided in timeCONTACT_FORM— a contact form must be completed to proceedCONTACT_FORM_PENDING— waiting for contact form submissionCUSTOMER_ENROLLMENT_REQUIRED— user must enroll with the provider before data can be collectedFAILED_PDF_PARSE— PDF document could not be parsedFAILED_PDF_USER_INPUT— user-provided PDF input was invalidKYC_FORM— a KYC form must be completedTHIRD_PARTY_ERROR— the insurance provider returned an unexpected errorTWO_FACTOR_METHOD_SELECTION_TIMEOUT— two-factor method selection was not completed in timeWAITING_FOR_USER_ACTION— collection is paused until the user takes action
Action: Ensure your status-polling logic handles these new values gracefully. At minimum, treat unknown statuses as non-terminal so your polling loop continues.
Holder object
The new Holder object provides a structured representation of the policyholder, replacing the flat insuranceHolder* fields.
Coverage and document objects
New Coverage and ApiCoverageDocument objects on FullInsuranceWrapper provide structured coverage details and associated documents.
Additional fields on insurance types
brand,model,registrationNoadded to InsuranceCar and InsuranceOtherVehicle- Property details (
insuranceObjectCity,insuranceObjectPostalCode,insuranceObjectStreetAddress,livingArea,numberOfResidents) added to InsuranceHome, InsuranceCottage, and InsuranceVilla - Extended property fields (
additionalBuildings,ancillaryArea,constructionYear,hasBasement,numberOfBathrooms,numberOfFloors,purchaseYear,rental,farmProperties) added to InsuranceFarm - Extended property fields (
additionalBuildings,hasBasement,numberOfBathrooms,numberOfFloors,purchaseYear,rental) added to InsuranceVilla
Migration Checklist
- Update
Insurely-Versionheader to2025-01-01 - Update all endpoint URLs from
/insurance-collection/*to/insurance/collection/* - Replace
/insurance-company/statusand/insurance-collection/get-parameterswith/companies/availability - Update
insuranceCompanytocompanyandinsuranceCompanyDisplayNametocompanyDisplayNamein company availability responses - Migrate all
insuranceHolder*field reads to the newholderobject - Remove references to
externalId,paymentMethod,premiumAmountYearRounded, andpremiumFrequency - Update all integer monetary fields to read from
MonetaryAmountobjects (.amountand.currency) - Rename
currencyCodetocurrencyin any existingMonetaryAmounthandling - Update premium parsing: rename
frequencytopaymentFrequency(now integer), readamountas MonetaryAmount, accesstaxationviaFrenchPremium - Replace
COMPREHENSIVEwithTHIRD_PARTYorTHIRD_PARTY_PLUSin car coverage logic - Update
InsuranceWrapperhandling:InsuranceAccident,InsuranceChild,InsurancePregnancy,InsuranceLifeare now sub-types ofInsurancePerson - Update two-factor authentication flow to use new
CollectionStatusInformationMapkeys - Handle new collection status values (see full list above):
ACCOUNT_TEMPORARILY_LOCKED,AUTHENTICATION_TIMEOUT,THIRD_PARTY_ERROR,WAITING_FOR_USER_ACTION, and others - Remove references to
insuranceLevel(car)
Field Mapping Table
| Object | Old | New | Change |
|---|---|---|---|
| Insurance | insuranceHolderName (string) | holder.name (string) | Moved to Holder |
| Insurance | insuranceHolderDateOfBirth (string) | -- | Removed |
| Insurance | insuranceHolderEmail (string) | holder.email (string) | Moved to Holder |
| Insurance | insuranceHolderPhoneNumber (string) | holder.phoneNumber (string) | Moved to Holder |
| Insurance | insuranceHolderStreetAddress (string) | holder.streetAddress (string) | Moved to Holder |
| Insurance | insuranceHolderCity (string) | holder.city (string) | Moved to Holder |
| Insurance | insuranceHolderPostalCode (string) | holder.postalCode (string) | Moved to Holder |
| Insurance | insuranceHolderGender (string) | -- | Removed |
| Insurance | insuranceHolderOccupation (string) | -- | Removed |
| Insurance | otherInsuranceHolder (boolean) | holder.otherInsuranceHolder (boolean) | Moved to Holder |
| Insurance | externalId (string) | -- | Removed |
| Insurance | paymentMethod (string) | -- | Removed |
| Insurance | premiumAmountYearRounded (integer) | -- | Removed |
| Insurance | premiumFrequency (string) | -- | Removed |
| All insurance types | discountAmount (integer) | -- | Removed (FR only) |
| All insurance types | discountPercentage (integer) | -- | Removed (FR only) |
| All insurance types | renewalDate (string) | -- | Removed (FR only) |
| Premium | amount (number) | amount (MonetaryAmount) | Type changed |
| Premium | frequency (string enum) | paymentFrequency (integer) | Renamed + type changed |
| Premium | taxation (string) | FrenchPremium.taxation | Moved to FrenchPremium |
| Premium | -- | period (PremiumPeriod) | New field |
| All insurance types | premium (Premium) | premium (oneOf) | Structure changed |
| MonetaryAmount | currencyCode (string enum) | currency (string) | Renamed |
| MonetaryAmount | minorUnitAmount (long, minor units) | amount (decimal, major units) | Replaced — semantic change |
| InsuranceCar | coverage: COMPREHENSIVE | -- | Removed; THIRD_PARTY, THIRD_PARTY_PLUS added |
| InsuranceCar | insuranceLevel (string) | -- | Removed |
| CompanyAvailability | insuranceCompany (string) | company (string) | Renamed |
| CompanyAvailability | insuranceCompanyDisplayName (string) | companyDisplayName (string) | Renamed |
| FullInsuranceWrapper | parameters (object) | -- | Removed |
| FullInsuranceWrapper | -- | coverage (Coverage) | Added |
| FullInsuranceWrapper | -- | id (string) | Added |