If you find errors or omissions in this document, please don’t hesitate to submit an issue or open a pull request with a fix. We also encourage you to ask questions and discuss any aspects of the project on the mailing list or in the chat room. New contributors are always welcome!

Release notes

14/12/2021, v1.0, initial release

1. Introduction

The Big Picture

The api gateway is a place where European Reliance’s API’s of web services as APIs are exposed together with a portal help site for developers.

What are the web services APIs?

Behind the gateway, exposed, are our enterprise insurance services, which can be used by external developers, for applications that produce and consume insurance data, consumed by external parties.

Namely, it is, at the moment:

mtr-api

Service for vehicle insurance application and policy processing, pricing, quoting plus more.

fire-api

Service for fire insurance application and policy processing, pricing, quoting plus more.

parameters-api

Service for listing common parameters among many services

2. API gateway

In front of all the services there is a common layer called gateway. It is enforcing constraints common to all services like security, accounting and rate limiting.

Gateway is responsible for:

  • The first level of authentication and authorization of every call to the internal services

  • Counting the invocations and rate limiting them.

It is essentially the gateway guard that every call must show its credentials in order to pass.

Each API call passes from two levels of authentication and authorization.

2.1. Authentication and authorization

Levels of authentication and authorization
  • First level: each call is being checked to see two things. if it contains an API key that is authorized to access the specified API resource and if it obeys some specified rate limiting access rules. If it doesn’t then a specific gateway error response is returned (see General Web Service Errors and Web Service Rate Limits).

  • Second level: Depending on the service, each call is checked if it contains an Authorization header with a valid Bearer token.

An authorization token is fetched first from a specific service endpoint.
Steps

If a company user wants to use an externally provided program (your program) he must first authorize it to impersonate him by following a specific procedure through our company’s portal.

Within that procedure the user publishes a user-key, a 40 character key, that ties his identity with the identity of your program. This bond can be enabled, disabled, deleted, and recreated by the user whenever he wants.

The user is instructed to deliver this user-key to your program in order for you to use it for the purpose of obtaining an authorization token from the API.

This authorization token together with your api-key must be supplied as header parameters with any API call.

2.1.1. First check

At first, you must obtain an API key that uniquely identifies you, by following the procedure of signing up. After approval you will be given access to certain provided APIs.

2.1.2. Second check

The second level of authorization is the API specific authorization. Each call is checked to see if it contains an authorization header. If not then a 401 Unauthorized error response is returned.

The authorization header is an “Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxx” where the xxxx part is the token and is obtained by accessing a specific “tokens” address (see later). Steps

Please take care of your api-key, the client user-key and the resulting authorization tokens are to be stored safely and never be shared with third parties.

Use always secure communication protocols

Our services are served under HTTPS only. If you believe that your api-key or any other key or token got leaked to the outside world contact us immediately. We will disable them and supply you with new one.

If we don’t disable them, they may be used in an illegal way by a third party without us having a way to differentiate a valid usage from an invalid one. If you want your api-key to be tied permanently with your IP for added security, contact us.

2.2. API Key Usage

How to use your API key after signing up.

After signing up, you’ll be given your own, unique API key which is a 40 character string. The key:

  • Uniquely identifies you.

  • Gives you access to europisti.gr’s web services.

  • Should be kept private and should not be shared.

The API may be used several ways. In order of precedence:

HTTP Header, the preferred way

Pass the API key into the X-api-key header:

curl -H 'X-api-key: DEMO_KEY' "https://gateway.europisti.gr/dev/fire-api/parameters/kindsOfRisks/"
GET Request Query Param

To use your key, simply pass the key as a URL query parameter when making Web service requests. For example:

curl https://gateway.europisti.gr/dev/fire-api/parameters/kindsOfRisks/?api_key=YOUR_KEY"

Regardless of the HTTP method being called, the API key can always be passed as a GET parameter in the URL query. So even if you are POSTing or PUTing to a specific service, the api_key query parameter can be supplied in the URL query parameters.

Alternative Method

Depending on your usage, it can sometimes be easier to pass the API key along as HTTP Basic authentication. If you want to use this method, pass your API key in as the username, while leaving the password blank. For example:

curl "http://YOUR_KEY_HERE@gateway.europisti.gr/dev/fire-api/parameters/kindsOfRisks/"

2.3. Web Service Rate Limits

Daily and hourly rate limits on accessing europisti.gr’s web services.

Rate Limits

There is a limit on the number of europisti.gr web service requests you can make using your API key. Rate limits may vary by service, but the defaults are:

Hourly Limit: 1,000 requests per hour

For each API key, these limits are applied across all europisti.gr web services requests. Exceeding these limits will lead to your API key being temporarily blocked from making further requests. Depending on the limit exceeded, the block will be lifted automatically by waiting until the next hour or calendar day.

2.3.1. How Do I See My Current Usage?

Your can check your current rate limit and usage details by inspecting the X-RateLimit-Limit and X-RateLimit-Remaining HTTP headers that are returned on every API response. For example, if an API has the default hourly limit of 1,000 request, after making 2 requests, you will receive these HTTP headers in the response of the second request:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 998

2.3.2. Understanding Rate Limit Time Periods

Hourly Limit

The hourly counters for your API key reset on a rolling basis. Example:

  1. If you made 500 requests at 10:15AM and 500 requests at 10:25AM, your API key would become temporarily blocked.

  2. This temporary block of your API key would cease at 11:15AM, at which point you could make 500 requests.

  3. At 11:25AM, you could then make another 500 requests.

2.3.3. Rate Limit Error Response

If your API key exceeds the rate limits, you will receive a response with an HTTP status code of 429 (Too Many Requests).

2.3.4. Need Higher Limits?

If you’re building an application that needs higher rate limits, we’d be happy to work with you. Contact us for more details.

2.3.5. Errors at gateway’s level

