#Motor web services Provides service methods to handle the motor operations. * **Type**: SOAP * **Production WSDL**: https://services.generali.gr/soap/v2/motor?wsdl * **Test WSDL**: https://services-test.generali.gr/soap/v2/motor?wsdl Methods * [getNoOfClaims](#getNoOfClaims) * [getNoOfClaimsByDate](#getNoOfClaimsByDate) * [issueGreenCard](#issueGreenCard) ##getNoOfClaims <a name="getNoOfClaims"></a> 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* ``` <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:getNoOfClaims> <!--Optional:--> <plateNo>IBZ8972</plateNo> </v2:getNoOfClaims> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getNoOfClaimsResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return>2</return> </ns2:getNoOfClaimsResponse> </S:Body> </S:Envelope> ``` ###Example 2 **Example with errors** *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:getNoOfClaims> </v2:getNoOfClaims> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"> <faultcode>S:Server</faultcode> <faultstring>Error while getting number of claims</faultstring> <detail> <ns2:WsException xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <report> <message> <severity>error</severity> <code>5</code> <target>/plateNo</target> <body>The value should not be empty.</body> </message> <valid>false</valid> </report> </ns2:WsException> </detail> </S:Fault> </S:Body> </S:Envelope> ``` ##getNoOfClaimsByDate <a name="getNoOfClaimsByDate"></a> 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* ``` <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://v2.soap.ws.api.gbox.generali.gr/" xmlns:v1="http://v1.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v2:getNoOfClaimsByDate> <plateNo>YZT1252</plateNo> <startDate>2013-04-01</startDate> </v2:getNoOfClaimsByDate> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getNoOfClaimsByDateResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return>0</return> </ns2:getNoOfClaimsByDateResponse> </S:Body> </S:Envelope> ``` ###Example 2 *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:getNoOfClaimsByDate> <plateNo>YZT1252</plateNo> <startDate>2011-04-01</startDate> </v1:getNoOfClaimsByDate> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getNoOfClaimsByDateResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return>1</return> </ns2:getNoOfClaimsByDateResponse> </S:Body> </S:Envelope> ``` ##issueGreenCard <a name="issueGreenCard"></a> 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 policyCode | String | String | required | The relevant policy code | 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* ``` <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:issueGreenCard> <!--Optional:--> <greenCard> <!--Optional:--> <policyCode>11230965</policyCode> <!--Optional:--> <fullName>TSIRIGOTAKI AIKATERINI</fullName> <!--Optional:--> <address>PATISION 15 ATHINA</address> <!--Optional:--> <countries> <!--Zero or more repetitions:--> <country> <!--Optional:--> <code>RUS</code> </country> </countries> <!--Optional:--> <startDate>2015-07-22T04:02:49+03:00</startDate> <!--Optional:--> <endDate>2015-07-30T10:01:03+02:00</endDate> </greenCard> </v1:issueGreenCard> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:issueGreenCardResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <document>JVBERi0xLjIgCiXi48/TIAoxIDAgb2JqIAo8PCAKL1R5cGUgL0NhdG[...]0IDEgMCBSIAovSW5mbyAxMTkgMCBSIAo+PiAKc3RhcnR4cmVmIAoyMTE4MDkgCiUlRU9GIAo=</document> <greenCardCode>10003533</greenCardCode> </return> </ns2:issueGreenCardResponse> </S:Body> </S:Envelope> ``` ###Example 2 *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:issueGreenCard> <!--Optional:--> <greenCard> <!--Optional:--> <address>TEST</address> <!--Zero or more repetitions:--> <countries/> <!--Optional:--> <endDate>2015-12-20T15:42:28</endDate> <!--Optional:--> <fullName>TEST</fullName> <!--Optional:--> <policyNo>11219952</policyNo> <!--Optional:--> <startDate>2015-12-16T15:42:28</startDate> </greenCard> </v1:issueGreenCard> </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 issuing green card!</faultstring> <detail> <ns2:ValidationException xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <report> <message> <severity>error</severity> <code>11250</code> <target>/as400Validation</target> <body>Η πράσινη κάρτα προϋπάρχει στο ασφαλιστήριο.<script type="text/javascript" src="/_Incapsula_Resource?SWJIYLWA=719d34d31c8e3a6e6fffd425f7e032f3&ns=2&cb=1143327025" async></script></body> </message> <valid>true</valid> </report> </ns2:ValidationException> </detail> </ns2:Fault> </S:Body> </S:Envelope> ```