Skip to content

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

ParamTypeDesc
typeintproduct type, value from codelist 2
dataobjectmultidimensional object with actual form data structure (same as datas send in /create)

Response

ParamTypeDesc
fieldsarrayone dimensional array with all keys of required fields for example 'start' or 'holder.legal_form'
dataobjectmultidimensional object with initial form data structure (same as datas send in /create)
dynDataobjectobject with dynamic usefull datas from products
dynFieldsarraylist of fields which on change should call /init again with actual datas
errorsarraycan ignore

dynData

ParamTypeDesc
kms_rangearrayformat [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

ParamTypeDesc
typeintproduct type, value from codelist 2
dataobjectobject 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

ParamTypeDesc
resbooleantrue = all ok, false = problem
data.hashstringcontact process identificator
data.dataobjectobject of processed request data
data.commonsarray or objectlist of common reinsurances for product
data.commonsDataobjectdefault 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)

ParamTypeDesc
messagestringgeneral error message
errorsarraylist 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

ParamTypeDesc
idintproduct id, codelist 1003
statusintcodelist 20 - 1 = created | 2 = set product | 3 = filled more data | 4 and more = successfully finished
typeintproduct type, value from codelist 2
full_startdatetimedate and time for start of insurance
productobjectobject with info about product
variantintproduct variant selected
insurance_frequencyintselected insurance frequency of payment - codelist 16
pricesobjectprices of selected product keyed by frequency
contract_numberstring|nullcontract number if status >= 4
date_of_closuredatetimedate and time of contract closure/confirmation
infoobjectsee *Info object structure* below
dateToPaydatedate when contract should be paid max
reinsuranceDataobjectdata of selected reinsurances, see *Reinsurance data object structure*
paymentDataobjectdatas that could be used as payment informations
dataobjectraw 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

ParamTypeDesc
company_idintinsurance company id, codelist 1001
idintproduct id, codelist 1003
keystringid for product + variant combination
priceobjectobject of initial price (always 99999) keyed by payment frequency (codelist 16)
variantintid of product variant
infoobjectsee *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

ParamTypeDesc
resbooleantrue if all ok, false if error
dataobject of objectskeyed object with requested keys and structure described below

Data object structure

Same as …/offers object structure extended with

ParamTypeDesc
priceobject|falsefalse if error or object of prices keyed by payment frequency (codelist 16)
documentsarray of objectssee *Document object structure* below
successbooleantrue = calculation was ok and can choose this product, false = error / cannot select
includedarray of objectslist of what is included in insurance, see *Included/Reinsurance object structure* below
pictogramsarray of objectslist of what is included in insurance shown in pictograms, see *Pictogram object structure* below
errorsarray of stringslist of errors, can be shown to client if starts with _
cannot_recalculbooleanfalse = can try to call calculation again, true = shouldn't try to call again

Document object structure

ParamTypeDesc
linkstringFull url for document
namestringname with all datas (for example size if available)
shortstringjust name
typeint(not relevant) 1 = static, 2 = dynamic, 3 = product custom

Info object structure

ParamTypeDesc
reinsurancesRawobjectraw reinsurance datas
reinsurancesarray of objectlist of possible reinsurances, see *Included/Reinsurance object structure* below
daysToPayTextstringhuman readable format of when insurance have to be paid
referenceDatestart|date_of_closurereference date used in calculation of payment date
coveredRisksstringdescription of covered risks (almost always same text)
daysToPayintnumber of days to pay for insurance
refDatestring (date)date used for internal filtering
namestringproduct variant name (can be empty)
endstringhuman readable represenation of end of insurance
coverageobjectdata about pzp coverage (only PZP products)

Pictogram object structure

ParamTypeDesc
keystringstring id
labelstringhuman readable label
descstringdescription
customstringcustom label (optional - can ignore)

Included/Reinsurance object structure