Certain, general errors will be returned in a standardized way from all web services. Additional, service-specific error messages may also be returned (see individual service documentation for those details). The following list describes the general errors any application may return:

Error Codes
Error Code HTTP Status Code Description

API_KEY_MISSING

403

An API key was not supplied. Read API key usage for details on how to pass your API key to the API.

API_KEY_INVALID

403

An invalid API key was supplied. Double check that the API key being passed in is valid, or sign up for an API key.

API_KEY_DISABLED

403

The API key supplied has been disabled by an administrator. Please contact us for assistance.

API_KEY_UNAUTHORIZED

403

The API key supplied is not authorized to access the given service. Please contact us for assistance.

API_KEY_UNVERIFIED

403

The API key supplied has not been verified yet. Please check your e-mail to verify the API key. Please contact us for assistance if needed.

HTTPS_REQUIRED

400

Requests to this API must be made over HTTPS. Ensure that the URL being used is over HTTPS.

OVER_RATE_LIMIT

429

The API key has exceeded the rate limits. Read rate limits for more details or contact us for assistance.

NOT_FOUND

404

An API could not be found at the given URL. Check your URL.

Error Response Body

The error response body will contain an error code value from the table above and a brief description of the error. The descriptions are subject to change, so it’s suggested that any error handling must use the HTTP status code or the error code value for error handling (and not the content of the message description).

Error Message Response Formats

Depending on the detected format of the request, the error message response may be returned in JSON, XML, CSV, or HTML. Requests of an unknown format will return errors in JSON format.

JSON Example

{
 "error": {
   "code": "API_KEY_MISSING",
   "message": "No api_key was supplied. Get one at https://gateway.europisti.gr"
  }
}

XML Example

<response>
  <error>
    <code>API_KEY_MISSING</code>
    <message>No api_key was supplied. Get one at https://gateway.europisti.gr</message>
  </error>
</response>

CSV Example

Error Code,Error Message
API_KEY_MISSING,No api_key was supplied. Get one at https://gateway.europisti.gr

HTML Example

<html>
  <body>
    <h1>API_KEY_MISSING</h1>
    <p>No api_key was supplied. Get one at https://gateway.europisti.gr</p>
  </body>
</html>

2.4. Dev vs Prod

In order to access a developer’s sandbox for developing and testing reasons, it is enough just to add the word dev in the path after the server name and before the actual api’s path, for example:

Production URI        https://gateway.europisti.gr/fire-api
Sandbox URI           https://gateway.europisti.gr/dev/fire-api

Of course it is necessary for your API key to be accepted and given access to both environments by the authorization procedures that are established with your registration.

By having a valid and authorized X-api-key, any call can pass gateway’s checks and access any internal APIs that was given access to it. One such API is the fire-api.

3. FIRE-API intro

General information

The fire-api is accessible via https://gateway.europisti.gr/dev/fire-api. In order to use this API, you must pass:

  • Your API key via one of the supported methods, preferably as header parameter

  • AND an authorization token via the Authorization header.

To make requests to the API two headers are required:

X-Api-Key:     YOUR_API_KEY_HERE
Authorization: Bearer CLIENT_BEARER_TOKEN_HERE

Without these two headers all calls to fire-api will be rejected with the response 401-Unauthorized

3.1. Authorization

3.1.1. Getting authorization tokens

An Authorization client bearer token is thus required, and the way to get it is via a POST request to https://gateway.europisti.gr/dev/auth-api/resources/tokens which requires only the api-key header as prerequisite and a JSON encoded payload of the user-key.

As an example from command line use:

curl -i \
-H 'Content-type: application/json' \
-H 'X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-X POST https://gateway.europisti.gr/dev/auth-api/resources/tokens \
-d '{"user-key": "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv"}'

With a correct and existing api-key and user-key which have been connected by the client internally, the response will be a 201 Created, and as the body the token and an Authorization header containing a token of type Bearer will be returned.

This token-in-body or token-in-header must be saved on the client side and must be used in all subsequent calls to every other fire-api. The only exception to this rule, of course, is the current https://gateway.europisti.gr/dev/auth-api/resources/tokens for creating new tokens.

A convenience header X-Token-Expires-In: xxxx seconds is returned by default. It is the time remaining in seconds for which the token will be valid. With this header it is possible to calculate beforehand when a token renewal call will be needed.

By default the token is valid for 30 minutes after which the server will reject subsequent calls with the response 401 Unauthorized and an extra error header X-Error: Token Expired

If the client receives this error he can request a new token which will be valid for 30 more minutes.

No extra header
If the client gets response 401 Unauthorized without the extra header, then that means the authentication failed on the server side due to either wrong keys or because the client of the user-key refuses access to the X-Api-Key holder. In such case it is advised to first get in contact with your client (of user-key) to remedy the situation.
User impersonating another user

Sometimes a user needs to impersonate another user. For example a secretary might need access to various services in the name of an agent that gave her such rights. If the user has the right to use another person’s code (as dictated by company’s internal rules), you can grand them permission by appending a field named “agent-code” with the impersonated agent’s code as value. As an example:

curl -i \
-H 'Content-type: application/json' \
-H 'X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-X POST "https://gateway.europisti.gr/dev/auth-api/resources/tokens" \
-d '{"user-key": "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv", “agent-code”: “SSSS”}'
string ISO date

When the specification of a date named field is “string ISO date”, it is expected to be supplied with a date in ISO 8601 format like “2018-10-28” or a datetime like “2018-10-28T13:55:00”.

The date fields are expected to be in the Greek time zone and the conversions are handled by the api. When a datetime field is returned and it doesn’t end with a 'Z' (which denotes a UTC date) then it is supposed to be a Greek LocalDate value.

3.2. Errors

