Skip to main content
Version: 0.2.0

Bilforsikring (Car Insurance)

API Documentation for Car Insurance integration with the Consumer Council's insurance service.

Request from Consumer Council

When the Consumer Council sends a request to the insurance company, it will be in JSON format. This request contains information about the person to be insured, as well as details about the specific offer that has been requested. The request will be sent to the company's specified endpoint.

The information about the person to be insured will be built based on data from the National Registry, the Norwegian Public Roads Administration, and OFV.

In the header, we will include X-RequestId which is unique, and X-ClientId which will be finansportalen.

Missing match between Financial Portal Insurance and Companies' value limits

Where amount limits and values in the Financial Portal Insurance calculator must be selected as alternatives in the user interface, and the Insurance Company does not operate with the same limits in their price tariffs, the Insurance Company shall nevertheless return a price. The price shall be returned in the form of the nearest value to the customer's benefit, for example the nearest price at the nearest higher mileage.

Example Request

{
"id": "string",
"person": {
"pid": "string",
"firstName": "string",
"lastName": "string",
"addresses": [
{
"source": "string",
"streetName": "string",
"postalCode": "string",
"postalLocation": "string"
}
],
"memberships": [
{
"membershipId": "string",
"membershipName": "string"
}
]
},
"offerRequest": [
{
"id": "string",
"type": "bil",
"data": {
"coverage": "string",
"addons": ["leiebil", "maskinskade"],
"bonus": "string",
"yearlyMileage": 0,
"youngestDriver": 0,
"loan": false,
"currentMileage": 0,
"currentAccidents": 0,
"lastAccidentDate": "string",
"deductible": 0,
"carOwner": {
"ownerType": "string",
"leasingCompanyOrg": "string",
"otherOwner": {
"pid": "string",
"firstName": "string",
"lastName": "string"
}
},
"car": {
"source": "ofv",
"regNumber": "string",
"registrationDate": "2023-01-01",
"structureNo": "4360005000112020000",
"variantId": 419436,
"vehicleGroup": "Personbil",
"modelYear": 2024,
"brandName": "Tesla",
"brandCode": 4360,
"modelName": "Model Y",
"modelCode": 5,
"modelGeneration": "1",
"modelSplitName": null,
"variantName": "Long Range AWD",
"variantCode": 11,
"segment": "SUV mellomklasse",
"chassisShortName": "SUV",
"chassis": "Sport Utility Vehicle",
"transmissionShortName": "AUT",
"transmission": "Automat",
"energySourceShortName": "E",
"energySource": "Elektrisitet",
"totalEngines": 2,
"emissionStandard": "Euro 6",
"importPrice": 471587,
"currencyCode": "NOK",
"approved": "2024-10-16T12:06:00Z",
"transferred": "2024-10-16"
}
}
}
],
"requestAt": "2024-10-16T12:06:00Z"
}

Request Field Descriptions

Root Level Fields

FieldTypeDescription
idstringThe unique ID for the request
requestAtstringThe date and time when the request was sent. ISO 8601 (complete). Example: "2024-10-16T12:06:00Z" or "2024-10-16T11:06:00+01:00"

Person Object

FieldTypeDescription
pidstringThe personal identification number of the person to be insured. Example: "01019612345"
firstNamestringThe first name of the person to be insured. Example: "Ole"
lastNamestringThe last name of the person to be insured. Example: "Nordmann"
addressesarrayInformation about the address of the person to be insured
membershipsarrayInformation about various memberships of the person to be insured. Can be an empty list

Address Object

FieldTypeDescription
sourcestringSource of the address. Example: "National Registry"
streetNamestringStreet name of the address. Example: "Ole Nordmanns Gate 1"
postalCodestringPostal code of the address. Example: "0123"
postalLocationstringPostal location of the address. Example: "OSLO"

Membership Object

FieldTypeDescription
membershipIdstringThe ID of the membership. Example: "MEMB-001"
membershipNamestringThe name of the membership. Example: "Tekna"

Offer Request Object

FieldTypeDescription
idstringThe unique ID for the request for an offer on this product
typestringType of product. Value: "bil"
dataobjectData for the offer

Offer Data Object

FieldTypeDescription
coveragestringCoverage for the insurance. Values: "ansvar", "delkasko", "kasko", "utvidet"
addonsarrayAdditional services for the insurance. Can be an empty list. Values: "leiebil", "maskinskade"
bonusstringBonus for the insurance. Example: "75% > 5 år"
yearlyMileageintegerAnnual mileage. Example: 10000
youngestDriverinteger, nullableAge of the youngest driver. Example: 22
loanbooleanWhether there is a loan on the car. Example: false
currentMileageintegerCurrent mileage. Example: 45000
currentAccidentsintegerNumber of accidents. Example: 0
lastAccidentDatestringDate of the last accident. Example: "2024-10-16"
deductibleintegerDeductible for the insurance. Example: 5000

Car Owner Object

FieldTypeDescription
ownerTypestringType of owner. Values: "sameAsPerson", "otherOwner", "leasing"
leasingCompanyOrgstring, optional/nullableOrganization number for leasing company. Example: "123456789"
otherOwnerobject, optional/nullableInformation about another owner

