Services
Here you can find list of all available services
GET /contract/init
Get usefull datas about required fields in 1st step and initial form datas
Request
| Param | Type | Desc |
|---|---|---|
| type | int | product type, value from codelist 2 |
| data | object | multidimensional object with actual form data structure (same as datas send in /create) |
Response
| Param | Type | Desc |
|---|---|---|
| fields | array | one dimensional array with all keys of required fields for example 'start' or 'holder.legal_form' |
| data | object | multidimensional object with initial form data structure (same as datas send in /create) |
| dynData | object | object with dynamic usefull datas from products |
| dynFields | array | list of fields which on change should call /init again with actual datas |
| errors | array | can ignore |
dynData
| Param | Type | Desc |
|---|---|---|
| kms_range | array | format [int from, int to] with range of possible Field::EXPECTED_KM, possible to get [0, 0] which should be zero |
POST /contract/create
Create basic contract process
Request
| Param | Type | Desc |
|---|---|---|
| type | int | product type, value from codelist 2 |
| data | object | object with structured datas |
Content of data has to have the same structure as on regular broker portal.
More data about fields used can be obtained via
Example
[
"type": 1,
"data": {
"db24": "0",
"start": "07.05.2023",
"km": 3000,
"model_text": "Duster",
"color": "11",
"non_payer": "0",
"gears": 6,
"power": 81,
"zipCodes": "BB,BK,BC",
"license_number": "PB734017",
"brand": 42,
"before_trans": "0",
"model": 2122,
"duration_of_harmless": 0,
"accepts": {
"elg": "0"
},
"righthand": "0",
"has_sec": 1,
"analyze": "0",
"holder": {
"permanent_address": {
"city": "Banská Bystrica",
"zip": "97411",
"nstr": null
},
"insurance_event_1": "0",
"legal_form": 1,
"uzp": "0",
"id_number": "6704125285",
"pass": null,
"hasl": 1,
"insurance_event": "0",
"idtype": 0,
"country": "SVK",
"licence_from": 2010,
"profession": "3",
"birth": "1967-04-12"
},
"aad_brand": "DACIA",
"is_sk": 1,
"foreign_veh": "0",
"interested_in_discounts": "0",
"address_is_same": 1,
"fromOffer": "5db0abb22a9bcf4e7df051f1ce023d07a69a4abe",
"discounts": {},
"max_weight": 1844,
"owner_from": "04.05.2023",
"fuel": 2,
"leasing": "0",
"first_pzp": "0",
"insurance_frequency": 1,
"has_evn": 1,
"save_offer": 1,
"payment_method": "1",
"volume": 1461,
"type": 1,
"vin": "UU1HSDACN44108306",
"is_same": 1,
"fromContract": false,
"number_of_seats": 5,
"date_of_first_evidence": "2010-11-16",
"year": 2010,
"evn": "BB172DS",
"gearbox_type": "m",
"wsz": null,
"purpose": 1,
"vehicle_state": "0",
"is_same_with_owner": 1,
"car_region": "BB"
}
]
OK response
| Param | Type | Desc |
|---|---|---|
| res | boolean | true = all ok, false = problem |
| data.hash | string | contact process identificator |
| data.data | object | object of processed request data |
| data.commons | array or object | list of common reinsurances for product |
| data.commonsData | object | default datas for common reinsurances |
{
"res": true,
"data": {
"hash": "9e5d67e10e1d036fbb71fbf115bdbb769bebafc8",
"data": {
"db24": "0",
"start": "2023-05-07",
"km": 3000,
"model_text": "Duster",
"color": "11",
"non_payer": "0",
"gears": 6,
"power": 81,
"zipCodes": "BB,BK,BC",
"license_number": "PB734017",
"brand": 42,
"before_trans": 0,
"model": 2122,
"duration_of_harmless": 0,
"accepts": {
"elg": "0"
},
"righthand": 0,
"has_sec": 1,
"analyze": "0",
"holder": {
"permanent_address": {
"city": "Banská Bystrica",
"zip": "97411"
},
"insurance_event_1": 0,
"legal_form": 1,
"uzp": "0",
"id_number": "6704125285",
"hasl": 1,
"insurance_event": 0,
"idtype": 0,
"country": "SVK",
"licence_from": 2010,
"profession": "3",
"birth": "1967-04-12"
},
"aad_brand": "DACIA",
"is_sk": 1,
"foreign_veh": 0,
"interested_in_discounts": 0,
"address_is_same": 1,
"fromOffer": "5db0abb22a9bcf4e7df051f1ce023d07a69a4abe",
"max_weight": 1844,
"owner_from": "04.05.2023",
"fuel": 2,
"leasing": 0,
"first_pzp": "0",
"insurance_frequency": 1,
"has_evn": 1,
"save_offer": 1,
"payment_method": "1",
"volume": 1461,
"type": 1,
"vin": "UU1HSDACN44108306",
"is_same": 1,
"fromContract": false,
"number_of_seats": 5,
"date_of_first_evidence": "2010-11-16",
"year": 2010,
"evn": "BB172DS",
"gearbox_type": "m",
"purpose": 1,
"vehicle_state": "0",
"is_same_with_owner": 1,
"car_region": "BB",
"client_type": 1
},
"commonsData": {
"cov1": {
"_": 1
},
"cov2": {
"_": 1
}
},
"commons": [
{
"key": "accident",
"custom": "Úraz vodiča/posádky",
"altKeys": [
"injury"
]
},
{
"key": "baggage"
},
{
"key": "disaster"
},
{
"custom": "Čelné sklo/sklá",
"key": "windows",
"altKeys": [
"windshield"
]
},
{
"key": "animal"
},
{
"key": "theft"
},
{
"custom": "Základné (štandardne 5,24/1,05 mil. eur)",
"block": "Poistné krytie na zdraví / majetku:",
"key": "cov1"
},
{
"custom": "Vyššie",
"key": "cov2"
}
]
}
}
Validation error response (422)
| Param | Type | Desc |
|---|---|---|
| message | string | general error message |
| errors | array | list of field validation errors |
{
"message": "The given data was invalid.",
"errors": [
{
"start": [
"Povinné pole"
]
}
]
}
GET /contract/{hash}
Get informations about contract
Params
- hash - id obtained via /contract/create service response.
Response
object with this structure
| Param | Type | Desc |
|---|---|---|
| id | int | product id, codelist 1003 |
| status | int | codelist 20 - 1 = created | 2 = set product | 3 = filled more data | 4 and more = successfully finished |
| type | int | product type, value from codelist 2 |
| full_start | datetime | date and time for start of insurance |
| product | object | object with info about product |
| variant | int | product variant selected |
| insurance_frequency | int | selected insurance frequency of payment - codelist 16 |
| prices | object | prices of selected product keyed by frequency |
| contract_number | string|null | contract number if status >= 4 |
| date_of_closure | datetime | date and time of contract closure/confirmation |
| info | object | see *Info object structure* below |
| dateToPay | date | date when contract should be paid max |
| reinsuranceData | object | data of selected reinsurances, see *Reinsurance data object structure* |
| paymentData | object | datas that could be used as payment informations |
| data | object | raw contract data of selected reinsurances, see *Reinsurance data object structure* |
GET /contract/{hash}/offers
Get list of all possible offers for contract process
Params
- hash - id obtained via /contract/create service response.
Response
object of objects with this structure
| Param | Type | Desc |
|---|---|---|
| company_id | int | insurance company id, codelist 1001 |
| id | int | product id, codelist 1003 |
| key | string | id for product + variant combination |
| price | object | object of initial price (always 99999) keyed by payment frequency (codelist 16) |
| variant | int | id of product variant |
| info | object | see *Info object structure* below |
{
"5_1": {
"company_id": 2,
"price": {
"1": 99999,
"2": 99999,
"3": 99999
},
"variant": 1,
"id": 5,
"key": "5_1",
"info": {...}
},
"5_2": {
"company_id": 2,
"price": {
"1": 99999,
"2": 99999,
"3": 99999
},
"variant": 2,
"id": 5,
"key": "5_2",
"info": {...}
},
"14_1": {
"company_id": 2,
"price": {
"1": 99999,
"2": 99999,
"3": 99999
},
"variant": 1,
"id": 14,
"key": "14_1",
"info": {...}
},
...
}
GET /contract/{hash}/prices?keys[0]={key}…
Get list of requested products with calculated prices & more datas than in ../offers request
Params
- hash - id obtained via /contract/create service response.
- keys - array of product variant keys obtained via /contract/{hash}/offers service response for which you want to get insurance prices
For example
- /contract/{hash}/prices?keys[0]=65_1
- /contract/{hash}/prices?keys[0]=65_1&keys[1]=21_4&keys[1]=65_2
Response
object
| Param | Type | Desc |
|---|---|---|
| res | boolean | true if all ok, false if error |
| data | object of objects | keyed object with requested keys and structure described below |
Data object structure
Same as …/offers object structure extended with
| Param | Type | Desc |
|---|---|---|
| price | object|false | false if error or object of prices keyed by payment frequency (codelist 16) |
| documents | array of objects | see *Document object structure* below |
| success | boolean | true = calculation was ok and can choose this product, false = error / cannot select |
| included | array of objects | list of what is included in insurance, see *Included/Reinsurance object structure* below |
| pictograms | array of objects | list of what is included in insurance shown in pictograms, see *Pictogram object structure* below |
| errors | array of strings | list of errors, can be shown to client if starts with _ |
| cannot_recalcul | boolean | false = can try to call calculation again, true = shouldn't try to call again |
Document object structure
| Param | Type | Desc |
|---|---|---|
| link | string | Full url for document |
| name | string | name with all datas (for example size if available) |
| short | string | just name |
| type | int | (not relevant) 1 = static, 2 = dynamic, 3 = product custom |
Info object structure
| Param | Type | Desc |
|---|---|---|
| reinsurancesRaw | object | raw reinsurance datas |
| reinsurances | array of object | list of possible reinsurances, see *Included/Reinsurance object structure* below |
| daysToPayText | string | human readable format of when insurance have to be paid |
| referenceDate | start|date_of_closure | reference date used in calculation of payment date |
| coveredRisks | string | description of covered risks (almost always same text) |
| daysToPay | int | number of days to pay for insurance |
| refDate | string (date) | date used for internal filtering |
| name | string | product variant name (can be empty) |
| end | string | human readable represenation of end of insurance |
| coverage | object | data about pzp coverage (only PZP products) |
Pictogram object structure
| Param | Type | Desc |
|---|---|---|
| key | string | string id |
| label | string | human readable label |
| desc | string | description |
| custom | string | custom label (optional - can ignore) |
Included/Reinsurance object structure
| Param | Type | Desc |
|---|---|---|
| key | string | string id |
| checked | boolean | detect if selected |
| label | string | human readable label |
| info | string | description (optional) |
| value | int | yesno value (only in Included - use checked) |
| custom | string | custom label (optional - use label) |
| fields | array of objects | see Reinsurance field object structure below (optional) |
| readonly | boolean | true = cannot unset (optional) |
| altKeys | array of strings | if associated with other reinsurances, used in common reinsurances (optional) |
| data | object | object with additional datas (optional) |
| default | string|int | default yesno value (optional) |
| prefix | string | label prefix (optional - use label) |
| suffix | string | label suffix (optional - use label) |
Reinsurance field object structure
| Param | Type | Desc |
|---|---|---|
| type | select|check|input|date | select = select with options, check = checkbox yesno, input = input field, free text, date = date field |
| key | string | string id |
| data | object | object with additional datas Reinsurance field data object structure below (optional) |
| hidden | boolean | true = not visible, cannot change (optional) |
| label | string | label for field (optional) |
| default | string|int | default value (optional) |
| info | string | description (optional) |
Reinsurance field data object structure
| Param | Type | Desc |
|---|---|---|
| options | object |
object keyed with values and key value is human readable value, empty value (not selectable) is 0 Example: Available if type = select, not always |
| codelist | int | Codelist id, have to show codelist values to choose from (Available if type = select, not always) |
| type | string | input type (Available if type = input, not always) |
| min | int | input minimal value (Available if type = input, not always) |
| max | int | input maximal value (Available if type = input, not always) |
Coverage object structure
| Param | Type | Desc |
|---|---|---|
| property | float | insurance of property damage in millions of € |
| health | float | insurance of health in millions of € |
{
"res": true,
"data": {
"65_2": {
"company_id": 9,
"price": {
"1": 100,
"2": 50,
"3": 25
},
"key": "65_2",
"info": {
"reinsurancesRaw": {
"cov1": {
"_": 1
},
"cov2": {
"_": 1
}
},
"reinsurances": [],
"daysToPayText": "7 dní od dátumu začiatku poistenia",
"referenceDate": "start",
"coveredRisks": "na základe aktuálnych VPP",
"daysToPay": 7,
"refDate": "2023-05-27",
"name": "PARTNER",
"end": "Neurčito",
"coverage": {
"property": 1.05,
"health": 5.24
}
},
"variant": 2,
"id": 65,
"success": true,
"included": [
{
"key": "basic_asist",
"value": 1
},
{
"info": "limit 1500€",
"key": "accident",
"value": 1
},
{
"info": "limit 3000€, spoluúčasť 10%",
"key": "disaster",
"value": 1
},
{
"info": "limit 250 EUR spoluúčasť 10%",
"key": "animal",
"value": 1
},
{
"info": "limit plnenia 200€",
"key": "baggage",
"value": 1
}
],
"pictograms": [],
"errors": [],
"cannot_recalcul": false
},
"65_3": {
...
}
}
}
PUT /contract/{hash}/updateReinsurances
Update reinsurance values for product variants
After update you should call …/prices to get updated prices.
Params
- hash - id obtained via /contract/create service response.
Request
| Param | Type | Desc |
|---|---|---|
| keys | array of strings | list of product variants keys for which you want to update reinsurance values |
| data | object | reinsurance values which will be set to all product variants from keys param |
Content of data has to have the exact structure. See Reinsurance data object structure below.
Example
{
"keys": ["5_1", "7_1", "56_2"],
"data": {
"pn": {
"_": 1,
},
"alt_car": {
"_": 1,
"days": 3,
},
}
}
Reinsurance data object structure
Object is keyed with reinsurance keys (for example "pn", "alt_car", "baggage") and
each key contains another object of values keyed by default value "_" (yesno value 1 = wants reinsurance or 0 = don't want reinsurance) and other fields keys (if any available - see fields param in Included/Reinsurance object structure)
Response
object
| Param | Type | Desc |
|---|---|---|
| res | boolean | true if all ok, false if error |
| data | object of objects | keyed object with all product variants keys reinsurance values structure described above, should be used to update all your local reinsurance values, might be modified, because of internal rules, or some value might not update in request |
{
"res": true,
"data": {
"5_1": {
"pn": {
"_": 1,
},
"alt_car": {
"_": 1,
"days": 3,
},
},
"7_1": {
"pn": {
"_": 1,
},
"alt_car": {
"_": 0, // !!! Error updating (this comment not included in response)
},
},
"12_1": {...},
"12_2": {...},
"15_1": {...},
...
"56_1": {...},
"56_2": {
"pn": {
"_": 1,
},
"alt_car": {
"_": 1,
"days": 3,
},
}
}
}
PUT /contract/{hash}/selectProductVariant
Select product variant for contract
Params
- hash - id obtained via /contract/create service response.
Request
| Param | Type | Desc |
|---|---|---|
| key | string | key of product variant to select |
Response
object
| Param | Type | Desc |
|---|---|---|
| res | boolean | true = all ok, false = something went wrong |
| data | object | extended object of Data object structure from ../offers service |
PUT /contract/{hash}/updateData
Update data values for contract
After update you should call …/prices to get updated prices.
At least to validate that datas are still valid
Params
- hash - id obtained via /contract/create service response.
Request
| Param | Type | Desc |
|---|---|---|
| data | object | new data object to set, required to set all datas not only new |
| complete | boolean | (optional) true = act as third step = data validation + update status (3) if all ok |
Example
{
"data": {
"start": "06.09.2023",
"cp_type": 1,
"return": "12.09.2023",
...
}
}
Response
object
| Param | Type | Desc |
|---|---|---|
| res | boolean | true = all ok, false = something went wrong |
| data | object | new set of datas also with modified values (formating, types etc, same as in create) |
PUT /contract/{hash}/updateStatus
Update status for contract
Params
- hash - id obtained via /contract/create service response.
Request
| Param | Type | Desc |
|---|---|---|
| status | int | one of 4 (confirmed), 6 (canceled), 12 (transferred) |
Example
{
"status": 12
}
Response
object
| Param | Type | Desc |
|---|---|---|
| res | boolean | true = all ok, false = something went wrong |
| data | int | new status (same as in request, can be used for validation) |
GET /codelists
Return list or all available codelists
Response
array of objects
| Param | Type | Desc |
|---|---|---|
| id | int | id number of codelist (used to get codelist items in other service) |
| name | string | description |
[
{
"id": 2,
"name": "Typ produktu"
},
{
"id": 8,
"name": "Druh vozidla"
},
...
]
GET /codelists/{id}/{item?}
Return list or all available items of some codelist
For example
- /codelists/11 - (all vehicle brands)
- /codelists/11/17 - (all Audi models)
Params
- id - id of codelist to get items from
- item - id of codelist item to get sub items from (optional) - mainly used to get models for vehicle brand
Response
array of objects
| Param | Type | Desc |
|---|---|---|
| id | int|string | value used as identification |
| name | string | description |
| alt | string | alternative description |
| variants | array of objects | object contains id as variant id and n as name (optional only for products) |
| fields | object of objects | object contains keys price with fields required in 1st step and contract with req fields in 3rd (optional only for products) |
| active | boolean | detection if product is active (optional only for products) |
[
{
"id": "10",
"name": "Autobus MHD",
"alt": "",
},
{
"id": "3",
"name": "Motocykel",
"alt": "",
},
...
]
GET /fields
Return list or all fields with informations needed
Response
object of objects
| Param | Type | Desc |
|---|---|---|
| code | string | string name code used in data object to define exact form field data |
| label | string | human readable format |
{
"Field::LEGAL_FORM": {
"code": "legal_form",
"label": "Právna forma"
},
"Field::HAS_UNIQA": {
"code": "hsunq",
"label": "Má poistník uzatvorenú a platnú zmluvu pre iný produkt v Uniqa?"
},
...
}
GET /fields/req
Return list or all required fields in human readable form
Response
object of objects
GET /vehicle/(evn|vin)/{evn|vin}
Return vehicle datas by vin or evn
For example
- /vehicle/evn/AB123AB
- /vehicle/vin/ABC133522551122XX
Response
object of objects
| Param | Type | Desc |
|---|---|---|
| res | boolean | true if vehicle found, false if not |
| data | object | vehicle datas |
| errors | array | List of errors (set only if res = false) |
Data
Possible to fill data object in contract creating
| Param (constant, see fields service) | Type | Desc |
|---|---|---|
| Field::FIRST_EVIDENCE | date | YYYY-MM-DD |
| Field::MOTOR_VOLUME | int | |
| Field::FUEL | int | codelist 8 value |
| Field::FUEL_TEXT | string | human readable format for fuel |
| Field::IS_PLUGIN | int | yesno value |
| Field::GEARS | int | |
| Field::GEARBOX_TYPE | string | codelist 1002 value |
| Field::VEHICLE_BRAND | numeric | codelist 11 value |
| Field::VEHICLE_BRAND_TEXT | string | human readable value for brand |
| Field::VEHICLE_MODEL | numeric | codelist 11 sub value |
| Field::VEHICLE_MODEL_TEXT | string | human readable value for model |
| Field::VEHICLE_WEIGHT | int | |
| Field::YEAR_CREATED | numeric | |
| Field::MOTOR_POWER | int | |
| Field::SEATS | int | |
| Field::VEHICLE_TYPE | int | codelist 8 value |
| Field::COLOR | int | codelist 18 value |
| Field::LICENSE_NUMBER | string | |
| Field::HAS_EVN | int | yesno value |
| Field::VEHICLE_REGION | string | codelist 29 value |
| Field::EVN | string | |
| Field::VIN | string |
yesno value - 1 = yes, 0 = no
// Vehicle found
{
"res": true,
"data": {
"date_of_first_evidence": "2010-02-01",
"volume": 1798,
"fuel": 1,
"hyb": 0,
"fuel_text": "Benzín",
"gears": 7,
"gearbox_type": "a",
"brand": "185",
"model": "695",
"brand_text": "",
"model_text": "LEON",
"max_weight": 1865,
"year": "2010",
"power": 118,
"number_of_seats": 5,
"type": 1,
"vin": "VSSZZZ1PZAR037497",
"color": "5",
"license_number": "PF003102",
"evn": "BL829AM",
"has_evn": 1,
"car_region": "BL",
"aad_brand": "SEAT"
}
}
// Vehicle Not found
{
"res": false,
"errors": [
"Vozidlo sa nenašlo na základe zadaného EČV. Prosim vyplňte všetky údaje o vozidle ručne."
],
"data": []
}