When the fire-api encounters an error condition outside the normal flow, it tries to return that error condition with a specific header named X-Error. So when it encounters incomplete or bad requests, incoming data validation errors or specific internal error conditions, it sets the error header informing the client application with a more specific message.

You will use this information for correcting the condition and maybe retrying the operation. For example when the authentication token expires, the client application receives a 401 Unauthorized status with the specific header X-Error: Token Expired signalling that a new token must be obtained first from the “tokens” resource and then the operation can be retried.

3.2.1. Other headers

When an operation returns with a failure status, it is possible that a header named X-Error is returned and usually an error entity with error details for both.

For operations like POSTing new entities and for the success status 201 Created, a Location header is set, according to standards with the uri of the new entity.

Some operations return extra information or actions in the Link headers. For example when issuing an application a link for the notification document is included. The operations that return this kind of information are documented.

For reference purposes, click this link to find out more about known response status codes.

3.3. CORS

The fire-api supports CORS and set required headers.

4. Applications

Overview

The following API endpoints can be used to programmatically create, retrieve and delete applications.

Available actions are:

Search applications

Returns a list of applications for the search criteria. Can be paged if start and limit request parameters is used.

Retrieve an application

Retrieve an application.

Insert new application

Create a new application.

Update an application

Change an existing application for new policy, as long as it is in initial status.

Cancel an application

Cancel an application. Can be used to cancel a new application for policy or a renewal application in prepay status.

Insert objects insured

Insert a new object.

Update an object insured

Change an existing object insured.

Delete an object insured

Delete an object insured.

Insert claims history

Insert a new claim.

Update claims history

Change an existing claim info.

Delete claims history

Delete a claim history.

Insert co-owners

Insert co-owners.

Delete co-owners

Delete co-owners.

Insert mortgages loans

Insert a mortgage loan.

Update mortgages loans

Change an existing mortgage loan.

Delete mortgages loans

Delete a mortgage loan.

Application calculation

Perform the calculations required for the specific application.

Application edit

Make changes in the current application.

Request for application approval

Set an application that needs approval from an underwriter, in that status.

Send for acceptance

Trigger the application acceptance process.

Move an application to PREPAY status

A new application without errors must be set in PREPAY status in order to trigger the notification procedures. In that status, the user can create a payment notification document or even proceed with issuing the application to policy by charging his/her account if that is possible or even notify the client with a URI for online payment.

Guides

Fields with names ending in Code (like bundleCode) expect to receive the parametric code. The description fields are not required when inserting or updating an application, only the code fields are. Values for the code fields are supposed to be found from the appropriate parameter calls on parameters resource.

The api informs you for any payload validation errors or other type of errors with an error status and an entity.

A bundleCode is mandatory for an application. Any extra covers must be supplied in the form of space or comma delimited string in the field named extra_covers.

The status of an application does not change automatically without an action. With every action of inserting or updating an application, a new status is calculated. If you wanted to recalculate an application you should, for example, first fetch the current version of the application if you do not already have it and then update it with the same information. This will force the system to recalculate it. There are many criteria that an application must meet in order to be valid and some of them can not be influenced by the end user.

Status of an application
code description actions

00

in entry requiring user intervention and update ("Επεξεργασία αίτησης - Προς υπολογισμό")

updates an application. Next steps are application calculation (to: 00 or 25 or 01), or cancel (to: 02)

25

in entry requiring approval ("Επεξεργασία αίτησης - Χρήζει αποστολής για έγκριση")

updates an application. Next steps are application calculation (to: 00 or 25 or 01), request approval (PUT, to: 30) or cancel (to: 02)

01

it is OK and can proceed to prepay ("Υπολογισμένη αίτηση")

can proceed to application edit (to: 00), send for acceptance (to: 39), move to prepay (to: 45)

30

is pending and managed by an underwriter, it is possible that there are messages for any pending issues ("Σε έλεγχο από κεντρικά")

no edit is permitted. Next steps are done only from the underwriter

11

in approval process ("Σε Εγκριτική Διαδικασία")

no edit is permitted. Next step is request approval (GET, to: 30)

02

cancelled application ("Άκυρη")

39

send for acceptance

45

move to prepay ("Σε προείσπραξη")

next steps are payment code, issue by charging user

4.1. Search Applications

In order to search for user’s applications a GET request must be submitted to the resource. The response is a JSON array of search result rows.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Parameters
Query (url parameters)
Name Optional Comments

type

YES

Values : APPLICATION, POLICY

active

YES

0 = Inactive, 1 = Active

application_no

YES

policy_no

YES

client_name

YES

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/rsc/applications"

4.2. Retrieve one

In order to return an application when the application id is known, a GET request must be submitted to the resource followed by the application id. In case the application exists and the user has the rights to display, it will return a success 200 Success response status with entity details or a 400 Bad request response status with an error entity describing the error condition.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-X GET "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789"

4.3. Insert Application

