Reiseforsikring (Travel Insurance)
Work in Progress
This documentation is under development and may be updated.
API Documentation for Travel 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 travel insurance offer that has been requested.
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": "678aufj",
"type": "reise",
"data": {
"coverage": "standard",
"addons": ["30 dager ekstra"],
"insured": "person",
"oldestChild": 30,
"currentAccidents": 0,
"lastAccidentDate": "string"
}
}
],
"requestAt": "2024-10-16T12:06:00Z"
}
Request Field Descriptions
Root Level Fields
| Field | Type | Description |
|---|---|---|
id | string | The unique ID for the request |
requestAt | string | The date and time when the request was sent |
Person Object
| Field | Type | Description |
|---|---|---|
pid | string | The personal identification number of the person to be insured. Example: "01019612345" |
firstName | string | The first name of the person to be insured. Example: "Ole" |
lastName | string | The last name of the person to be insured. Example: "Nordmann" |
addresses | array | Information about the address of the person to be insured |
memberships | array | Information about various memberships of the person to be insured |
Address Object
| Field | Type | Description |
|---|---|---|
source | string | Source of the address. Example: "National Registry" |
streetName | string | Street name of the address. Example: "Ole Nordmanns Gate 1" |
postalCode | string | Postal code of the address. Example: "0123" |
postalLocation | string | Postal location of the address. Example: "OSLO" |
Membership Object
| Field | Type | Description |
|---|---|---|
membershipId | string | The ID of the membership. Example: "MEMB-001" |
membershipName | string | The name of the membership. Example: "Tekna" |
Offer Request Object
| Field | Type | Description |
|---|---|---|
id | string | The unique ID for the offer request. Example: "678aufj" |
type | string | Type of product. Value: "reise" |
data | object | Data for the offer |
Offer Data Object
| Field | Type | Description |
|---|---|---|
coverage | string | Coverage for the insurance. Values: "standard", "utvidet" |
addons | array | Additional services for the insurance. Example: ["30 dager ekstra"] |
insured | string | Who is insured. Values: "person", "person+partner", "person+familie" |
oldestChild | number | Age of oldest child (if family coverage). Example: 30 |
currentAccidents | number | Number of accidents. Example: 0 |
lastAccidentDate | string | Date of the last accident. Example: "2023-05-15" |
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",
"products": [
{
"id": "string",
"type": "reise",
"productName": "string",
"prices": {
"price": 0,
"discount": 0,
"originalPrice": 0,
"tfa": 0.0
},
"productDetails": {
"coverage": "string",
"ipidUrls": [
{
"description": "string",
"url": "string"
}
],
"termsUrls": [
{
"description": "string",
"url": "string"
}
]
},
"offer": {
"insured": "string",
"deductible": 0,
"daysCovered": 90
}
}
],
"purchaseUrl": "string",
"receivedAt": "string",
"responseAt": "string"
}
Response Field Descriptions
Root Level Fields
| Field | Type | Description |
|---|---|---|
id | string | The unique ID for the request |
company | string | The name of the insurance company. Example: "Forsikringsselskap" |
totalPrice | number | Total price for all products after discount. Example: 1200 |
totalDiscount | number | Total discount for all products. Example: 150 |
totalOriginalPrice | number | Total original price for all products before discount. Example: 1350 |
discountDescription | string | Description of the discount that has been given. Example: "Medlemsrabatt Tekna" |
Products Array
| Field | Type | Description |
|---|---|---|
id | string | The unique ID for the product. Example: "R-123456789" |
type | string | Type of product. Value: "reise" |
productName | string | The name of the product. Example: "Reiseforsikring Utvidet" |
Prices Object
| Field | Type | Description |
|---|---|---|
price | number | Price for the product after discount. Example: 1200 |
discount | number | Discount for the product. Example: 150 |
originalPrice | number | Original price for the product before discount. Example: 1350 |
tfa | number | TFA fee for the product. Example: 0.0 |
Product Details Object
| Field | Type | Description |
|---|---|---|
coverage | string | Coverage for the product. Example: "utvidet" |
ipidUrls | array | List of URLs to IPID documents |
termsUrls | array | List of URLs to terms and conditions |
IPID/Terms URL Object
| Field | Type | Description |
|---|---|---|
description | string | Description of the document. Example: "Produktinformasjon reiseforsikring" |
url | string | URL to the document. Example: "https://example.com/ipid-reise.pdf" |
Offer Object
| Field | Type | Description |
|---|---|---|
insured | string | Who is insured. Example: "person+familie" |
deductible | number | Deductible for the product. Example: 1000 |
daysCovered | number | Number of days covered. Example: 90 |
Additional Response Fields
| Field | Type | Description |
|---|---|---|
purchaseUrl | string | URL for purchasing the products. Example: "https://example.com/purchase/reise" |
receivedAt | string | Time when the request was received. Example: "2024-10-16 12:06:00" |
responseAt | string | Time when the response was sent. Example: "2024-10-16T12:06:05Z" |
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"
}
}
See Car Insurance Error Handling for the list of error codes.