#Policy web services Provides service methods to handle policy operations. * **Type**: SOAP * **Production WSDL**: https://services.generali.gr/soap/v2/policy?wsdl * **Test WSDL**: https://services-test.generali.gr/soap/v2/policy?wsdl Methods * [getAgreementDocument](#getAgreementDocument) * [getLatestAgreementDocument](#getLatestAgreementDocument) * [getLatestAgreementDocumentByApplicationCode](#getLatestAgreementDocumentByApplicationCode) * [getLatestReceiptDocument](#getLatestReceiptDocument) * [issueAndPay](#issueAndPay) * [payQuotation](#payQuotation) * [isPaidOut](#isPaidOut) * [isPaidOutByPaymentCode](#isPaidOutByPaymentCode) * [getPolicyByPaymentCode](#getPolicyByPaymentCode) #getAgreementDocument <a name="getAgreementDocument"></a> This service is for downloading the policy document for the selected endorsement code. In order to download a policy it **must** be inside a Journal. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | Required | The code of the policy | 11244971 endorsementCode | String | String | Required | The endorsement code of the policy | 000000000 ###Output Type | Description | Example ---- | ----------- | ------- AgreementDocument | Report of policy download | *(see below)* ####AgreementDocument Field | Type | Value | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | The policy code| 11244971 endorsementCode | String | String | The endorsement code | 000000000 journalCode | String | Date | The journal code that policy belongs to | 00771651 htmlContent | String | String | The policy document in html format | *(see example)* pdfContent | byte[] | byte[] | The policy in byte[] format | *(see example)* status | String | String | The status indicating whether the document is printed | printed ###Example 1 *Input* ``` <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://v2.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v2:getAgreementDocument> <policyCode>11244971</policyCode> <endorsementCode>000000000</endorsementCode> </v2:getAgreementDocument> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getAgreementDocumentResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <endorsementCode>000000000</endorsementCode> <htmlContent><![CDATA[<!DOCTYPE html><html><head><meta.... ></html>]]></htmlContent> <journalCode>00771651</journalCode> <pdfContent>JVBERi0xLj......HJlZg0KMTMzOTI0DQolJUVPRg0K</pdfContent> <policyCode>11244971</policyCode> <status>printed</status> </return> </ns2:getAgreementDocumentResponse> </S:Body> </S:Envelope> ``` ##getLatestAgreementDocument <a name="getLatestAgreementDocument"></a> This service is for downloading the policy document for the last endorsement. In order to download a policy it **must** be inside a Journal. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | Required | The code of the policy | 11244971 ###Output Type | Description | Example ---- | ----------- | ------- AgreementDocument | Report of policy download | *(see below)* ####AgreementDocument Field | Type | Value | Description | Example ----- | ---- | ----- | ----------- | ------- policyCode | String | String | The policy code| 11244971 endorsementCode | String | String | The endorsement code | 000000000 journalCode | String | Date | The journal code that policy belongs to | 00771651 htmlContent | String | String | The policy document in html format | *(see example)* pdfContent | byte[] | byte[] | The policy in byte[] format | *(see example)* status | String | String | The status indicating whether the document is printed | printed ###Example 1 *Input* ``` <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://v1.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v1:getLatestAgreementDocument> <policyCode>11244971</policyCode> </v1:getLatestAgreementDocument> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getLatestAgreementDocumentResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <endorsementCode>000000000</endorsementCode> <htmlContent><![CDATA[<!DOCTYPE html>....></div></body></html>]]></htmlContent> <journalCode>00771651</journalCode> <pdfContent>JVBERi0xLj......HJlZg0KMTMzOTI0DQolJUVPRg0K</pdfContent> <policyCode>11244971</policyCode> <status>printed</status> </return> </ns2:getLatestAgreementDocumentResponse> </S:Body> </S:Envelope> ``` ##getLatestAgreementDocumentByApplicationCode <a name="getLatestAgreementDocumentByApplicationCode"></a> This service is for downloading the policy document for the selected application code. In order to download a policy it **must** be inside a Journal. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- applicationCode | String | String | Required | The application code | 97031239 ###Output Type | Description | Example ---- | ----------- | ------- AgreementDocument | Report of policy download | *(see below)* ####AgreementDocument Field | Type | Value | Description | Example ----- | ---- | ----- | ----------- | ------- policyCode | String | String | The policy code| 11244971 endorsementCode | String | String |The endorsement code | 000000000 journalCode | String | Date | The journal code that policy belongs to | 00771651 htmlContent | String | String | The policy document in html format | *(see example)* pdfContent | byte[] | byte[] | The policy in byte[] format | *(see example)* status | String | String | The status indicating whether the document is printed | printed ###Example 1 *Input* ``` <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://v2.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v2:getLatestAgreementDocumentByApplicationCode> <applicationCode>97031239</applicationCode> </v2:getLatestAgreementDocumentByApplicationCode> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getLatestAgreementDocumentByApplicationCodeResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <endorsementCode>000000000</endorsementCode> <htmlContent><![CDATA[<!DOCTYPE html><html><head><meta.... ></html>]]></htmlContent> <journalCode>00771651</journalCode> <pdfContent>JVBERi0xLj......HJlZg0KMTMzOTI0DQolJUVPRg0K</pdfContent> <policyCode>11244971</policyCode> <status>printed</status> </return> </ns2:getLatestAgreementDocumentByApplicationCodeResponse> </S:Body> </S:Envelope> ``` ###Example 2 *Input* ``` <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://v2.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v2:getLatestAgreementDocumentByApplicationCode> <applicationCode>97031239</applicationCode> </v2:getLatestAgreementDocumentByApplicationCode> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:Fault xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope"> <faultcode>ns2:Server</faultcode> <faultstring>Error while downloading policy</faultstring> <detail> <ns2:ValidationException xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <report> <message> <severity>error</severity> <code>5</code> <target>/applicationCode</target> <body>Δεν έχει εκδωθεί ασφαλιστήριο για την αίτηση 97031239.</body> </message> <valid>false</valid> </report> </ns2:ValidationException> </detail> </ns2:Fault> </S:Body> </S:Envelope> ``` ##getLatestReceiptDocument <a name="getLatestReceiptDocument"></a> This service is for downloading the receipt document for the last policy's endorsement. In order to download a receipt it **must** policy be inside a Journal. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | Required | The code of the policy | 11244971 ###Output Type | Description | Example ---- | ----------- | ------- ReceiptDocument | Report of receipt download | *(see below)* ####ReceiptDocument Field | Type | Value | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | The policy code| 11244971 endorsementCode | String | String | The endorsement code | 000000000 journalCode | String | Date | The journal code that policy belongs to | 00771651 htmlContent | String | String | The policy receipt in html format | *(see example)* pdfContent | byte[] | byte[] | The receipt in byte[] format | *(see example)* status | String | String | The status indicating whether the document is printed | printed ###Example 1 *Input* ``` <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://v2.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v2:getLatestReceiptDocument> <policyCode>11244813</policyCode> </v2:getLatestReceiptDocument> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getLatestReceiptDocumentResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <endorsementCode>000000000</endorsementCode> <htmlContent><![CDATA[<!DOCTYPE .......body></html>]]></htmlContent> <journalCode>00771601</journalCode> <policyCode>11244813</policyCode> <status>TO_BE_PRINTED</status> </return> </ns2:getLatestReceiptDocumentResponse> </S:Body> </S:Envelope> ``` ##getReceiptDocument <a name="getReceiptDocument"></a> This service is for downloading the receipt document for the last policy's endorsement. In order to download a receipt it **must** policy be inside a Journal. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | Required | The code of the policy | 11244813 endorsementCode | String | String | Required | The code of the policy | 000000000 ###Output Type | Description | Example ---- | ----------- | ------- ReceiptDocument | Report of receipt download | *(see below)* ####ReceiptDocument Field | Type | Value | Description | Example ----- | ---- | ----- | ----------- | ------- policyCode | String | String | The policy code| 11244813 endorsementCode | String | String | The endorsement code | 000000000 journalCode | String | Date | The journal code that policy belongs to | 00771601 htmlContent | String | String | The policy receipt in html format | *(see example)* pdfContent | byte[] | byte[] | The receipt in byte[] format | *(see example)* status | String | String | The status indicating whether the document is printed | TO_BE_PRINTED ###Example 1 *Input* ``` <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://v2.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v2:getReceiptDocument> <policyCode>11244813</policyCode> <endorsementCode>000000000</endorsementCode> </v2:getReceiptDocument> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getReceiptDocumentResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <endorsementCode>000000000</endorsementCode> <htmlContent><![CDATA[<!DOCTYPE ....../html>]]></htmlContent> <journalCode>00771601</journalCode> <policyCode>11244813</policyCode> <status>TO_BE_PRINTED</status> </return> </ns2:getReceiptDocumentResponse> </S:Body> </S:Envelope> ``` ##issueAndPay <a name="issueAndPay"></a> This method issues a quotation and creates a policy,endorsement and journal the same time. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- quotation | Quotation | Quotation | Required | The quotation object | *(see example)* ####Quotation Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------------ | distChannelCode | String | Numerical code | Required | The 5 digit code representing the distribution channel | 08000 policyHolder | Person | Person | Required | The policy holder info |*(see example)* insuranceStartDate | Date | Date | Required | Insurance's start date |2015-10-05 duration | Integer | 1 if annual 2 if semiannual | Required | The quotation's duration | 1 coverageList | Pack | Pack | Required | The desirable product with coverages |*(see example)* endorsementCode | String | String | Required | The policy's endorsement policy | 000000000 oldPolicyCode | String | String | Required | The policy's code in case of reneal | empty insurable | Insurable | MotorInsurable for now | Required | The insurable object |*(see example)* ####MotorInsurable Field | Type | Value | Required/Optional | Description | Example --------------------| ---------- | -----------| ------------------- | ---------------------------- | ------- motorUseCode | String | listMotorUses(): code | Required | The motor use code | 000 for E.I.X motorMakeCode | String | listMotorMakes(): code | Required (Motor packages)| The motor make code | 00007 for CITROEN eurotaxCode | String | String | Required (Speed packages)| The eurotax code | 46932 plateNo | String | String | Required | The motor's plate no | IBY1234 manufacturerYear | Integer | String | Required | The motor's manufacturer year| 2010 marketValue | BigDecimal | BigDecimal | Required | Motor's market value | 15000 noOfClaims | Integer | Integer | Required (Speed packages)| No of claims | 0 protectionMeasures | Set[String]| listProtectionMeasures(): code | Optional | Protection measures of the vehicle | 001 purchasedDate | Date | Date | Optional | Motor's puschase date | 2010-01-01 licenseDate | Date | Date | Required(Speed packages or in case there is driver) | Driver's lisence date | 2005-01-01 taxHp | Integer | Integer | Required (Speed packages)| Motor's tax hp | 10 cc | Integer | Integer | Required (Motor packages) | Motor's cc | 650 bonusClassCode | String | String | Required (Motor packages) | Motor's bonus class code | 3 provinceCode | String | listProvinceCodes(): code | Required (Motor packages)| The province code | *(see example)* driver | Person | String | Optional if policy holder is different from main driver or in Motor packages| Driver info | *(see example)* ####Person Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- gender | int | listGenders():code | Required | The gender of the person | 1 surname | String | String | * **Required** *: If the gender is male or female * **Not allowed** *: If the gender is company | The surname of the person | *(see example)* firstname | String | String | * **Required** *: If the gender is male or female * **Not allowed** *: If the gender is company | The name of the person | *(see example)* fathername | String | String | Optional | Father's name | *(see example)* employmentType | String | listEmployments():code | Optional | 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** *: If the gender is male or female * **Optional** *: If the gender is company | The birthdate of the person | 01/01/1987 nationality | String | String | Optional | The nationality of the person | ΕΛΛΗΝΙΚΗ maritalStatus | int | listMaritalStatuses():code | * **Required** *: If the gender is male or female * **Not allowed** * | 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 | *(see example)* streetNo | String | String | Optional | The street number of the person's residence | *(see example)* postCode | String | Numerical | Required | The postal code of the person's residence | *(see example)* city | String | String | Required | The city of the person's residence | *(see example)* phoneNo | String | Numerical | Optional | The phone number (home or mobile) of the person | *(see example)* fax | String | Numerical | Optional | The fax number of the person | *(see example)* email | String | String | Optional | The email of the person | *(see example)* nameNo | String | Numerical | Optional | The nameNo of a person, if existing | 13734832 ####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 Type | Description | Example ---- | ----------- | ------- PolicyIssueReport | Report for issuing quation and creating journal operation | *(see below)* ####PolicyIssueReport Field | Type | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | The policy code| 11244813 journalReport | Journal | The report regarding creating the journal | *(see example)* quotationReport | QuotationIssueReport | The report regarding issuing the quotation | *(see example)* errorMessage | String | A general error message for the method | *(see example)* report | Report | The report for both methods notifying whether something went wrong | *(see example)* #### Journal report Field | Type | Description | Example ----- | ---- | ----------- | ------- code | String | The code of the Journal | 00232425 creationDate | Date | The date the Journal was created | 18/06/2014 premiumAmount | BigDecimal | The gross amount of the Journal | 237.5 netAmount | BigDecimal | The net amount of the Journ | 200.5 status | String *(possible values : OPEN, IN_PAYMENT)* | The status of the Journal | OPEN distChannel | String | The Dist Channel code in the journal belongs | 00510 notes | String | The notes of the Journal | "New Policies Journal" List[Endorsement] | Endorsement | A list with all the policies inside a journal | *(see above)* #### Quotation report Field | Type | Description | Example ----- | ---- | ----------- | ------- quotationCode | String | The quotation's code | 00232425 status | String | The quotation's status (e.g GREEN, YELLOW, RED)| GREEN Report | Report | The report notifying errors while issuing the quotation | *(see example)* pendencies | List<Pendency> | The list of pendencies (e.g Driver lisence doc) | *(see example)* #### Pendency Field | Type | Description | Example ----- | ---- | ----------- | ------- code | String | String | 100071626 type | String | String | 20000 description | String | String | Δεν έχει σταλεί η Αδεια Κυκλοφορίας του Οχήματος ###Example 1 *Input* ``` <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://v2.soap.ws.api.gbox.generali.gr/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header/> <soapenv:Body> <v2:issueAndPay> <quotation xsi:type="v2:MotorQuotation"> <pack code="802"> <cover code="280000000"> <sumInsured> <codeValue>953</codeValue> </sumInsured> </cover> <cover code="281000000"> <sumInsured> <codeValue>950</codeValue> </sumInsured> </cover> <cover code="753450171"> </cover> </pack> <distChannelCode>08000</distChannelCode> <insuranceStartDate>2015-10-05</insuranceStartDate> <duration>1</duration> <motorInsurable> <bonusClassCode></bonusClassCode> <driverBirthdate>1965-02-07</driverBirthdate> <driverMaritalStatusCode>2</driverMaritalStatusCode> <driverPostalCode>166 75</driverPostalCode> <eurotaxCode>46932</eurotaxCode> <licenseDate>2001-12-21</licenseDate> <manufacturerYear>2010</manufacturerYear> <marketValue>7570</marketValue> <motorMakeCode>056</motorMakeCode> <motorUseCode>000</motorUseCode> <noOfClaims>0</noOfClaims> <ownerAfm>045319514</ownerAfm> <ownerGenderCode>2</ownerGenderCode> <plateNo>IKMXXX</plateNo> <protectionMeasures>0</protectionMeasures> <purchasedDate>2010-01-01</purchasedDate> <taxHp>10</taxHp> </motorInsurable> <policyHolder> <afm>563256325</afm> <birthDate>1985-01-01</birthDate> <city>ΑΘΗΝΑ</city> <companyName></companyName> <email>XXXXXXXX@gmail.com</email> <employmentTypeCode>220</employmentTypeCode> <fax></fax> <genderCode>2</genderCode> <licenseDate>2006-05-06</licenseDate> <maritalStatusCode>1</maritalStatusCode> <firstname>XXXXXXX</firstname> <lastname>XXXXXXXXX</lastname> <nameNo></nameNo> <nationality>ΕΛΛΗΝΙΚΗ</nationality> <personId></personId> <phoneNo>2108096152</phoneNo> <postalCode>104 45</postalCode> <streetName>ΠΥΘΕΟΥ</streetName> <streetNo>2</streetNo> <surname>GARCIA</surname> </policyHolder> </quotation> </v2:issueAndPay> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:issueAndPayResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <errorMessage>Προέκυψε σφάλμα κατά την έκδοση προσφοράς. Πρέπει να είναι πράσινη η προσφορά για να μπορέσετε να δημιουργήσετε συναλλάγη.</errorMessage> <quotationReport> <quotationCode>00915181</quotationCode> <status>YELLOW</status> <pendency> <code>100071608</code> <type>20000</type> <description>Δεν έχει σταλεί η Αδεια Οδήγησης</description> </pendency> <pendency> <code>100071610</code> <type>20010</type> <description>Δεν έχει σταλεί η Αδεια Κυκλοφορίας του Οχήματος</description> </pendency> <report> <message> <severity>WARNING</severity> <code>0</code> <target>/quotation</target> <body>Ο αριθμός κυκλοφορίας υπάρχει ήδη σε άλλο ενεργό Ασφ/ριο</body> </message> <valid>false</valid> </report> </quotationReport> <report> <message> <severity>WARNING</severity> <code>0</code> <target>/quotation</target> <body>Ο αριθμός κυκλοφορίας υπάρχει ήδη σε άλλο ενεργό Ασφ/ριο</body> </message> <valid>false</valid> </report> </return> </ns2:issueAndPayResponse> </S:Body> </S:Envelope> ``` ###Example 2 *Input* ``` <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://v2.soap.ws.api.gbox.generali.gr/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header/> <soapenv:Body> <v2:issueAndPay> <quotation xsi:type="v2:MotorQuotation"> <pack code="802"> <cover code="280000000"> <sumInsured> <codeValue>953</codeValue> </sumInsured> </cover> <cover code="281000000"> <sumInsured> <codeValue>950</codeValue> </sumInsured> </cover> <cover code="753450171"> </cover> </pack> <distChannelCode>08000</distChannelCode> <insuranceStartDate>2015-10-05</insuranceStartDate> <duration>1</duration> <motorInsurable> <bonusClassCode></bonusClassCode> <driverBirthdate>1965-02-07</driverBirthdate> <driverMaritalStatusCode>2</driverMaritalStatusCode> <driverPostalCode>166 75</driverPostalCode> <eurotaxCode>46932</eurotaxCode> <licenseDate>2001-12-21</licenseDate> <manufacturerYear>2010</manufacturerYear> <marketValue>7570</marketValue> <motorMakeCode>056</motorMakeCode> <motorUseCode>000</motorUseCode> <noOfClaims>0</noOfClaims> <ownerAfm>045319514</ownerAfm> <ownerGenderCode>2</ownerGenderCode> <plateNo>IKMXXX</plateNo> <protectionMeasures>0</protectionMeasures> <purchasedDate>2010-01-01</purchasedDate> <taxHp>10</taxHp> </motorInsurable> <policyHolder> <afm>563256325</afm> <birthDate>1985-01-01</birthDate> <city>ΑΘΗΝΑ</city> <companyName></companyName> <email>XXXXXXXX@gmail.com</email> <employmentTypeCode>220</employmentTypeCode> <fax></fax> <genderCode>2</genderCode> <licenseDate>2006-05-06</licenseDate> <maritalStatusCode>1</maritalStatusCode> <firstname>XXXXXXX</firstname> <lastname>XXXXXXXXX</lastname> <nameNo></nameNo> <nationality>ΕΛΛΗΝΙΚΗ</nationality> <personId></personId> <phoneNo>2108096152</phoneNo> <postalCode>104 45</postalCode> <streetName>ΠΥΘΕΟΥ</streetName> <streetNo>2</streetNo> <surname>XXXXXX</surname> </policyHolder> </quotation> </v2:issueAndPay> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:issueAndPayResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <journalReport> <code>00771659</code> <creationDate>2015-10-05T00:00:00+03:00</creationDate> <distChannelCode>08000</distChannelCode> <endorsementsId> <code>000000000</code> <policyCode>11245000</policyCode> <quotationCode>00915186</quotationCode> </endorsementsId> <netAmount>361.91</netAmount> <notes>XXXXXXXX</notes> <premiumAmount>361.91</premiumAmount> <status>OPEN</status> </journalReport> <policyCode>11245000</policyCode> <quotationReport> <quotationCode>00915186</quotationCode> <status>GREEN</status> <pendency> <code>100071626</code> <type>20000</type> <description>Δεν έχει σταλεί η Αδεια Οδήγησης</description> </pendency> <pendency> <code>100071628</code> <type>20010</type> <description>Δεν έχει σταλεί η Αδεια Κυκλοφορίας του Οχήματος</description> </pendency> <report> <valid>true</valid> </report> </quotationReport> <report> <valid>true</valid> </report> </return> </ns2:issueAndPayResponse> </S:Body> </S:Envelope> ``` ##payQuotation <a name="payQuotation"></a> This service is responsible for paying a single quotation(creates a policy,endorsement and journal object the same time) by providing only the quotation code. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- quotationCode | String | String | Required | The code of the quotation | 00915101 endorsementCode | String | String | Required | The endorsement code of quotation (in case of new quotation is 000000000) | 000000000 ###Output Type | Description | Example ---- | ----------- | ------- Journal | Report of paying quotation | *(see below)* #### Journal report Field | Type | Description | Example ----- | ---- | ----------- | ------- code | String | The code of the Journal | 00232425 creationDate | Date | The date the Journal was created | 18/06/2014 premiumAmount | BigDecimal | The gross amount of the Journal | 237.5 netAmount | BigDecimal | The net amount of the Journ | 200.5 status | String *(possible values : OPEN, IN_PAYMENT)* | The status of the Journal | OPEN distChannel | String | The Dist Channel code in the journal belongs | 00510 notes | String | The notes of the Journal | "New Policies Journal" List[Endorsement] | Endorsement | A list with all the policies inside a journal | *(see above)* ###Example 1 *Input* ``` <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://v2.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v2:payQuotation> <quotationCode>00915187</quotationCode> <endorsementCode>000000000</endorsementCode> </v2:payQuotation> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:payQuotationResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <code>00771660</code> <creationDate>2015-10-05T00:00:00+03:00</creationDate> <distChannelCode>08000</distChannelCode> <endorsementsId> <code>000000000</code> <policyCode>11245004</policyCode> <quotationCode>00915187</quotationCode> </endorsementsId> <netAmount>246.08</netAmount> <notes>XXXXXXXXX</notes> <premiumAmount>246.08</premiumAmount> <status>OPEN</status> </return> </ns2:payQuotationResponse> </S:Body> </S:Envelope>` ``` ###Example 2 *Input* ``` <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://v2.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v2:payQuotation> <quotationCode>00915187</quotationCode> <endorsementCode>000000000</endorsementCode> </v2:payQuotation> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:payQuotationResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <report> <message> <severity>error</severity> <code>5</code> <target>/endorsementReceipts</target> <body>Ο αριθμός προσφοράς 00915187 δεν βρίσκεται στην λίστα των απλήρωτων Print&amp;Pay προσφορών.</body> </message> <valid>false</valid> </report> </return> </ns2:payQuotationResponse> </S:Body> </S:Envelope> ``` ##isPaidOut <a name="isPaidOut"></a> Returns the payment status of an endorsement, meaning if it is paid out or not ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | Required | The code of the quotation | 50915101 endorsementCode | String | String | Required | The endorsement code of policy (in case of new policy is 000000000) | 000000000 ###Output Type | Description | Example ---- | ----------- | ------- boolean | True in case it is paid out, meaning 0 € as outstanding | ##isPaidOutByPaymentCode <a name="isPaidOutByPaymentCode"></a> Returns the payment status of an endorsement by DIAS payment code, meaning if it is paid out or not ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- paymentCode | String | String | Required | The payment code of policy / quote | 01000009166391275101 ###Output Type | Description | Example ---- | ----------- | ------- Boolean | True in case it is paid out, meaning 0 € as outstanding | ##getPolicyByPaymentCode <a name="getPolicyByPaymentCode"></a> Returns the policy code, endorsement code, application code and the quotation code that correspond to the given payment code. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- paymentCode | String | String | Required | The payment code of policy / quote | 01000009166391275101 ###Output Field | Type | Value | Description | Example ----- | ---- | ----- | ----------- | ------- policyCode | String | String | The policy code corresponding to the given payment code / quote | 01000009166391275101 endorsmentCode | String | String | The endorsement code corresponding to the given payment code / quote | 50119996 applicationCode | String | String | The application code corresponding to the given payment code / quote | quotationCode | String | String | The quotation code corresponding to the given payment code / quote |