Create a new application.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X POST "https://gateway.europisti.gr/dev/fire-api/rsc/applications"
-d '{"fire_application": {
	"subagent_code": "",
	"service_code": "",
	"commission_code": "",
	"start_date": "2021-11-25T00:00:00.000Z",
	"pay_frequency_in_months": 12,
	"contact_way_code": "0",
	"application_acceptance_method": "0",
	"client": {
		"person_type_code": "1",
		"last_name": "ΠΑΠΑΔΟΣΛΣ",
		"first_name": "ΣΤΑΥΡΟΣ",
		"father_name": "ΜΗΝΑΣ",
		"birth_date": "1981-01-01T00:00:00.000Z",
		"gender_code": "1",
		"job_code": "666",
		"address": "Λεωφόρος Κηφισίας 274",
		"city": "Χαλάνδρι",
		"post_code": "15232",
		"phone": "",
		"mobile": "6900999999",
		"email": "testmail@maltest.com",
		"afm": "094060402",
		"doy_code": "1151",
		"identity_number": "",
		"identity_date": "",
		"amka": "",
		"passport": "",
		"citizenship": "GR",
		"consents": [{
				"master_id": 2,
				"id": 1,
				"answer": "1"
			},
			{
				"master_id": 2,
				"id": 2,
				"answer": "1"
			},
			{
				"master_id": 2,
				"id": 3,
				"answer": "0"
			}
		]
	},
	"insured": {
		"person_type_code": "1",
		"last_name": "ΠΑΠΑΔΟΣΛΣ",
		"first_name": "ΣΤΑΥΡΟΣ",
		"father_name": "ΜΗΝΑΣ",
		"birth_date": "1981-01-01T00:00:00.000Z",
		"gender_code": "1",
		"job_code": "666",
		"address": "Λεωφόρος Κηφισίας 274",
		"city": "Χαλάνδρι",
		"post_code": "15232",
		"phone": "",
		"mobile": "6900999999",
	    "email": "testmail@maltest.com",
		"afm": "094060402",
		"doy_code": "1151",
		"identity_number": "",
		"identity_date": "",
		"amka": "",
		"passport": "",
		"citizenship": "GR"
	},
	"objects_insured": [{
		"kind_of_risk": "04",
		"subkind_of_risk": "118",
		"address": "Λεωφόρος Κηφισίας",
		"address_number": "274",
		"city": "Χαλάνδρι",
		"post_code": "15121",
		"latitude": "38.0187793",
		"longitude": "23.788895",
		"building_commencement_year": 2000,
		"building_year": 2000,
		"square_meters" : 120,
		"building_year_piping": 2010,
		"bordering": "1",
		"is_owner_building": "1",
		"illegal": "0",
		"building_floors": [-1,2],
		"insurance_floors":[0,1,2],
		"meters_from_river": 5000,
		"bundle_code": "390",
		"insured_values": [{
				"group_cover": "01",
				"insured_value": 50000
			},
			{
				"group_cover": "02",
				"insured_value": 50000
			}
		],
		"extra_covers": [{
				"group_cover": "01",
				"cover": 201
			},
			{
				"group_cover": "02",
				"cover": 201
			}
		],
	    "building_improvements": 0,
		"construction_of_skeleton": "01",
		"construction_of_walls": "1",
		"roof_construction": "01",
		"type_of_locks": "1",
		"fire_protections": [{
				"id": 1,
				"has_protection": "1",
				"multitude": 2
			},
			{
				"id": 2,
				"has_protection": "1",
				"multitude": 2
			}
		],
		"theft_protections": ["1","3","7","10"],
		"alarm_connections": ["1","2"],
		"type_of_safety_shutters": ["1","2"],
		"claims_history": [{
			"claim_date": "2007-09-24T00:00:00.000Z",
			"claim_amount": 3000,
			"job_description": "free text"
		}],
		"co-owners": [{
		"person_type_code": "1",
		"last_name": "ΠΑΠΑΔΟΣΛOY",
		"first_name": "ΜΑΡΙΑ",
		"father_name": "ΜΗΝΑΣ",
		"birth_date": "1980-01-01T00:00:00.000Z",
		"gender_code": "1",
		"job_code": "666",
		"address": "Λεωφόρος Κηφισίας 274",
		"city": "Χαλάνδρι",
		"post_code": "15232",
		"phone": "",
		"mobile": "6900999999",
		"email": "",
		"afm": "094060402",
		"doy_code": "1151",
		"identity_number": "",
		"identity_date": "",
		"amka": "",
		"passport": "",
		"citizenship": "GR"
		}],
		"mortgages_loans": [{
			"bank_id": "061",
			"amount_loan": 5000

		}],
		"discounts": ["310", "320"]
	}]
}
}
'

4.4. Update Application

The most easy way to update an existing application is first to fetch it, let the user change it and submit it with a PUT request to the resource followed by the application id.

It will return a success 200 Success response status with entity details or a 400 Bad request response status with an error entity describing the error condition.

The success entity is the same as in the search an application example as is the error response.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X PUT "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789"
-d '{"fire_application": {
		"subagent_code": "",
		"service_code": "",
		"commission_code": "",
		"start_date": "2021-11-25T00:00:00.000Z",
		"pay_frequency_in_months": 6,
		"contact_way_code": "0",
	    "application_acceptance_method": "0",
		"client": {
			"person_type_code": "1",
			"last_name": "ΠΑΠΑΔΟΣΛΣ",
			"first_name": "ΣΤΑΥΡΟΣ",
			"father_name": "ΜΗΝΑΣ",
			"birth_date": "1981-01-01T00:00:00.000Z",
			"gender_code": "1",
			"job_code": "666",
			"address": "Λεωφόρος Κηφισίας 274",
			"city": "Χαλάνδρι",
			"post_code": "15232",
			"phone": "",
			"mobile": "6900999999",
			"email": "testmail@maltest.com",
			"afm": "094060402",
			"doy_code": "1151",
			"identity_number": "",
			"identity_date": "",
			"amka": "",
			"passport": "",
			"citizenship": "GR",
			"consents": [{
					"master_id": 2,
					"id": 1,
					"answer": "0"
				},
				{
					"master_id": 2,
					"id": 2,
					"answer": "0"
				},
				{
					"master_id": 2,
					"id": 3,
					"answer": "0"
				}
			]
		},
		"insured": {
			"person_type_code": "1",
			"last_name": "ΠΑΠΑΔΟΣΛΣ",
			"first_name": "ΣΤΑΥΡΟΣ",
			"father_name": "ΜΗΝΑΣ",
			"birth_date": "1981-01-01T00:00:00.000Z",
			"gender_code": "1",
			"job_code": "666",
			"address": "Λεωφόρος Κηφισίας 274",
			"city": "Χαλάνδρι",
			"post_code": "15232",
			"phone": "",
			"mobile": "6900999999",
			"afm": "094060402",
			"email": "testmail@maltest.com",
			"doy_code": "1151",
			"identity_number": "",
			"identity_date": "",
			"amka": "",
			"passport": "",
			"citizenship": "GR"
		}
	}
}'

