#Motor web services
Provides service methods to handle the lifecycle of motor policies.
* **Type**: SOAP
* **Production WSDL**: https://services.generali.gr/gbox-ws/soap/v1/motor?wsdl
* **Test WSDL**: http://www.generali.gr/gbox-ws/soap/v1/motor?wsdl
* **Demo WSDL**: http://www.generali.gr/gbox-ws/soap/demo/v1/motor?wsdl
Methods
* [validateInsurable](#validateInsurable)
* [tariffy](#tariffy)
* [issuePolicy](#issuePolicy)
* [listPackagesInfo](#listPackagesInfo)
* [getPackageInfo](#getPackageInfo)
* [getApplicationDocument](#getApplicationDocument)
* [getMotorStickerDocument](#getMotorStickerDocument)
* [uploadSupportingDocument](#uploadSupportingDocument)
* [getNoOfClaims](#getNoOfClaims)
* [getNoOfClaimsByDate](#getNoOfClaimsByDate)
* [issueGreenCard](#issueGreenCard)
##validateInsurable
Validates a motor insurable for Tariffication and returns a report with the results.
###Input (MotorInsurableBase)
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
motorCode | String | Numerical | Required | The eurotax code of the motor | 45589
plateNo | String | String | Required | The registration number of the vehicle | YXT4954
manufacturerYear | Integer | Integer | Required | Year of production of the car | 2012
marketValue | BigDecimal | BigDecimal | Required | Value of the car in the market | 26910.00
noOfClaims | Integer | Integer | Optional | The number of claims of the vehicle | 0
ownerGenderCode | String | listGenders(): code | Required | The gender of the owner(policy holder) | 1
ownerAfm | String | Numerical | Optional | The Afm of the owner(policy holder) | 012837464
driverBirthDate | Date | Date | Required | The birthdate of the driver | 24/12/1983
driverMaritalStatusCode | String | listMaritalStatuses(): code | Required | The marital status of the driver | 1
driverPostalCode | String | Numerical | Required | The postal code of the main residence of the driver | 15561
protectionMeasures | Set[String] | listProtectionMeasures(): code | Optional | Protection measures of the vehicle | 001
purchasedDate| Date | Date | Optional | Date in which the car was bought | 21/02/2012
###Output
The output is a Report *(see General considerations)*.
###Example
**Example with errors**
*Input*
```
24/12/1983150001201015000.5020120128374641IXT1213001
```
*Output*
```
error2/insurable/motorCode
Το πεδίο δεν πρέπει να είναι κενό.
error2/insurable/driverBirthdate
Το πεδίο δεν πρέπει να είναι κενό.
false
```
##tariffy
Tariffies the selected coverages of an insurable object. Notice that, regarding the covers, only the *missing* information should be sent. This includes the sum insured, the parameters, and rarely the premium of the covers that are not disabled as well as those covers that are optional (even if they contain no extra input information). Any other data sent will be ignored by the tariffication engine.
In order to know which values should be sent to our system you could:
* Use our [listPackagesInfo](#listPackagesInfo) *(prefered)*: Check the list of mandatory and optional covers in order to know which ones can be selected. Check the [cover field](#FieldInfo) type values to know which of them (if any) should be sent with their cover.
* Use Iris as a reference: Check the list of mandatory and optional covers in order to know which ones can be selected. Check the inputs that are capable of taking values from the user (they are not disabled), those are the ones that should be sent along with their cover.
Check the examples to get a better idea of how to use the service.
###Input
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
paymentFrequency | Integer | **1**: Annual **2**: Semiannual | Required | The payment frequency to tariffy for | 1
insurable | MotorInsurableBase | MotorInsurableBase | Required | The motor to insure | *(see above)*
startDate | Date | Date | Required | The starting date of the tariffication | 15/05/2014
pack | Pack | Pack | Required | The package to tariffy (including extra products and parameters) | *(see below)*
####Pack
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
code | String | Numerical | Required | The code of the package | 123000000
products | List[Cover] | Cover | Required | The choosen products of the package | List["123000000", Value[20223.23], Value["100"], List["paramType", "400", Value[1000.50]]]
####Cover
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | |---------------- | ----------- | -------
code | String | String | Required | The code of the product | 234
sumInsured | Value | Value | Optional | The sum insured of the product | Value[20223.23]
premium | Value | Value | Otional | The premium of the product | Value["100"]
params | List[CoverParam] | CoverParam | Optional | The params of the product | List["paramType", "400", Value[1000.50]]
####CoverParam
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
type | String | String | Required | The type of the product param | "GGY"
code | String | String | Required | The code of the product param | "400"
####Value
Can be choosen either the codeValue or the numericalValue.
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | |---------------- | ----------- | -------
codeValue | String | String | Required | The value as code | 200
numericalValue | BigDecimal | BigDecimal | Required | The value as number | 5000.43
###Output
Field | Type | Value | Description | Example
----- | ---- | ----- | ----------- | -------
requestCode | String | String | Is the key code of the tariffication in case of tracking it down | 162
totalPremiumGross | BigDecimal | BigDecimal | Tariffication's total premium gross amount | 450.67
totalPremiumNet | BigDecimal | BigDecimal | Tariffication's total premium net amount | 390.81
coverageList | Package | Package | The selected coverages and products | *(see above)*
###Example 1
In this example, taken from Iris, we tariffy package Speed 2 and get a valid result. Notice that only the *missing* information is sent (red circles), which is the one coming from the the non disabled inputs.
![Speed2](images/Speed2-a.jpg)
*Input*
```
POST http://www.generali.gr/gbox-ws/soap/demo/v1/motor HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
Content-Length: 1458
Host: localhost:8080
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Authorization: Basic ZGVtbzoxMjM0
```
```
12014-04-231983-12-241500012010166503560301234567891IBZ12132011-11-20953950
```
*Output*
```
req-50045-1400156167763313.85439.311000000.001000000.000.0030000.00800.003000.000.000.0010000.0016650.0015000.0016650.0016650.001500.0016650.001000.000.00
```
#### Client (Java)
Example of a simple Java client. Notice the exact naming of the classes depends on your client generator and it could be slightly different than the following.
```
import java.math.BigDecimal;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.ws.BindingProvider;
public class TarifficationExample1 {
public static final void main(String[] args) {
try {
MotorWsV1Locator locator = new MotorWsV1Locator();
MotorWsV1 service = locator.getMotorWsV1BasePort();
//Authentication
Map context = ((BindingProvider) service).getRequestContext();
context.put(BindingProvider.USERNAME_PROPERTY, "50072");
context.put(BindingProvider.PASSWORD_PROPERTY, "1234");
//Setting Data to MotorInsurableBase
MotorInsurableBase motorInsurable = new MotorInsurableBase();
motorInsurable.setDriverBirthdate(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar(1983, 12, 24)));
motorInsurable.setDriverMaritalStatusCode("1");
motorInsurable.setDriverPostalCode("50001");
motorInsurable.setManufacturerYear(2010);
motorInsurable.setMarketValue(new BigDecimal(16650));
motorInsurable.setMotorCode("35603");
motorInsurable.setNoOfClaims(0);
motorInsurable.setOwnerAfm("123456789");
motorInsurable.setOwnerGenderCode("1");
motorInsurable.setPlateNo("IBZ1213");
motorInsurable.setPurchasedDate(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar(2011, 11, 20)));
//Create mandatory Cover for Personal Accident
Cover personalAccident = new Cover();
Value sumInsuredPersonal = new Value();
sumInsuredPersonal.setCodeValue("953");
personalAccident.setCode("280000000");
personalAccident.setSumInsured(sumInsuredPersonal);
//Create mandatory Cover for Windscreen
Cover windscreen = new Cover();
Value sumInsuredWindscreen = new Value();
sumInsuredWindscreen.setCodeValue("950");
windscreen.setCode("281000000");
windscreen.setSumInsured(sumInsuredWindscreen);
//Create optional Cover for Motor Assistance
Cover motorAssistance = new Cover();
motorAssistance.setCode("753450171");
//Setting data to Pack
Pack pack = new Pack();
pack.setCode("802");
List covers = pack.getCover();
covers.add(personalAccident);
covers.add(windscreen);
covers.add(motorAssistance);
//Execution
Quotation quotation = service.tariffy(1, DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar(2014, 5, 19)), motorInsurable, pack);
//Result displaying
System.out.println("Request code: "+quotation.getRequestCode());
System.out.println("Premium Gross Amount: "+quotation.getTotalPremiumGross());
System.out.println("Premium Net Amount: "+quotation.getTotalPremiumNet());
} catch (DatatypeConfigurationException ex) {
Logger.getLogger(TarifficationExample1.class.getName()).log(Level.SEVERE, null, ex);
} catch (SystemMaintenanceException_Exception ex) {
Logger.getLogger(TarifficationExample1.class.getName()).log(Level.SEVERE, null, ex);
} catch (ValidationException ex) {
//Manage report if ValidationException occur
Report report = ex.getFaultInfo().getReport();
for(Message message : report.getMessage()) {
System.out.println("Target : "+message.getTarget());
System.out.println("Severity: "+message.getSeverity());
System.out.println("Message Code: "+message.getCode());
System.out.println("Message: "+message.getBody());
}
}
}
}
```
Being the output:
Request code: req-50045-1400571612142
Premium Gross Amount: 439.31
Premium Net Amount: 313.85
###Example 2
In this example, taken from Iris *(see image above)*, we tariffy package Speed 2 and get an invalid result. Notice that the input is missing some required informations about covers.
*Input*
```
12014-04-131983-12-241500012009160003560301234567891YZX12342011-11-2095310000
```
*Output*
```
S:ServerΠαρουσιάστηκε σφάλμα κατά την τιμολόγηση.error1/pack/cover[@code="281000000"]
Η κάλυψη με κωδικό: 281000000 είναι υποχρεωτικό να δηλωθεί.
false
```
###Example 3
In this example, we tariffy package Speed 3 and get an invalid result, caused by insurable's wrong data.
*Input*
```
12014-05-151500012010166503560311234567891IBZ89722011-11-20
```
*Output*
```
S:ServerΠαρουσιάστηκε σφάλμα κατά την τιμολόγηση.error2/insurable/driverBirthdate
Το πεδίο δεν πρέπει να είναι κενό.
false
```
##issuePolicy
Issuing a policy for the provided insurables and the selected coverages. Should be provided informations about the distribution channel, the policy holder, the main insurable, the motor data and the coverages. Notice that, regarding the covers, only the *missing* information should be sent. This includes the sum insured, the parameters, and rarely the premium of the covers that are not disabled as well as those covers that are optional (even if they contain no extra input information).
In order to know which coverages should be sent to our system you could:
* Use our [listPackagesInfo](#listPackagesInfo) *(prefered)*: Check the list of mandatory and optional covers in order to know which ones can be selected. Check the [cover field](#FieldInfo) type values to know which of them (if any) should be sent with their cover.
* Use Iris as a reference: Check the list of mandatory and optional covers in order to know which ones can be selected. Check the inputs that are capable of taking values from the user (they are not disabled), those are the ones that should be sent along with their cover.
Check the examples to get a better idea of how to use the service.
### Input
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
application | MotorApplication | MotorApplication | Required | The motor application for issuing | *(see below)*
####MotorApplication
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
distChannel | DistChannel | DistChannel | Required | Dist Channel data | *(see below)*
policyHolder | Person | Person | Required | Informations about the policy holder | *(see below)*
mainInsurable | Person | Person | Optional | Informations about the main insurable. If not provided, main insurable will be considered as the same person as the policy holder | *(see below)*
motorInsurable | MotorInsurable | MotorInsurable | Required | Informations about motor data | *(see below)*
pack | Pack | Pack | Required | The selected coverages | *(see below)*
payment | Payment | Payment | Required | Informations about the payment procedure | *(see below)*
applicationDetails | ApplicationDetails | ApplicationDetails | Required | Extra details about the application | *(see below)*
####DistChannel
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
code | String | Numerical | Required | Dist Channel code | 12345
subCode | String | Numerical | Optional | The sub code if existed | 123
hasTaxReporting | boolean | * **true** *: If has tax reporting * **false** *: If not *(Default value: false)* | Optional | If the policy is for professional use | false
####Person
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
gender | int | listGenders():code | Required | The gender of the person | 1
companyName | String | String | * **Required** *: If the gender is company * **Not allowed** *: If the gender is male or female | The company name | Generali
surname | String | String | * **Required** *: If the gender is male or female * **Not allowed** *: If the gender is company | The surname of the person | ΣΤΕΦΑΝΟΥ
name1 | String | String | * **Required** *: If the gender is male or female * **Not allowed** *: If the gender is company | The name of the person | ΕΛΕΥΘΕΡΙΑ
name2 | String | String | Optional | Father's name | ΓΕΩΡΓΙΟΣ
employmentType | String | listEmployments():code | Required | The code of the person's employment type | 220
licenseDate | Date | Date | Required | The license date of the person | 20/01/1999
birthDate | Date | Date | Required | The birthdate of the person | 01/01/1987
nationality | String | String | Optional | The nationality of the person | ΕΛΛΗΝΙΚΗ
maritalStatus | int | listMaritalStatuses():code | Required | The marital status of the person | 3
afm | String | Numerical | Required | The Tax Registration Number of the person | 123456789
personId | String | String | Optional | The person's ID number | AI12345
iban1-iban7 | String | String | Optional | The digits of the IBAN | 1111
streetName | String | String | Required | The street name of the person's residence | ΕΥΤΕΡΠΗΣ
streetNo | String | String | Optional | The street number of the person's residence | 1
postCode | String | Numerical | Required | The postal code of the person's residence | 15561
city | String | String | Required | The city of the person's residence | ΑΘΗΝΑ
phoneNo | String | Numerical | Optional | The phone number (home or mobile) of the person | 2106666666
fax | String | Numerical | Optional | The fax number of the person | 2106666661
email | String | String | Optional | The email of the person | email@gmail.com
nameNo | String | Numerical | Optional | The nameNo of a person, if existing | 13734832
####MotorInsurable
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
registrationNo | String | String | Required | The registration number of the motor | YXT1234
eurotaxCode | String | listMotorModel():code or listMotorModelsWithRetailPrice():code | Required | The eurotax code of the motor | 12345
eurotaxDescr | String | name of the manufacturer + listMotorModel():type1 or listMotorModelsWithRetailPrice():type1 | Optional | The decreption of the motor | Alpha Romeo A3 SB 1.6 16v FSi
hp | int | listMotorModel():taxHp or listMotorModelsWithRetailPrice():taxHp | Optional | The tax hp of the motor | 11
doors | int | int | Optional | The number of the motor's doors | 5
colour |String | String | Optional | The colour of the motor | ΜΠΛΕ
yearlyKm | int | int | Optional | The number of yearly km of the motor | 2000
manufacturerMonth | String | listMotorModel():beginDate.month or listMotorModelsWithRetailPrice():beginDate.month | Optional | The manufacturer month | 11
manufacturerYear | int | listMotorModel():beginDate.year or listMotorModelsWithRetailPrice():beginDate.year | Required | The manufacturer year | 2012
transferDate | Date | Date | Optional | The date of the transfer, if existing | 20/02/2013
claims | int | int | Required | The number of the claims the last 3 years | 2
marketValue | BigDecimal | BigDecimal | Required | The current market value of the motor | 3500
hasInsuranceCertificate | boolean | * **true** *: If has InsuranceCertificate * **false** *: If not *(Default value: false)* | Optional | Declares if you want a certificate of insurance for the bank *(only for new motors)* | true
bankName | String | String | * **Required** *: If hasInsuranceCertificate = true | The name of the bank from which you want the certificate | BANK
gps | boolean | boolean | Optional | If the motor has gps | true
garage | boolean | boolean | Optional | if the client has a garage for the motor | false
alarm | boolean | boolean | Optional | If the motor is equiped with alarm | true
####Pack
check *[tariffy](#tariffy)* method.
####Payment
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
frequency | int | listPaymentFrequencies():code | Required | The payment frequency of the policy | 1
card | boolean | boolean | Optional | Defines the way of payment | true
visa | boolean | boolean | Optional | Defines the way of payment | true
mastercard | boolean | boolean | Optional | Defines the way of payment | false
twelveMonths | boolean | boolean | Optional | Defines the way of payment | false
oneTime | boolean | boolean | Optional | Defines the way of payment | true
creditCardNumber1-creditCardNumber4 | String | String | Optional | The credit cards number | 44444
creditCardExpireMonth | String | String | Optional | The expiring month of the card | 01
creditCardExpireYear | String | String | Optional | The expiring month of the year | 2015
bank | boolean | boolean | Optional | Defines the way of payment | true
bankName | String | String | Optional | The name of the bank choosen for payments | BANK
other | boolean | boolean | Optional | Defines the way of payment | true
webBanking | boolean | boolean | Optional | Defines the way of payment | true
elta | boolean | boolean | Optional | Defines the way of payment | false
phoneBanking | boolean | boolean | Optional | Defines the way of payment | false
inhouse | boolean | boolean | Optional | Defines the way of payment | false
dias | boolean | boolean | Optional | Defines the way of payment | false
collector | boolean | boolean | Optional | Defines the way of payment | false
atm | boolean | boolean | Optional | Defines the way of payment | false
collaborator | boolean | boolean | Optional | Defines the way of payment | false
####ApplicationDetails
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
startDate | Date | Date | Required | The starting date of the policy | 09/05/2014
endDate | Date | Date | Required | The expiring date of the policy | 09/05/2015
signatureDate | Date | Date | Optional | The date signed the policy | 09/05/2014
signaturePlace | String | String | Optional | The place signed the policy | ΑΘΗΝΑ
### Output
####PolicyReport
Field | Type | Value | Description | Example
----- | ---- | ----- | ----------- | -------
applicationNo | String | String | The number of the application | 001238485
quotationNo | String | String | The number of the quotation | 39482848
If the issuePolicy is executed sucessfully, meaning that there are not any kind of exceptions, there will always be an applicationNo. Additionally, if underwriter rules are met and the application becomes a policy, there will be a policyNo too.
###Example1
In this example will be issued sucessfully an application as a policy. The selected package is Speed1 and the covers are showed in the image below.
![Iris_image2](images/Iris_image2.png)
*Input*
```
2015-05-222014-05-22ΧΟΛΑΡΓΟΣ2014-05-22954950falseGenerali1396512211992-01-01ΑΘΗΝΑeleftheria@gmail.com22022014-05-061ΕΛΕΥΘΕΡΙΑΓΕΩΡΓΙΟΣΕΛΛΗΝΙΚΗ210809018215561ΠΥΘΕΟΥ2ΣΤΕΦΑΝΟΥfalse0ΜΠΛΕ5A5 1.8 16v TFSifalsefalsefalse1605201336890IBZ34692013-05-01478811000011396512211992-01-01ΑΘΗΝΑeleftheria@gmail.com22022014-05-061ΕΛΕΥΘΕΡΙΑΓΕΩΡΓΙΟΣΕΛΛΗΝΙΚΗ210809018215561ΠΥΘΕΟΥ2ΣΤΕΦΑΝΟΥ
```
*Output*
```
9703008411076177
```
###Example2
In this example we will try to issue an application for Speed1 and for the selected covers showed in the image below. We don't have as response exception, but we didn't manage to retrieve policy number.
![Iris_image3](images/Iris_image3.png)
*Input*
```
2015-05-122014-05-12ΧΟΛΑΡΓΟΣ2014-05-22954falseGeneralifalse0ΜΠΛΕ5A5 1.8 16v TFSifalsefalsefalse1605201336890IBZ34692013-05-01478811000011396512211987-01-01ΑΘΗΝΑeleftheria@gmail.com22022006-05-061ΕΛΕΥΘΕΡΙΑΓΕΩΡΓΙΟΣΕΛΛΗΝΙΚΗ210809018215561ΠΥΘΕΟΥ2ΣΤΕΦΑΝΟΥ
```
*Output*
```
97030106
```
###Example3
In this example we will try to issue the same application as in Example 2 that will throw WsException. The input is missing some mandatory fields.
*Input*
```
2015-05-122014-05-12ΧΟΛΑΡΓΟΣ2014-05-22954falseGeneralifalse0ΜΠΛΕ5A5 1.8 16v TFSifalsefalsefalse1605201336890IBZ34692013-05-01100001ΑΘΗΝΑeleftheria@gmail.com22022006-05-061ΕΛΕΥΘΕΡΙΑΓΕΩΡΓΙΟΣΕΛΛΗΝΙΚΗ210809018215561ΠΥΘΕΟΥ2ΣΤΕΦΑΝΟΥ
```
*Output*
```
S:ServerΠαρουσιάστηκε σφάλμα κατά την έκδοση συμβολαίου.error1/policyHolder/afm
Το πεδίο Α.Φ.Μ. του Συμβαλλομένου είναι υποχρεωτικό.
error1/mainInsurable/birthDate
Το πεδίο Ημερ.γέννησης του Κυρίως Οδηγού είναι υποχρεωτικό.
error1/mainInsurable/afm
Το πεδίο Α.Φ.Μ. του Κυρίως Οδηγού είναι υποχρεωτικό.
error1/motorInsurable/torEurotaxCode
Το πεδίο Κωδ.Eurotax είναι υποχρεωτικό.
true
```
###Example4
In this example we will try to issue the same application as in Example 2 that will throw WsException. The input is missing the mandatory covers.
```
2015-05-122014-05-12ΧΟΛΑΡΓΟΣ2014-05-22falseGeneralifalse0ΜΠΛΕ5A5 1.8 16v TFSifalsefalsefalse1605201336890IBZ34692013-05-01100001ΑΘΗΝΑeleftheria@gmail.com22022006-05-061ΕΛΕΥΘΕΡΙΑΓΕΩΡΓΙΟΣΕΛΛΗΝΙΚΗ210809018215561ΠΥΘΕΟΥ2ΣΤΕΦΑΝΟΥ
```
*Output*
```
S:ServerΠαρουσιάστηκε σφάλμα κατά την έκδοση συμβολαίου.error1/pack/cover[@code="280000000"]
Η κάλυψη με κωδικό: 280000000 είναι υποχρεωτικό να δηλωθεί.
false
```
##listPackagesInfo
Provides information about the selectable packages. This information includes the covers and parameters that should be sent to our system when performing tariffication or issuing policies.
### Output
Field | Type | Value | Description | Example
----- | ---- | ----- | ----------- | -------
packageInfo | List[PackageInfo] | PackageInfo | A List of the available packages | *(see below)*
#### PackageInfo
Field | Type | Value | Description | Example
----- | ---- | ----- | ----------- | -------
code | String | Numerical | The code of the package | 801
description | String | Textual | The description of the package | Speed1
cover | List[CoverInfo] | List[CoverInfo] | The products belonging to the package | *(see example)*
#### ProductInfo
Field | Type | Value | Description | Example
----- | ---- | ----- | ----------- | -------
code | String | Numerical | The code of the product | 001
description | String | Textual | The description of the product | Product 1
mandatory | Boolean | Boolean | Defines if the product is mandatory or optional | false
sumInsured | FieldInfo | FieldInfo | The information about the sum insured | ["automatic", Value[3000], List[]]
premium | FieldInfo | FieldInfo | The information about the premium | ["automatic", Value[3000], List[ Param["001", "MERCEDES"], Param["002", "AUDI"]]]
params | List[ParamInfo] | ParamInfo | The parameters of the product | ["001", "Extra Param1", Value[1000], List[ Param["001", "ALARM"] ]]
#### FieldInfo
Field | Type | Value | Description | Example
----- | ---- | ----- | ----------- | -------
type | String | automatic, typeIn, none, param | The type of the field | automatic
value | Value | Value | The value of the field | Value[3000]
options | list[Param] | Param | Possible options of the field | *(see General considerations)*
About the type element:
The FieldInfo *type* refers to the kind of value that the field holds.
Type | Description
---- | -----------
typeIn | A numerical value, freely chosen. The value can still be negatively validated from our business rules.
param | A code value, to be chosen among a provided list. The list of options is provided with the field.
automatic | A value that is not chosen by the client application but outputted by our system.
none | There is no value assignable, neither from the client, neither from our system.
#### ParamInfo
Field | Type | Value | Description | Example
----- | ---- | ----- | ----------- | -------
type | String | String | Specifies the type of the parameter | 001
label | String | String | The label of the parameter | Extra Param1
value | Value | Value | The value of the parameter | Value[1000]
options | List[Param] | Param | Options of the parameter | *(see General considerations)*
###Example
```
Speed1Α.Ε.-Σωμ.ΒλάβεςtrueautomaticautomaticΑ.Ε.-Υλ.ΖημιέςtrueautomaticautomaticΑ.Ε.στη μεταφ.& σε φυλ.χώρουςtruenoneautomaticΥλ.Ζημιές από ανασφ.όχημαtrueautomaticautomaticΚάλυψη αερόσακωνtrueautomaticautomaticΝομική ΣτήριξηtrueautomaticautomaticΦροντίδα ΑτυχήματοςtruenoneautomaticΡυμούλκ.λόγω ατυχ.truenoneautomaticΠροσωπικό ΑτύχημαtrueparamautomaticΘραύση ΚρυστάλλωνfalseparamautomaticΟδική ΒοήθειαfalseautomaticautomaticΑ.Ε.ΡυμουλκούμενουfalseautomaticautomaticSpeed2Α.Ε.-Σωμ.ΒλάβεςtrueautomaticautomaticΑ.Ε.-Υλ.ΖημιέςtrueautomaticautomaticΑ.Ε.στη μεταφ.& σε φυλ.χώρουςtruenoneautomaticΥλ.Ζημιές από ανασφ.όχημαtrueautomaticautomaticΚάλυψη αερόσακωνtrueautomaticautomaticΝομική ΣτήριξηtrueautomaticautomaticΦροντίδα ΑτυχήματοςtruenoneautomaticΡυμούλκ.λόγω ατυχ.truenoneautomaticΠροσωπικό ΑτύχημαtrueparamautomaticΘραύση ΚρυστάλλωνfalseparamautomaticΟδική ΒοήθειαfalseautomaticautomaticΑ.Ε.ΡυμουλκούμενουfalseautomaticautomaticSpeed3Α.Ε.-Σωμ.ΒλάβεςtrueautomaticautomaticΑ.Ε.-Υλ.ΖημιέςtrueautomaticautomaticΑ.Ε.στη μεταφ.& σε φυλ.χώρουςtruenoneautomaticΥλ.Ζημιές από ανασφ.όχημαtrueautomaticautomaticΚάλυψη αερόσακωνtrueautomaticautomaticΝομική ΣτήριξηtrueautomaticautomaticΦροντίδα ΑτυχήματοςtruenoneautomaticΡυμούλκ.λόγω ατυχ.truenoneautomaticΠροσωπικό ΑτύχημαtrueparamautomaticΘραύση ΚρυστάλλωνfalseparamautomaticΟδική ΒοήθειαfalseautomaticautomaticΑ.Ε.Ρυμουλκούμενουfalseautomaticautomatic
```
##getPackageInfo
Provides information about a selected package. This information includes the covers and parameters that should be sent to our system when performing tariffication or inssuing policies.
### Input
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
packageCode | String | Numerical | required | The code of the requesting package | 801
### Output
Field | Type | Value | Description | Example
----- | ---- | ----- | ----------- | -------
packageInfo | PackageInfo | PackageInfo | A List of the available packages | *(see listPackageInfo)*
###Example 1
**Valid Example**
*Input*
```
801
```
*Output*
```
Speed1Α.Ε.-Σωμ.ΒλάβεςtrueautomaticautomaticΑ.Ε.-Υλ.ΖημιέςtrueautomaticautomaticΑ.Ε.στη μεταφ.& σε φυλ.χώρουςtruenoneautomaticΥλ.Ζημιές από ανασφ.όχημαtrueautomaticautomaticΚάλυψη αερόσακωνtrueautomaticautomaticΝομική ΣτήριξηtrueautomaticautomaticΦροντίδα ΑτυχήματοςtruenoneautomaticΡυμούλκ.λόγω ατυχ.truenoneautomaticΠροσωπικό ΑτύχημαtrueparamautomaticΘραύση ΚρυστάλλωνfalseparamautomaticΟδική ΒοήθειαfalseautomaticautomaticΑ.Ε.Ρυμουλκούμενουfalseautomaticautomatic
```
###Example 2
**Example with error**
*Input*
```
1
```
*Output*
```
S:ServerInvalid package code: 1
```
##getApplicationDocument
###Input
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
applicationCode | String | Numerical | required | The number of the retrieving application | 02938475
###Output
The output is the byte[] of the document.
-* **Throws WsException** *:
* when userId is not valid.
* when application doesn't exist.
* the userId is not authorized to retrieve the application.
###Example1
*Output(Successful)*
```
JVBERi0xLjYNJeLjz9MNCjI0IDAgb2JqDTw8L0xpbmVhcml6ZWQgMS9MIDIxNzQyL08gMjYvRSAxNjUyOS9OIDEvVCAyMTQyNPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIj4KICAgICAgICAgPHhtcE1==
```
###Example2
*Output(throwing exception)*
```
HTTP/1.1 500 Internal Server Error
X-Powered-By: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Sun Microsystems Inc./1.6)
Server: GlassFish Server Open Source Edition 3.1.2.2
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Wed, 02 Apr 2014 07:20:41 GMT
Connection: close
```
```
S:ServerΠαρουσιάστηκε σφάλμα κατά τη λήψη του εγγράφου.error5/applicationCode
Το έγγραφο δεν υπάρχει.
false
```
##getMotorStickerDocument
This service retrieves the temporary motor sticker document.
###Input
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
applicationCode | String | Numerical | required | The number of the retrieving application's motor sticker | 02938475
###Output
The output is the byte[] of the document.
-* **Throws WsException** *:
* when userId is not valid.
* when application doesn't exist.
* the userId is not authorized to retrieve the application.
##uploadSupportingDocument
###Input
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
typeCode | String | listSupportigDocumentTypes():code | required | The type of the supporting document | 100
applicationNo | String | Numerical | Required | The number of the application | 29384673
title | String | String | Required | The title of the uploading document with the mime type | myPersonalId.jpeg
document | byte[] | byte[] | Required | The byte[] of the document |
###Output
-* **Throws WsException** *:
* when userId is not valid.
* if the application doesn't exist.
* the userId is not authorized to upload supporting documents to the application.
###Example1
*Output(Successful)*
```
HTTP/1.1 200 OK
X-Powered-By: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Sun Microsystems Inc./1.6)
Server: GlassFish Server Open Source Edition 3.1.2.2
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Wed, 02 Apr 2014 07:49:29 GMT
```
```
```
###Example2
*Input*
```
SupportingDoc97030069SupportingDoc.pdfcid:918515312339
````
*Output(throwning exception)*
```
HTTP/1.1 500 Internal Server Error
X-Powered-By: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Sun Microsystems Inc./1.6)
Server: GlassFish Server Open Source Edition 3.1.2.2
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Wed, 02 Apr 2014 07:20:41 GMT
Connection: close
```
```
S:ServerΠαρουσιάστηκε σφάλμα κατά τη εισαγωγή συμπληρωματικών εγγράφων.error25/applicationCode
Δεν είστε εξουσιοδοτημένος γι'αυτή την ενέργεια.
false
```
##getNoOfClaims
Retrieves the number of blamable claims for a certain plate number.
###Input (MotorInsurableBase)
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
plateNo | String | String | required | The registration number of the vehicle | IXT1213
###Output
The output is the number of blamable claims.
###Example 1
*Input*
```
IBZ8972
```
*Output*
```
2
```
###Example 2
**Example with errors**
*Input*
```
```
*Output*
```
S:ServerError while getting number of claimserror5/plateNo
The value should not be empty.
false
```
##getNoOfClaimsByDate
Retrieves the number of blamable claims for a certain plate number after the purchase date.
###Input (MotorInsurableBase)
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
plateNo | String | String | required | The registration number of the vehicle | IXT1213
startDate | Date | Date | required | The purchase date of the vehicle | 20-3-2013
###Output
The output is the number of blamable claims.
###Example 1
*Input*
```
YZT12522013-04-01
```
*Output*
```
0
```
###Example 2
*Input*
```
YZT12522011-04-01
```
*Output*
```
1
```
##issueGreenCard
Issues an application for a green card
###Input
Field | Type | Value | Required/Optional | Description | Example
----- | ---- | ----- | ----------------- | ----------- | -------
address | String | String | required | The address of applicant (Must contain only latin characters and numbers) | ATHINA 5
countries | countries | Array of countries | optional | The countries excluded from the green card | *(see example)*
startDate | Date | String | required | The start date card applies. | 2015-12-20
endDate | Date | Date | required | The end date card stops being valid | 2015-12-20
fullName | String | String | required | The fullname of applicant (Must contain only capital latin characters) | TEST TEST
policyNo | String | String | required | The relevant policy no | 11223866
The country list is the following
Code | Description
----- | ----
AL | Albania
AND | Andorra
BIH | Bosnia And Herzegovina
BY | Belarus
FYR | FYROM
IL | Israel
IR | Iran
MA | Morocco
MD | Moldova
MNE | Montenegro
RUS | Russia
SRB | Serbia
TN | Tunisia
TR | Turkey
UA | Ukraine
###Output
The output includes the green card number or the validation/fault exception string.
###Example 1
*Input*
```
11230965TSIRIGOTAKI AIKATERINI
PATISION 15 ATHINA
RUS2015-07-22T04:02:49+03:002015-07-30T10:01:03+02:00
```
*Output*
```
JVBERi0xLjIgCiXi48/TIAoxIDAgb2JqIAo8PCAKL1R5cGUgL0NhdG[...]0IDEgMCBSIAovSW5mbyAxMTkgMCBSIAo+PiAKc3RhcnR4cmVmIAoyMTE4MDkgCiUlRU9GIAo=10003533
```
###Example 2
*Input*
```
TEST
2015-12-20T15:42:28TEST112199522015-12-16T15:42:28
```
*Output*
```
ns2:Server!Error while issuing green card!error11250/as400Validation
Η πράσινη κάρτα προϋπάρχει στο ασφαλιστήριο.
true
```