Other Owner Object

FieldTypeDescription
pidstringPersonal identification number of another owner. Example: "987654321"
firstNamestringFirst name of another owner. Example: "Alice"
lastNamestringLast name of another owner. Example: "Wonderland"

Car Object

Information about the car to be insured. Data with source "ofv" is not available for vehicles retrieved from "tenor" in the test environment.

FieldTypeDescription
sourcestringSource of car data. Values: "ofv", "tenor" (only in test environment)
regNumberstring, optional/nullableRegistration number of the car. Example: "AB12345"
registrationDatedateDate of first registration. Source: ofv. Example: "2023-01-01"
structureNostringStructure number for the car. Source: ofv. Example: "4360005000112020000"
variantIdintegerVariant ID for car model. Source: ofv. Example: 419436
vehicleGroupstringVehicle group. Source: ofv. Example: "Personbil"
modelYearintegerModel year of the car. Source: ofv. Example: 2025
brandNamestringBrand name of the car. Source: ofv. Example: "Tesla"
brandCodeintegerBrand code of the car. Source: ofv. Example: 4360
modelNamestringModel name of the car. Source: ofv. Example: "Model Y"
modelCodeintegerModel code of the car. Source: ofv. Example: 5
modelGenerationstringModel generation of the car. Source: ofv. Example: "1"
modelSplitNamestring, nullableAdditional model specification. Source: ofv. Example: "Sportwagon"
variantNamestringVariant name for car model. Source: ofv. Example: "Long Range AWD"
variantCodeintegerVariant code for car model. Source: ofv. Example: 11
segmentstringThe segment the car belongs to. Source: ofv. Example: "SUV mellomklasse"
chassisShortNamestringChassis code for the car. Source: ofv. Example: "SUV"
chassisstringChassis description for the car. Source: ofv. Example: "Sport Utility Vehicle"
transmissionShortNamestringCode for transmission. Source: ofv. Example: "AUT"
transmissionstringType of transmission. Source: ofv. Example: "Automat"
energySourceShortNamestringCode for energy source. Source: ofv. Example: "E"
energySourcestringType of energy source. Source: ofv. Example: "Elektrisitet"
totalEnginesintegerNumber of engines. Source: ofv. Example: 2
emissionStandardstringEmission class. Source: ofv. Example: "Euro 6"
importPriceintegerImport price of the car. Source: ofv. Example: 471587
currencyCodestringCurrency code for import price. Source: ofv. Example: "NOK"
approvedstringTime of approval. ISO 8601 (complete). Source: ofv. Example: "2024-10-16T12:06:00Z"
transferredstring, nullableTime of transfer. ISO 8601 (date only). Source: ofv. Example: "2024-10-16"

Multiple Offers Request

If the request contains multiple offers, the request will look like this. Here, an additional offer (offerRequest) has been added for each unique car:

{
"id": "string",
"person": {
"pid": "string",
"firstName": "string",
"lastName": "string",
"addresses": [
{
"source": "string",
"streetName": "string",
"postalCode": "string",
"postalLocation": "string"
}
],
"memberships": [
{
"membershipId": "string",
"membershipName": "string"
}
]
},
"offerRequest": [
{
"id": "678aufj",
"type": "bil",
"data": {
"coverage": "ansvar",
"addons": ["leiebil", "maskinskade"],
"bonus": "string",
"yearlyMileage": 0,
"youngestDriver": 0,
"loan": false,
"currentMileage": 0,
"currentAccidents": 0,
"lastAccidentDate": "string",
"deductible": 0,
"car": {
"source": "string",
"regNumber": "string"
}
}
},
{
"id": "asdf43",
"type": "bil",
"data": {
"coverage": "kasko",
"addons": ["leiebil", "maskinskade"],
"bonus": "string",
"yearlyMileage": 0,
"youngestDriver": 0,
"loan": false,
"currentMileage": 0,
"currentAccidents": 0,
"lastAccidentDate": "string",
"deductible": 0,
"car": {
"source": "string",
"regNumber": "string"
}
}
}
],
"requestAt": "2024-10-16T12:06:00Z"
}

Tenor Test Data Request

In the test environment, there may also be requests with vehicles from Tenor's dataset. These do not contain information from the OFV database:

{
"id": "string",
"person": {
"pid": "string",
"firstName": "string",
"lastName": "string",
"addresses": [
{
"source": "string",
"streetName": "string",
"postalCode": "string",
"postalLocation": "string"
}
],
"memberships": [
{
"membershipId": "string",
"membershipName": "string"
}
]
},
"offerRequest": [
{
"id": "string",
"type": "bil",
"data": {
"coverage": "string",
"addons": ["leiebil", "maskinskade", "veihjelp"],
"bonus": "string",
"yearlyMileage": 0,
"youngestDriver": 0,
"loan": false,
"currentMileage": 0,
"currentAccidents": 0,
"lastAccidentDate": "string",
"deductible": 0,
"carOwner": {
"ownerType": "string",
"leasingCompanyOrg": "string",
"otherOwner": {
"pid": "string",
"firstName": "string",
"lastName": "string"
}
},
"car": {
"source": "tenor",
"regNumber": "string"
}
}
}
],
"requestAt": "2024-10-16T12:06:00Z"
}