4.5. Cancel Application

Cancel an application/application in prepay status/renewal application in prepay status.

A DELETE request to the resource followed by the application id. A response of 204 No Content is returned. The application immediately after that will be in Cancelled status.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-X DELETE "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789"

4.6. Insert objects insured

Insert a new object.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X POST "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/objects_insured"
-d '{"objects_insured": [{
		"kind_of_risk": "04",
		"subkind_of_risk": "118",
		"address": "Λεωφόρος Κηφισίας",
		"address_number": "274",
		"city": "Χαλάνδρι",
		"post_code": "15121",
		"latitude": "38.0187793",
		"longitude": "23.788895",
		"building_commencement_year": 2000,
		"building_year": 2000,
		"square_meters" : 120,
		"building_year_piping": 2010,
		"bordering": "1",
		"is_owner_building": "1",
		"illegal": "0",
		"building_floors": [-1,2],
		"insurance_floors":[0,1,2],
		"meters_from_river": 5000,
		"bundle_code": "390",
		"insured_values": [{
				"group_cover": "01",
				"insured_value": 50000
			},
			{
				"group_cover": "02",
				"insured_value": 50000
			}
		],
		"extra_covers": [{
				"group_cover": "01",
				"cover": 201
			},
			{
				"group_cover": "02",
				"cover": 201
			}
		],
		"building_improvements": 0,
		"construction_of_skeleton": "01",
		"construction_of_walls": "1",
		"roof_construction": "01",
		"type_of_locks": "1",
		"fire_protections": [{
				"id": 1,
				"has_protection": "1",
				"multitude": 2
			},
			{
				"id": 2,
				"has_protection": "1",
				"multitude": 2
			}
		],
		"theft_protections": ["1","3","7","10"],
		"alarm_connections": ["1","2"],
		"type_of_safety_shutters": ["1","2"],
		"claims_history": [{
			"claim_date": "2007-09-24T00:00:00.000Z",
			"claim_amount": 3000,
			"job_description": "free text"
		}],
		"co-owners": [{
		"person_type_code": "1",
		"last_name": "ΠΑΠΑΔΟΣΛOY",
		"first_name": "ΜΑΡΙΑ",
		"father_name": "ΜΗΝΑΣ",
		"birth_date": "1980-01-01T00:00:00.000Z",
		"gender_code": "1",
		"job_code": "666",
		"address": "Λεωφόρος Κηφισίας 274",
		"city": "Χαλάνδρι",
		"post_code": "15232",
		"phone": "",
		"mobile": "6900999999",
		"email": "",
		"afm": "094060402",
		"doy_code": "1151",
		"identity_number": "",
		"identity_date": "",
		"amka": "",
		"passport": "",
		"citizenship": "GR"
		}],
		"mortgages_loans": [{
			"bank_id": "061",
			"amount_loan": 5000

		}],
		"discounts": ["310", "320"]
	}]
}
'

4.7. Update object insured

Change an existing object insured.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X PUT "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/objects_insured/987654321"
-d '{"objects_insured": {
		"kind_of_risk": "04",
		"subkind_of_risk": "118",
		"address": "Λεωφόρος Κηφισίας",
		"address_number": "274",
		"city": "Χαλάνδρι",
		"post_code": "15121",
		"latitude": "38.0187793",
		"longitude": "23.788895",
		"building_commencement_year": 2000,
		"building_year": 2000,
		"square_meters" : 120,
		"building_year_piping": 2010,
		"bordering": "1",
		"is_owner_building": "1",
		"illegal": "0",
		"building_floors": [-1,2],
		"insurance_floors":[0,1,2],
		"meters_from_river": 5000,
		"bundle_code": "390",
		"insured_values": [{
				"group_cover": "01",
				"insured_value": 50000
			},
			{
				"group_cover": "02",
				"insured_value": 50000
			}
		],
		"extra_covers": [{
				"group_cover": "01",
				"cover": 201
			},
			{
				"group_cover": "02",
				"cover": 201
			}
		],
		"building_improvements": 0,
		"construction_of_skeleton": "01",
		"construction_of_walls": "1",
		"roof_construction": "1",
		"type_of_locks": "1",
		"fire_protections": [{
				"id": 1,
				"has_protection": "1",
				"multitude": 2
			},
			{
				"id": 2,
				"has_protection": "1",
				"multitude": 2
			}
		],
		"theft_protections": ["1","3","7","10"],
		"alarm_connections": ["1","2"],
		"type_of_safety_shutters": ["1","2"],
		"discounts": ["310", "320"]
	}
}'

4.8. Delete object insured

Delete an object insured.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-X DELETE "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/objects_insured/987654321"

4.9. Insert claims history

Insert a new claim.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X POST "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/objects_insured/987654321/claims_history"
-d '{"claims_history": [{
		"claim_date": "2007-09-24T00:00:00.000Z",
		"claim_amount": 3000,
		"job_description": "free text"
	}]
}
'

4.10. Update claims history

Change an existing claim info.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X PUT "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/objects_insured/987654321/claims_history/11223344"
-d '{"claims_history": {
		"claim_date": "2007-09-24T00:00:00.000Z",
		"claim_amount": 7000,
		"job_description": "free text"
	}
}'

4.11. Delete claims history

Delete a claim history.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-X DELETE "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/objects_insured/987654321/claims_history/11223344"

4.12. Insert co-owners