ParamTypeDesc
keystringstring id
checkedbooleandetect if selected
labelstringhuman readable label
infostringdescription (optional)
valueintyesno value (only in Included - use checked)
customstringcustom label (optional - use label)
fieldsarray of objectssee Reinsurance field object structure below (optional)
readonlybooleantrue = cannot unset (optional)
altKeysarray of stringsif associated with other reinsurances, used in common reinsurances (optional)
dataobjectobject with additional datas (optional)
defaultstring|intdefault yesno value (optional)
prefixstringlabel prefix (optional - use label)
suffixstringlabel suffix (optional - use label)

Reinsurance field object structure

ParamTypeDesc
typeselect|check|input|dateselect = select with options, check = checkbox yesno, input = input field, free text, date = date field
keystringstring id
dataobjectobject with additional datas Reinsurance field data object structure below (optional)
hiddenbooleantrue = not visible, cannot change (optional)
labelstringlabel for field (optional)
defaultstring|intdefault value (optional)
infostringdescription (optional)

Reinsurance field data object structure

ParamTypeDesc
options object object keyed with values and key value is human readable value, empty value (not selectable) is 0
Example:
{
    0: ' - ',
    100: '100 €',
    200: '200 €',
    500: '500 ,
}

Available if type = select, not always
codelistintCodelist id, have to show codelist values to choose from (Available if type = select, not always)
typestringinput type (Available if type = input, not always)
minintinput minimal value (Available if type = input, not always)
maxintinput maximal value (Available if type = input, not always)

Coverage object structure

ParamTypeDesc
propertyfloatinsurance of property damage in millions of €
healthfloatinsurance 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

ParamTypeDesc
keysarray of stringslist of product variants keys for which you want to update reinsurance values
dataobjectreinsurance 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

ParamTypeDesc
resbooleantrue if all ok, false if error
dataobject of objectskeyed 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

ParamTypeDesc
keystringkey of product variant to select

Response

object

ParamTypeDesc
resbooleantrue = all ok, false = something went wrong
dataobjectextended 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

ParamTypeDesc
dataobjectnew data object to set, required to set all datas not only new
completeboolean(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

ParamTypeDesc
resbooleantrue = all ok, false = something went wrong
dataobjectnew 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

ParamTypeDesc
statusintone of 4 (confirmed), 6 (canceled), 12 (transferred)

Example

{
    "status": 12
}

Response

object

ParamTypeDesc
resbooleantrue = all ok, false = something went wrong
dataintnew status (same as in request, can be used for validation)

GET /codelists

Return list or all available codelists

Response

array of objects

ParamTypeDesc
idintid number of codelist (used to get codelist items in other service)
namestringdescription
[
    {
        "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

ParamTypeDesc
idint|stringvalue used as identification
namestringdescription
altstringalternative description
variantsarray of objectsobject contains id as variant id and n as name (optional only for products)
fieldsobject of objectsobject contains keys price with fields required in 1st step and contract with req fields in 3rd (optional only for products)
activebooleandetection 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

ParamTypeDesc
codestringstring name code used in data object to define exact form field data
labelstringhuman 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

ParamTypeDesc
resbooleantrue if vehicle found, false if not
dataobjectvehicle datas
errorsarrayList of errors (set only if res = false)

Data

Possible to fill data object in contract creating

Param (constant, see fields service)TypeDesc
Field::FIRST_EVIDENCEdateYYYY-MM-DD
Field::MOTOR_VOLUMEint
Field::FUELintcodelist 8 value
Field::FUEL_TEXTstringhuman readable format for fuel
Field::IS_PLUGINintyesno value
Field::GEARSint
Field::GEARBOX_TYPEstringcodelist 1002 value
Field::VEHICLE_BRANDnumericcodelist 11 value
Field::VEHICLE_BRAND_TEXTstringhuman readable value for brand
Field::VEHICLE_MODELnumericcodelist 11 sub value
Field::VEHICLE_MODEL_TEXTstringhuman readable value for model
Field::VEHICLE_WEIGHTint
Field::YEAR_CREATEDnumeric
Field::MOTOR_POWERint
Field::SEATSint
Field::VEHICLE_TYPEintcodelist 8 value
Field::COLORintcodelist 18 value
Field::LICENSE_NUMBERstring
Field::HAS_EVNintyesno value
Field::VEHICLE_REGIONstringcodelist 29 value
Field::EVNstring
Field::VINstring

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": []
}