Allowed Values

Certain fields in the car insurance API have predefined values. Below are the allowed values for each of these special fields:

Bonus Values

DescriptionAPI Value
75% > 5 years75% > 5 år
75% > 4 years75% > 4 år
75% > 3 years75% > 3 år
75% > 2 years75% > 2 år
75%75%
70% > 5 years70% > 5 år
70% > 4 years70% > 4 år
70% > 3 years70% > 3 år
70% > 2 years70% > 2 år
70%70%
60%60%
50%50%
40%40%
30%30%
20%20%
10%10%
0%0%
-10%-10%
-20%-20%
-30%-30%
-40%-40%

Membership Values

DescriptionAPI Value
LO FavorLO Favør
TeknaTekna
AkademikerneAkademikerne
NAFNAF
TuristforeningenTuristforeningen

Yearly Mileage Values

DescriptionAPI Value
5000km5000
7000km7000
10000km10000
12000km12000
16000km16000
20000km20000
25000km25000
30000km30000
40000km40000
50000km50000
Unlimited0

Deductible Values

DescriptionAPI Value
1000kr1000
2000kr2000
3000kr3000
4000kr4000
5000kr5000
6000kr6000
8000kr8000
10000kr10000
12000kr12000
14000kr14000
16000kr16000
20000kr20000
25000kr25000
30000kr30000
35000kr35000

Youngest Driver Age Values

DescriptionAPI Value
24 years or older24
23 years23
22 years22
21 years21
20 years20
19 years19
18 years18

Response from Insurance Company

This is a description of how the response from the insurance company should be structured.

Example Response

{
"id": "string",
"company": "string",
"totalPrice": 0,
"totalDiscount": 0,
"totalOriginalPrice": 0,
"discountDescription": "string",
"basePrice": 0,
"products": [
{
"id": "string",
"type": "string",
"productName": "string",
"prices": {
"price": 0,
"discount": 0,
"originalPrice": 0,
"tfa": 0.0
},
"productDetails": {
"coverage": "string",
"ipidUrls": [
{
"url": "string"
}
],
"termsUrls": [
{
"url": "string"
}
]
},
"offer": {
"bonus": "20%",
"deductible": 0,
"yearlyMileage": 0
}
}
],
"purchaseUrl": "string",
"receivedAt": "string",
"responseAt": "string"
}

Response Field Descriptions

Root Level Fields

FieldTypeDescription
idstringThe unique ID for the request for an offer on this product
companystringThe name of the insurance company. Example: "Forsikringsselskap"
totalPriceintegerTotal price for all products after discount. Example: 4500
totalDiscountintegerTotal discount for all products. Example: 200
totalOriginalPriceintegerTotal original price for all products before discount. Example: 4700
discountDescriptionstringDescription of the discount that has been given. Example: "Loyalty discount applied"
basePriceintegerBase price that is included in the calculation of the total price given. Example: 0
purchaseUrlstring, optional/nullableURL for purchasing the products. Example: "https://example.com/purchase"
receivedAtstringTime when the request was received. ISO 8601 (complete). Example: "2024-10-16T12:06:00Z"
responseAtstringTime when the response was sent. ISO 8601 (complete). Example: "2024-10-16T12:06:00Z"

Products Array

FieldTypeDescription
idstringThe unique ID for the product. Example: "123456789"
typestringType of product (car, travel, house, home contents). Example: "bil"
productNamestringThe name of the product. Example: "Bilforsikring"

Prices Object

FieldTypeDescription
priceintegerPrice for the product after discount
discountintegerDiscount for the product
originalPriceintegerOriginal price for the product before discount
tfadecimalTFA fee for the product

Product Details Object

FieldTypeDescription
coveragestringCoverage for the product
ipidUrlsarrayList of URLs to IPID documents (Insurance Product Information Document). Important: URLs must be direct download links that do not change
termsUrlsarrayList of URLs to terms and conditions for the product

Offer Object

FieldTypeDescription
bonusstringBonus for the product
deductibleintegerDeductible for the product
yearlyMileageintegerAnnual mileage for car product

Error Handling

In case of errors, the company should respond with an appropriate HTTP status code and the following body:

{
"error": {
"code": "string",
"message": "string"
}
}

Technical Error Codes

CodeDescription
validation_errorInvalid or missing fields in the request
failed_calculating_priceThe system was unable to calculate a price due to an internal error - for example, an internal calculation failure or missing data from the Consumer Council
service_unavailableThe service is temporarily unavailable (e.g., due to maintenance or capacity issues)
unknown_errorUnexpected error that does not fit into the other categories

Business Error Codes

CodeDescription
no_price_availableThe company cannot offer a price and would not have provided one in its public web solution either - for example, because the combination of parameters is not supported
existing_agreementThe company does not return a price because the user already has an existing agreement for the given product with the company
additional_information_requiredThe request requires more information; the user must contact an advisor