Insert co-owners.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X POST "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/objects_insured/987654321/co-owners"
-d '{"co-owners": [{
		"person_type_code": "1",
		"last_name": "ΠΑΠΑΔΟΣΛOY",
		"first_name": "ΜΑΡΙΑ",
		"father_name": "ΜΗΝΑΣ",
		"birth_date": "1980-01-01T00:00:00.000Z",
		"gender_code": "1",
		"job_code": "666",
		"address": "Λεωφόρος Κηφισίας 274",
		"city": "Χαλάνδρι",
		"post_code": "15232",
		"phone": "",
		"mobile": "6900999999",
		"afm": "094060402",
		"doy_code": "1151",
		"identity_number": "",
		"identity_date": "",
		"amka": "",
		"passport": "",
		"citizenship": "GR"
	}]
}
'

4.13. Delete co-owners

Delete co-owners.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-X DELETE "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/objects_insured/987654321/co-owners/55667788"

4.14. Insert mortgages loans

Insert a mortgage loan.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X POST "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/objects_insured/987654321/mortgages_loans"
-d '{"mortgages_loans": [{
		"bank_id": "061",
		"amount_loan": 5000

	}]
}
'

4.15. Update mortgages loans

Change an existing mortgage loan.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X PUT "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/objects_insured/987654321/mortgages_loans/061"
-d '{"mortgages_loans": {
		"amount_loan": 8000

	}
}'

4.16. Delete mortgages loans

Delete a mortgage loan.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-X DELETE "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/objects_insured/987654321/mortgages_loans/061"

4.17. Application calculation

Perform the calculations required for the specific application.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X PUT "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/calc"

4.18. Application edit

Make changes in the current application.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X PUT "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/edit"

4.19. Request approval

An application depending on some conditions might return messages saying that an approval from an underwriter is required. In these situations, if the user wants to proceed with requesting approval, it is enough to PUT an empty entity on resource URL. On success the api will respond with a 205 Reset status in which case the application cannot be altered by the user any more. When an underwriter examines the application, it will be changed back to a status that is actionable by the user. If the status of the application is in approval request (11) then the GET is required.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X PUT "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/request_approval"

4.20. Send for acceptance

Triggers the application acceptance process.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X PUT "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/send_for_acceptance"

4.21. Move to PREPAY

If a user wants to proceed with an application and issue a PREPAY notification, a PUT with an empty resource is needed on entity URL. On success the api will respond with a 205 Reset status, a Link header for notification document retrieval and a Link header with the uri for issue by charging for users that can and want to proceed that way.

An application in PREPAY status can be canceled by the user or canceled automatically after some days have passed (defined by the issuing department). An application in that status isn’t a policy yet, even if it is assigned a policy number. You can see that an application like that doesn’t have an issue date nor a receipt number.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X PUT "https://gateway.europisti.gr/dev/fire-api/rsc/applications/123456789/prepay"

5. Pricing

Overview

The following API endpoints can be used to access the pricing subsystem that calculates the precise final insurance policy cost with given parameters.

Available actions are:

Calculate bundle pricing

Calculate all the available bundles with details for covers and discounts used in calculation on each bundle.

5.1. Calculate bundle pricing

With a POST to this resource the api will calculate all the available bundles with details for covers and discounts used in calculation on each bundle using the supplied parameters.

If bundleCode is supplied then only that bundle will be calculated.

5.1.1. Resource URL

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
Example Request for a specific bundleCode
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-H 'Content-type: application/json' \
-X POST "https://gateway.europisti.gr/dev/fire-api/pricing/calcbundles" \
-d '{
  "bundles": [
               {
               "bundle_code": "390",
               "prefecture_code": "01",
               "building_year": 2010,
               "building_year_piping": 2010,
               "subkind_of_risk" : "118",
               "construction_of_skeleton" : "01",
               "roof_construction": "01",
               "insured_values": [
                                 {
                                  "group_cover": "01",
                                  "insured_value": 50000
                                  },
                                  {
                                  "group_cover": "02",
                                  "insured_value": 30000
                                  }
                                  ],
               "discounts": ["320","310"]
              }
               ]
}'

6. Parameters

The following API endpoints can be used to programmatically retrieve parameters

Overview

All of entity properties that are supposed to be used as input fields, have a method in parameters resource that returns the acceptable values usually with descriptions. All of the methods support a GET request.

There are both line of business (fire) specific parameters and common parameters. The latter ones are described in dedicated section of the developers guide; named "Common parameters".

Available calls are:

Methods
Method Description

…​/parameters/kindsOfRisks

Risk type

…​/parameters/kindsOfRisks/subkindsOfRisks

Risk category

…​/parameters/groupsInsured

Type of insurance (bulding, content, both)

…​/parameters/groupsCovers

Covers for the specific type

…​/parameters/bundles

Specific product bundles with covers

…​/parameters/bundles/extra_covers

The additional covers available

…​/parameters/listBundles

Available product bundles

…​/parameters/constructionOfSkeletons

Construction of Skeletons

…​/parameters/constructionOfWalls

Construction of Walls

…​/parameters/roofsConstruction

Roofs Construction

…​/parameters/fireProtectionMeasures

Fire Protection Measures

…​/parameters/theftProtectionMeasures

Theft Protection Measures

…​/parameters/typeOfSafetyShutters

Type of Safety Shutters

…​/parameters/typeOfLocks

Type of Locks

…​/parameters/alarmConnections

Alarm Connections

…​/parameters/documentCategories

A document’s category

…​/parameters/acceptance_methods

Ways of acceptance

Guides

Calls that return almost static data are: kindsOfRisks, groupsInsured, groupsCovers, bundles, listBundles, constructionOfSkeletons, constructionOfWalls, roofsConstruction, fireProtectionMeasures, theftProtectionMeasures, typeOfSafetyShutters, typeOfLocks, alarmConnections, documentCategories and acceptance_methods

The listBundles call is a special call that returns all product bundles with all included covers in the bundle as well as all other covers that can be added additionally. It is designed like this so that it is easy for the front end developer to display covers in a natural way.

6.1. Kinds Of Risks

Risk type

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Parameters
URI
Name Optional Comments

KindsOfRisks

YES

Query (url parameters)
Name Optional Comments

active

YES

0 = InActive, 1 = Active

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/kindsOfRisks?kindsOfRisks=1"

6.2. Subkinds Of Risks

Risk category.

Resource URL
Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Parameters
URI
Name Optional Comments

KindsOfRisks

NO

subkindsOfRisks

YES

Query (url parameters)
Name Optional Comments

active

YES

0 = InActive, 1 = Active

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/kindsOfRisks?kindsOfRisks=1/subKinds?subkindsOfRisks=1"

6.3. Groups Insured

Type of insurance (bulding, content, both).

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Parameters
URI
Name Optional Comments

GroupInsured

YES

01 = Κτίριο, 02 = Περιεχόμενο, 03 = Κτίριο & Περιεχόμενο

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/groupsInsured?groupInsured=03"

6.4. Groups Covers

Covers for the specific type.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Parameters
URI
Name Optional Comments

GroupCovers

YES

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/groupsCovers?groupCovers=00"

6.5. Bundles

Specific product bundles with covers.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Parameters
URI
Name Optional Comments

bundleCode

YES

Query (url parameters)
Name Optional Comments

group_insured

YES

prefecture_code

NO

building_year

NO

subkind_of_risk

NO

construction_of_skeleton

NO

roof_construction

NO

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/bundles?bundleCode=00"

6.6. Extra covers

The additional covers available.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Parameters
URI
Name Optional Comments

bundleCode

NO

Query (url parameters)
Name Optional Comments

building_year

NO

building_year_piping

NO

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/bundles/200/extra_covers"

6.7. All Bundles

Available product bundles.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Parameters
URI
Name Optional Comments

bundleCode

YES

Query (url parameters)
Name Optional Comments

active

YES

0 = InActive, 1 = Active

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/listBundles"

6.8. Construction of Skeletons

Construction of Skeletons.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/constructionOfSkeletons"

6.9. Construction of Walls

Construction of Walls.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/constructionOfWalls"

6.10. Roofs Construction

Roofs Construction.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/roofsConstruction"

6.11. Fire Protection Measures

Fire Protection Measures.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/fireProtectionMeasures"

6.12. Theft Protection Measures

Theft Protection Measures.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/theftProtectionMeasures"

6.13. Type of Safety Shutters

Type of Safety Shutters.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/typeOfSafetyShutters"

6.14. Type of Locks

Type of Locks.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/typeOfLocks"

6.15. Alarm Connections

Alarm Connections.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/alarmConnections"

6.16. Document Categories

A document’s category.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/documentCategories"

6.17. Acceptance methods

Ways of acceptance.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/fire-api/parameters/acceptance_methods"

7. Documents

Overview

The following API endpoints can be used to list, retrieve, insert, update and/or delete a document.

Available actions are:

List Documents

Τhe api will return an array of documents that exist under that application.

Retrieve a document as file

It will return the file image of the document which is related with application.

Insert document

In order to insert a new document, it must be url encoded and escaped in order to be inserted correctly.

Update document

It is possible to update some of the metadata of a document.

Delete document

Ιn order to delete an image a DELETE is enough, if the image is inserted the same day and supports deleting. System generated documents cannot be deleted.

7.1. List Documents

When a GET request is issued on resource, the api will return an array of documents that exist under that application. The field named id contains the document id that can be used for subsequent operations on that document. Each document metadata consists of the id, the filename of the document the document category and user comments. Maximum file length of an image must be less than 3MB.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/docs-api/policy/applications/123456879/documents"

7.2. Retrieve a document as file

Accessing with GET the resource will return the file image of the document which is related with application.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/docs-api/policy/applications/123456789/documents/987654321"

7.3. Insert document

In order to insert a new document, except the image by itself, it’s file name, an appropriate document category and ,optionally ,user comments. Because these fields may be posted as request parameters, it must be url encoded and escaped in order to be inserted correctly. So by POSTing to resource a raw file of supported formats and size, this new file is inserted. The api will reply with a 201 Accepted and the document resource in Location header and an entity with the id and link of the new document.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Parameters
Query (url parameters)
Name Optional Comments

file_name

NO

testfile.pdf

mime_type

NO

application/pdf

category_id

NO

comments

YES

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-X POST "https://gateway.europisti.gr/dev/docs-api/policy/applications/123456789/documents"
-d '{"documents": {
		"category_id": 1,
		"file_name": "Αίτηση.pdf",
		"mime_type": "Application/pdf",
		"comments": "mpla mpla"
  },
  ...
]
```

7.4. Update document

With PUT to the resource it is possible to update some of the metadata of a document (probably retrieved by GETing the same and altered by the user). Metadata that can be updated are the file name, the category id (which is mandatory) and lastly the comments. The actual image data cannot be updated and it is suggested to delete and insert the new document.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
-X POST "https://gateway.europisti.gr/dev/docs-api/policy/applications/123456789/documents/987654321"
-d '{"documents": {
		"category_id": 1,
		"file_name": "Αίτηση.pdf",
		"mime_type": "Application/pdf",
		"comments": "mpla mpla"
  },
  ...
]
```

7.5. Delete document

Usually in order to delete an image a DELETE is enough, if the image is inserted the same day and supports deleting. System generated documents cannot be deleted. Contact the issue department in order to remove an incorrect documents that the user cannot delete.

Resource Information

Response formats

JSON

Requires authentication?

Yes (user context)

Rate limited?

Yes

Example Request
curl -H 'X-Api-Key: your_api_key' \
-H 'Authorization: Bearer user_token' \
"https://gateway.europisti.gr/dev/docs-api/policy/applications/123456789/documents/987654321"

8. Labels

The following paragraphs provide the list of labels possibly needed for the Fire application and Person elements. The labels are useful also for the common parameters api.

Fire Application
category attribute optional data type label comments

fire_application

start_date

no

string ISO date

Έναρξη ασφάλισης

2021-11-01T00:00:00

fire_application

pay_frequency_in_months

no

number

Συχνότητα πληρωμής

Values : 3,6,12

fire_application

contact_way_code

no

string

Τρόπος διεκπεραίωσης

Contact ways

fire_application

application_acceptance_method

no

string

Τρόπος αποδοχής

Acceptance methods

fire_application

subagent_code

yes

string

Έμμεσος συνεργάτης

SubAgents

fire_application

service_code

yes

string

Only NN agent

fire_application

commission_code

yes

string

Only NN agent

client

.client

no

Λήπτης

Person

client

..consents

no

Δηλώσεις συγκατάθεσης

Consents

client

>>master_id

no

number

client

>>id

no

number

client

>>answer

no

string

insured

.insured

no

Ασφαλιζόμενος

Person

objects_insured

.objects_insured

Αντικείμενα ασφάλισης

objects_insured

kind_of_risk

no

string

Είδος κινδύνου

Kinds Of Risks

objects_insured

subkind_of_risk

no

string

Κατηγορία κινδύνου

Subkinds Of Risks

objects_insured

address

no

string

Διεύθυνση κινδύνου

objects_insured

address_number

yes

string

Αριθμός

objects_insured

city

no

string

Πόλη

objects_insured

post_code

no

string

Τ.Κ.

objects_insured

latitude

yes

string

objects_insured

longitude

yes

string

objects_insured

building_year

no

number

Έτος κατασκευής

objects_insured

building_commencement_year

yes

number

Έτος ανέγερσης οικοδομής

objects_insured

square_meters

no

number

Τετραγωνικά μέτρα

objects_insured

building_year_piping

no

number

Έτος αντικατάστασης σωληνώσεων

objects_insured

bordering

no

string

Συνορεύουσα

Values: 0=Όχι, 1=Ναι

objects_insured

is_owner_building

yes

string

Είστε ιδιοκτήτης της οικοδομής

Values: 0=Όχι, 1=Ναι

objects_insured

building_floors

no

array of numbers

Όροφοι οικοδομής

[-2,5]

objects_insured

insurance_floors

no

array of numbers

Όροφοι ασφάλισης

[4,5]

objects_insured

meters_from_river

yes

number

Πόσα μέτρα από το ακίνητο σας διέρχεται χείμαρρος ή ρέμα

objects_insured

construction_of_skeleton

no

string

Σκελετός οικοδομής

Construction of Skeletons

objects_insured

construction_of_walls

no

string

Κατασκευή τοίχων

Construction of Walls

objects_insured

roof_construction

no

string

Κατασκευή στέγης

Roofs Construction

objects_insured

type_of_locks

yes

string

Τύπος κλειδαριών

Type of Locks

fire_protections

..fire_protections

yes

Προστατευτικά μέσα πυρκαγιάς

Fire Protection Measures

fire_protections

>>id

number

fire_protections

>>has_protection

string

Values: 0=Όχι, 1=Ναι

fire_protections

>>multitude

number

fire_protections

theft_protections

yes

array of strings

Προστατευτικά μέσα κλοπής

Theft Protection Measures

fire_protections

alarm_Connections

yes

array of strings

Σύνδεση συναγερμού

Alarm Connections

fire_protections

type_of_safety_shutters

yes

array of strings

Τύπος ρολών ασφαλείας

Type of Safety Shutters

fire_protections

bundle_code

no

string

Πρόγραμμα ασφάλισης

Bundles

fire_protections

building_improvements

yes

number

Κτιριακές βελτιώσεις

Only kind_of_risk!=’04’

insured_values

..insured_values

no

Ασφαλιζόμενες αξίες

insured_values

>>group_cover

string

insured_values

>>insured_value

number

extra_covers

..extra_covers

yes

Επιπροσθετες καλύψεις

Extra covers

extra_covers

>>group_cover

string

extra_covers

>>cover

string

claims_history

..claims_history

yes

Ιστορικό Ζημιών

claims_history

>>claim_date

no

string ISO date

Ημ/νια ζημιάς

claims_history

>>claim_amount

no

number

Ποσό ζημιάς

claims_history

>>job_description

yes

string

Εργασίες αποκατάστασης

co-owners

..co-owners

yes

Συνιδιοκτήτες

Person

mortgages_loans

..mortgages_loans

yes

Ενυπόθηκα δάνεια

mortgages_loans

>>bank_id

no

string

Τράπεζα

Banks

mortgages_loans

>>amount_loan

no

number

Ποσό δανείου

discounts

..mortgages_loans

yes

array of numbers

Εκπτώσεις

Bundles

Person
attribute optional data type label comments

person_type_code

no

string

Πρόσωπο

Person Types

last_name

no

string

Επώνυμο/Επωνυμία

first_name

*

string

Όνομα

*required only for individuals

father_name

*

string

Όνομα πατρός

*required only for individuals

birth_date

*

string ISO date

Ημ/νία γέννησης

*required only for individuals

gender_code

*

string

Φύλο

*required only for individuals, Genders

job_code

yes

string

Επάγγελμα

Jobs

address

no

string

Διεύθυνση

city

no

string

Πόλη

post_code

no

string

Τ.Κ.

phone

yes

string

Τηλέφωνο

mobile

yes

string

Κινητό

email

yes

string

email

afm

no

string

Α.Φ.Μ.

doy_code

no

string

Δ.Ο.Υ

Doy

identity_number

yes

string

Αρ. Ταυτότητας

identity_date

yes

string ISO date

Ημ/νία Έκδ. Ταυτότητας

amka

yes

string

ΑΜΚΑ

citizenship

no

string

Υπηκοότητα

Nationalities