#Print&Pay web services Provides service methods to handle Print&Pay. * **Type**: SOAP * **Production WSDL**: https://services.generali.gr/gbox-ws/soap/v1/journal?wsdl * **Test WSDL**: http://www.generali.gr/gbox-ws/soap/v1/journal?wsdl The following picture illustrates the workflow for motor policies: ![Motor](images/motorPolicyIssueWorkflow.png) Methods * [listDistChannelLimits](#listDistChannelLimits) * [getDistChannelLimit](#getDistChannelLimit) * [listJournalsByDistChannel](#listJournalsByDistChannel) * [getJournal](#getJournal) * [getUnpaidEndorsement](#getUnpaidEndorsement) * [getEndorsementByApplicationCode](#getEndorsementByApplicationCode) * [listUnpaidEndorsementsByDistChannel](#listUnpaidEndorsementsByDistChannel) * [listEndorsementsByJournal](#listEndorsementsByJournal) * [createJournal](#createJournal) * [getPolicyCodeByApplicationCode](#getPolicyCodeByApplicationCode) * [getPolicyDocument](#getPolicyDocument) * [getPolicyDocumentByApplicationCode](#getPolicyDocumentByApplicationCode) * [getPolicyDocumentByEndorsementCode](#getPolicyDocumentByEndorsementCode) * [getReceiptDocument](#getReceiptDocument) * [getReceiptDocumentByEndorsementCode](#getReceiptDocumentByEndorsementCode) * [getBillDocument](#getBillDocument) * [getBillDocumentByEndorsementCode](#getBillDocumentByEndorsementCode) * [Error Codes](#errorCodes) ##listDistChannelLimits <a name="listDistChannelLimits"></a> Returns the money and day limits of all Distribution Channels of the user. ###Output Type | Description | Example ---- | ----------- | ------- List[DistChannelLimit] | A list with all the limits of all Dist Channels | *(see below)* #### DistChannelLimit Field | Type | Description | Example ----- | ---- | ----------- | ------- distChannelCode | String | The code of the Dist Channel | 00510 totalAmount | BigDecimal | The allowed total amount of the Dist Channel | 5000 outstandingAmount | BigDecimal | The remaining amount | 1000 totalDays | Integer | The allowed total days | 5 outstandingDays | Integer | The remaining days | 2 *(if days are <-2 the Dist Channel is locked, which means that the client is not able to create new Journal)* ###Example *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:listDistChannelLimits/> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:listDistChannelLimitsResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <distChannelCode>00510</distChannelCode> <outstandingAmount>200.00</outstandingAmount> <outstandingDays>5</outstandingDays> <totalAmount>200.00</totalAmount> <totalDays>5</totalDays> </return> </ns2:listDistChannelLimitsResponse> </S:Body> </S:Envelope> ``` ##getDistChannelLimit <a name="getDistChannelLimit"></a> Returns the money and day limits of a specific Dist Channel. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- distChannelCode | String | String | Required | The Dist Channel code from which we want to retrieve the limits | 00510 ###Output Type | Description | Example ---- | ----------- | ------- DistChannelLimit | The limit data of the DistChannel | *(see above)* ###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:findDistChannelLimit> <distChannel>00510</distChannel> </v1:findDistChannelLimit> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:findDistChannelLimitResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <distChannelCode>00510</distChannelCode> <outstandingAmount>200.00</outstandingAmount> <outstandingDays>5</outstandingDays> <totalAmount>200.00</totalAmount> <totalDays>5</totalDays> </return> </ns2:findDistChannelLimitResponse> </S:Body> </S:Envelope> ``` ###Example 2 Example with exception *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:findDistChannelLimit> <distChannel>12345</distChannel> </v1:findDistChannelLimit> </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 the Dist Channel Limit</faultstring> <detail> <ns2:AuthorizationException xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <message>You are not authorized for this action</message> </ns2:AuthorizationException> </detail> </S:Fault> </S:Body> </S:Envelope> ``` ##listJournalsByDistChannel <a name="listJournalsByDistChannel"></a> Lists all the Journals of a Dist Channel. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- distChannelCode | String | String | Required | The Dist Channel code from which we want to retrieve the Journals | 00510 first | Integer | Integer | Optional | The first row. *Default value : 0* | 10 max | Integer | Integer | Optional | The number of max rows *Default value : 50* | 20 ###Output Type | Description | Example ---- | ----------- | ------- List[Journal] | A list of all the Journals | *(see below)* #### Journal 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 below))* #### Endorsement Field | Type | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- endorsementCode | String | The code of the endorsement | 0438572362 policyCode | String | The code of the policy | 123456789 quotationCode | String | The code of the quotation | 00194822 quotationPreviousPolicyCode | String | The old policy code of a renewal quotation | 11143542 ###Example 1 This examples shows the output if there are existing Journals *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:listJournalsByDistChannel> <distChannel>00510</distChannel> </v1:listJournalsByDistChannel> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:listJournalsByDistChannelResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <code>00219359</code> <creationDate>2014-05-30T00:00:00+03:00</creationDate> <distChannel>01781</distChannel> <netAmount>571.96</netAmount> <notes/> <premiumAmount>593.25</premiumAmount> <status>OPEN</status> </return> <return> <code>00219360</code> <creationDate>2014-05-30T00:00:00+03:00</creationDate> <distChannel>01781</distChannel> <netAmount>506.65</netAmount> <notes/> <premiumAmount>525.50</premiumAmount> <status>OPEN</status> </return> <return> <code>00219361</code> <creationDate>2014-05-30T00:00:00+03:00</creationDate> <distChannel>01781</distChannel> <netAmount>938.51</netAmount> <notes/> <premiumAmount>973.43</premiumAmount> <status>OPEN</status> </return> <return> <code>00219362</code> <creationDate>2014-05-30T00:00:00+03:00</creationDate> <distChannel>01781</distChannel> <netAmount>1057.50</netAmount> <notes/> <premiumAmount>1096.87</premiumAmount> <status>OPEN</status> </return> </ns2:listJournalsByDistChannelResponse> </S:Body> </S:Envelope> ``` ###Example 2 This examples shows the output if there are not existing Journals *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:listJournalsByDistChannel> <distChannel>00510</distChannel> </v1:listJournalsByDistChannel> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:listJournalsByDistChannelResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"/> </S:Body> </S:Envelope> ``` ##getJournal <a name="getJournal"></a> Finding the data of a specific Journal. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- journalCode | String | String | Required | The code of the journal | 00219360 ###Output Type | Description | Example ---- | ----------- | ------- Journal | The Journal data | *(see [listJournalsByDistChannel](#listJournalsByDistChannel))* ###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:findJournal> <journalCode>00219360</journalCode> </v1:findJournal> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:findJournalResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <code>00219360</code> <creationDate>2014-05-30T00:00:00+03:00</creationDate> <distChannel>01781</distChannel> <netAmount>506.65</netAmount> <notes/> <premiumAmount>525.50</premiumAmount> <status>OPEN</status> </return> </ns2:findJournalResponse> </S:Body> </S:Envelope> ``` ###Example 2 Example with exception *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:findJournal> <journalCode>002193845</journalCode> </v1:findJournal> </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 finding Journal</faultstring> <detail> <ns2:ValidationException xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <report> <message> <severity>error</severity> <code>5</code> <target>/journalCode</target> <body>Η συναλλαγή δεν υπάρχει.</body> </message> <valid>false</valid> </report> </ns2:ValidationException> </detail> </S:Fault> </S:Body> </S:Envelope> ``` ##getUnpaidEndorsement <a name="getUnpaidEndorsement"></a> Retrieve a specific unpaid and not in Journal endorsement. If you want to retrieve a policy then in the input you have to fill **both** the policycode and the endorsementCode. If you want to retrieve a quotation you have to fill **only** the quotationCode. ###Input Type | Description | Example ---- | ----------- | ------- Endorsement | The data of the endorsement | *(see below)* #### Endorsement Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | Optional | The policy code | 97845367 endorsementCode | String | String | Optional | The endorsement code of the policy | 000000000 quotationCode | String | String | Optional | The quotation code | 00556374 quotationPreviousPolicyCode | String | String | Optional | The old policy code of a renewal quotation | 11143542 ###Output Type | Description | Example ---- | ----------- | ------- EndorsementReceipt | The data of the specific policy | *(see below)* #### EndorsementReceipt Field | Type | Description | Example ----- | ---- | ----------- | ------- code | String | Endorsement Receipt code | 003453626 policyCode | String | The code of the policy | 110394785 quotationCode | String | The code of the quotation | 00558754 quotationPreviousPolicyCode | String | The old policy code of a renewal quotation | 11143542 startDate | Date | The start date of the policy | 18/06/2014 endDate | Date | The end date of the policy | 18/06/2015 expireDate | Date | The expiration date of the policy | 23/07/2014 premiumAmount | BigDecimal | The gross amount of the Endorsement | 300.0 netAmount | BigDecimal | The net amount of the Endorsement | 260.70 customerName | String | The name of the customer | Eleftheria customerSurname | String | The surname of the customer | Stefanou extraDetails | String | Some extra details. To date we show the license number if exists | IZX1234 paymentCode | String | The payment code of the endorsement | 103984746273 ###Example1 Searching for a policy *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:getUnpaidEndorsement> <endorsement> <endorsementCode>000000000</endorsementCode> <policyCode>11157022</policyCode> </endorsement> </v1:getUnpaidEndorsement> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getUnpaidEndorsementResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <code>000000000</code> <customerName/> <customerSurname>ΚΑΡΑΚΙΚΕΣ Σ. &amp; ΣΙΑ Ο.Ε.</customerSurname> <endDate>2015-05-13T00:00:00+03:00</endDate> <expireDate>2015-01-12T00:00:00+02:00</expireDate> <extraDetails/> <netAmount>138.83</netAmount> <paymentCode>01000007560491675106</paymentCode> <policyCode>11157022</policyCode> <premiumAmount>138.83</premiumAmount> <startDate>2014-11-13T00:00:00+02:00</startDate> </return> </ns2:getUnpaidEndorsementResponse> </S:Body> </S:Envelope> ``` ###Example2 Searching for a quotation *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:getUnpaidEndorsement> <endorsement> <quotationCode>00529908</quotationCode> </endorsement> </v1:getUnpaidEndorsement> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getUnpaidEndorsementResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <customerName>ΑΘΑΝΑΣΙΟΣ</customerName> <customerSurname>ΠΛΑΤΑΝΙΩΤΗΣ</customerSurname> <endDate>2016-01-31T00:00:00+02:00</endDate> <expireDate>2015-03-02T00:00:00+02:00</expireDate> <extraDetails>IMT4145</extraDetails> <netAmount>310.78</netAmount> <paymentCode>14000007538313475108</paymentCode> <premiumAmount>310.78</premiumAmount> <quotationCode>00529908</quotationCode> <startDate>2015-01-31T00:00:00+02:00</startDate> </return> </ns2:getUnpaidEndorsementResponse> </S:Body> </S:Envelope> ``` ##getEndorsementByApplicationCode <a name="getEndorsementByApplicationCode"></a> Retrieve the endorsement by the application code. The endorsement might be a policy if the policyCode is filled or a quotation, if the quotationCode is filled. ###Input Type | Description | Example ---- | ----------- | ------- String | The application code | 00803432 ###Output Type | Description | Example ---- | ----------- | ------- Endorsement | The data of the endorsement | *(see below)* #### Endorsement Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | Optional | The policy code | 97845367 endorsementCode | String | String | Optional | The endorsement code of the policy | 000000000 quotationCode | String | String | Optional | The quotation code | 00556374 quotationPreviousPolicyCode | String | String | Optional | The old policy code of a renewal quotation | 11143542 ### Example1 There is no policy or quotation for the specified application code *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:getEndorsementByApplicationCode> <applicationCode>97030805</applicationCode> </v1:getEndorsementByApplicationCode> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getEndorsementByApplicationCodeResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return/> </ns2:getEndorsementByApplicationCodeResponse> </S:Body> </S:Envelope> ``` ### Example2 There is a quotation for the specified application code *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:getEndorsementByApplicationCode> <applicationCode>97030771</applicationCode> </v1:getEndorsementByApplicationCode> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getEndorsementByApplicationCodeResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <quotationCode>00551055</quotationCode> </return> </ns2:getEndorsementByApplicationCodeResponse> </S:Body> </S:Envelope> ``` ### Example3 There is a quotation for the specified application code *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:getEndorsementByApplicationCode> <applicationCode>00687534</applicationCode> </v1:getEndorsementByApplicationCode> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getEndorsementByApplicationCodeResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <endorsementCode>004100612</endorsementCode> <policyCode>11000338</policyCode> </return> </ns2:getEndorsementByApplicationCodeResponse> </S:Body> </S:Envelope> ``` ##listUnpaidEndorsementsByDistChannel <a name="listUnpaidEndorsementsByDistChannel"></a> Lists all the Endorsements (Policies and Quotations) of a Dist Channel that are not paid and there are not inside a Journal. If the output (EndorsementReceipt) has filled the field policyCode then it's a policy, else if the field quotationCode is filled, then is a Quotation. In case of a Quotation, if it comes from a renewal then the field quotationPreviousPolicyCode will be filled. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- distChannelCode | String | String | Required | The Dist. Channel code | 00510 first | Integer | Integer | Optional | The first row. *Default value : 0* | 10 max | Integer | Integer | Optional | The number of max rows *Default value : 50* | 20 ###Output Type | Description | Example ---- | ----------- | ------- List[EndorsementReceipt] | A list with endorsements data | *(see below)* #### EndorsementReceipt Field | Type | Description | Example ----- | ---- | ----------- | ------- code | String | Endorsement Receipt code | 003453626 policyCode | String | The code of the policy | 110394785 quotationCode | String | The code of the quotation | 00558754 quotationPreviousPolicyCode | String | The old policy code of a renewal quotation | 11143542 startDate | Date | The start date of the policy | 18/06/2014 endDate | Date | The end date of the policy | 18/06/2015 expireDate | Date | The expiration date of the policy | 23/07/2014 premiumAmount | BigDecimal | The gross amount of the Endorsement | 300.0 netAmount | BigDecimal | The net amount of the Endorsement | 260.70 customerName | String | The name of the customer | Eleftheria customerSurname | String | The surname of the customer | Stefanou extraDetails | String | Some extra details. To date we show the license number if exists | IZX1234 paymentCode | String | The payment code of the endorsement | 103984746273 ###Example *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:listUnpaidEndorsements> <distChannel>00510</distChannel> </v1:listUnpaidEndorsements> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:listUnpaidEndorsementsByDistChannelResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <code>000000000</code> <customerName/> <customerSurname>ΚΑΡΑΚΙΚΕΣ Σ. &amp; ΣΙΑ Ο.Ε.</customerSurname> <endDate>2015-05-13T00:00:00+03:00</endDate> <expireDate>2015-01-12T00:00:00+02:00</expireDate> <extraDetails/> <netAmount>138.83</netAmount> <paymentCode>01000007560491675106</paymentCode> <policyCode>11157022</policyCode> <premiumAmount>138.83</premiumAmount> <startDate>2014-11-13T00:00:00+02:00</startDate> </return> <return> <code>000000000</code> <customerName/> <customerSurname>ΚΑΡΑΚΙΚΕΣ Σ. &amp; ΣΙΑ Ο.Ε.</customerSurname> <endDate>2015-05-13T00:00:00+03:00</endDate> <expireDate>2014-12-13T00:00:00+02:00</expireDate> <extraDetails>ZMI2030</extraDetails> <netAmount>195.45</netAmount> <paymentCode>01000007560492475101</paymentCode> <policyCode>11157023</policyCode> <premiumAmount>195.45</premiumAmount> <startDate>2014-11-13T00:00:00+02:00</startDate> </return> <return> <customerName>ΑΘΑΝΑΣΙΟΣ</customerName> <customerSurname>ΠΛΑΤΑΝΙΩΤΗΣ</customerSurname> <endDate>2016-01-31T00:00:00+02:00</endDate> <expireDate>2015-03-02T00:00:00+02:00</expireDate> <extraDetails>IMT4145</extraDetails> <netAmount>310.78</netAmount> <paymentCode>14000007538313475108</paymentCode> <premiumAmount>310.78</premiumAmount> <quotationCode>00529908</quotationCode> <startDate>2015-01-31T00:00:00+02:00</startDate> </return> <return> <customerName>ΑΡΙΣΤΕΙΔΗΣ</customerName> <customerSurname>ΤΡΙΑΝΤΑΦΥΛΛΟΥ</customerSurname> <endDate>2016-01-31T00:00:00+02:00</endDate> <expireDate>2015-03-02T00:00:00+02:00</expireDate> <extraDetails>IKX2059</extraDetails> <netAmount>317.64</netAmount> <paymentCode>14000007549018675101</paymentCode> <premiumAmount>317.64</premiumAmount> <quotationCode>00540613</quotationCode> <startDate>2015-01-31T00:00:00+02:00</startDate> </return> </ns2:listUnpaidEndorsementsByDistChannelResponse> </S:Body> </S:Envelope> ``` ##listEndorsementsByJournal <a name="listEndorsementsByJournal"></a> Lists the endorsement of a specific Journal ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- journalCode | String | String | Required | The journal from which you want to retrieve the endorsements | 00219360 first | Integer | Integer | Optional | The first row. *Default value : 0* | 0 max | Integer | Integer | Optional | The number of max rows *Default value : 50* | 2 ###Output Type | Description | Example ---- | ----------- | ------- List[EndorsementReceipt] | A list with endorsements data | *(see [listUnpaidEndorsements](#listUnpaidEndorsements))* ###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:listEndorsementsByJournal> <journalCode>00219360</journalCode> </v1:listEndorsementsByJournal> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:listEndorsementsByJournalResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <code>003834654</code> <customerName/> <customerSurname>E-VALUE AE Δ/Λ OLYMPIC ΕΜΠΟΡΙΚ</customerSurname> <endDate>2015-06-24T00:00:00+03:00</endDate> <netAmount>506.65</netAmount> <policyCode>10958293</policyCode> <premiumAmount>525.50</premiumAmount> <startDate>2014-06-24T00:00:00+03:00</startDate> </return> </ns2:listEndorsementsByJournalResponse> </S:Body> </S:Envelope> ``` ###Example 2 Example throwing ValidationException *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:listEndorsementsByJournal> <journalCode>00216578</journalCode> </v1:listEndorsementsByJournal> </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 finding Journal</faultstring> <detail> <ns2:ValidationException xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <report> <message> <severity>error</severity> <code>5</code> <target>/journalCode</target> <body>Η συναλλαγή δεν υπάρχει.</body> </message> <valid>false</valid> </report> </ns2:ValidationException> </detail> </S:Fault> </S:Body> </S:Envelope> ``` ##createJournal <a name="createJournal"></a> Creates a new Journal. At the end of the section you can find a list with extra error codes besides the ones in *General Considerations* for not being able to create a new Journal. For unpaid Motor policies is mandatory to create a Journal before trying to retrieve them, otherwise the operation will result in an exception. If you want to add to the journal a policy you have to fill in the Endorsement object **both** the policyCode and the quotationCode. In case of quotation you have to add **only** the quotationCode. When you create a Journal with quotations, those quotations becomes automatically policies which can be retrieved from the output. The most common errors while creating a Journal is the followings: * Outreached the money or the day limits. * The policy or the quotation is not in the list of the unpaid endorsements * It appears the message "Υπάρχει παλαιότερη Απόδειξη πληρωμών για το επιλεγμένο Ασφαλιστήριο". This message means that there is a previous renewal of this policy that is unpaid. So You have to put this first in a Journal, or put both policies in the same Journal. * You are not allowed to add in a Journal a policy with negative amount. In case of such policy, you have to add it to a Journal with another policy, so the total amount will be greater than 0€. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- distChannelCode | String | String | Required | Under which Dist Channel the journal will be created | 00510 notes | String | String | Optional | The notes that will be added to the Journal | "My test Journal" endorsementCodes | List[Endorsement] | Endorsement | The list of endorsements which will added to Journal | *(see below)* ####Endorsement Notice that from version **1.0-beta-18** the Endorsement object can represent both endorsements or quotations (in case of Motor policies). When using the Endorsement in input methods and as real policy endorsement we will have to specify both *endorsementCode* and *policyCode*, whereas when using it as a Quotation we will only have to specify the "quotationCode". Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- endorsementCode | String | String | Required (for non Motor policies) | The code of the endorsement | 0438572362 policyCode | String | String | Required (for non Motor policies) | The code of the policy | 123456789 quotationCode | String | String | Required (for Motor policies) | The code of the quotation | 00194822 quotationPreviousPolicyCode | String | String | Optional | The old policy code of a renewal quotation | 11143542 ###Output Type | Description | Example ---- | ----------- | ------- Journal | The Journal data | *(see below)* #### Journal 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 Example for providing an empty Endorsement list *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:createJournal> <distChannel>00510</distChannel> <notes>Web Service Test</notes> </v1:createJournal> </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 creating Journal</faultstring> <detail> <ns2:ValidationException xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <report> <message> <severity>error</severity> <code>18</code> <target/> <body>Η λίστα των Συναλλαγών πρέπει να κυμαίνεται μεταξύ 1-50.</body> </message> <valid>true</valid> </report> </ns2:ValidationException> </detail> </S:Fault> </S:Body> </S:Envelope> ``` ###Example 2 Example for trying to persist an non unpaid endorsement *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:createJournal> <distChannel>00510</distChannel> <notes>Web Service Test</notes> <endorsements> <endorsementCode>003900337</endorsementCode> <policyCode>11038919</policyCode> </endorsements> </v1:createJournal> </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 finding Journal</faultstring> <detail> <ns2:ValidationException xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <report> <message> <severity>error</severity> <code>5</code> <target>/endorsementReceipts</target> <body>Η Απόδειξη Συναλλαγών 003900337 του Συμβολαίου 11038919 δεν βρίσκεται στην λίστα με τις απλήρωτες αποδείξεις.</body> </message> <valid>false</valid> </report> </ns2:ValidationException> </detail> </S:Fault> </S:Body> </S:Envelope> ``` ###Example 3 Successful persistence for Policies *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:createJournal> <distChannel>00510</distChannel> <endorsements> <endorsementCode>004096778</endorsementCode> <policyCode>10933573</policyCode> </endorsements> <endorsements> <endorsementCode>004096805</endorsementCode> <policyCode>10933636</policyCode> </endorsements> </v1:createJournal> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:createJournalResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <code>00419733</code> <creationDate>2014-11-19T00:00:00+02:00</creationDate> <distChannel>00510</distChannel> <endorsements> <endorsementCode>004096778</endorsementCode> <policyCode>10933573</policyCode> <quotationCode></quotationCode> </endorsements> <endorsements> <endorsementCode>004096805</endorsementCode> <policyCode>10933636</policyCode> <quotationCode></quotationCode> </endorsements> <netAmount>287.72</netAmount> <notes>Πολλαπλά Συμβόλαια</notes> <premiumAmount>350.16</premiumAmount> <status>OPEN</status> </return> </ns2:createJournalResponse> </S:Body> </S:Envelope> ``` ###Example 4 Successful persistence for Quotation *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:createJournal> <distChannel>11133</distChannel> <endorsements> <quotationCode>00511971</quotationCode>> </endorsements> </v1:createJournal> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:createJournalResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <code>00419734</code> <creationDate>2014-11-19T00:00:00+02:00</creationDate> <distChannel>11133</distChannel> <endorsements> <endorsementCode>004160727</endorsementCode> <policyCode>10939097</policyCode> <quotationCode>00511971</quotationCode> </endorsements> <netAmount>135.90</netAmount> <notes>ΚΑΤΣΑΜΑΝΗ ΜΑΡΙΑ</notes> <premiumAmount>165.45</premiumAmount> <status>OPEN</status> </return> </ns2:createJournalResponse> </S:Body> </S:Envelope> ``` ###Example 5 Successful persistence for Quotations and Policies *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:createJournal> <distChannel>11133</distChannel> <endorsements> <quotationCode>00512042</quotationCode>> </endorsements> <endorsements> <policyCode>10936327</policyCode> <endorsementCode>004097411</endorsementCode>> </endorsements> </v1:createJournal> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:createJournalResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <code>00419735</code> <creationDate>2014-11-19T00:00:00+02:00</creationDate> <distChannel>11133</distChannel> <endorsements> <endorsementCode>004097411</endorsementCode> <policyCode>10936327</policyCode> <quotationCode></quotationCode> </endorsements> <endorsements> <endorsementCode>004160730</endorsementCode> <policyCode>10942335</policyCode> <quotationCode>00512042</quotationCode> </endorsements> <netAmount>338.68</netAmount> <notes>Πολλαπλά Συμβόλαια</notes> <premiumAmount>410.18</premiumAmount> <status>OPEN</status> </return> </ns2:createJournalResponse> </S:Body> </S:Envelope> ``` ##getPolicyCodeByApplicationCode <a name="getPolicyCodeByApplicationCode"></a> This method is deprecated. Use instead the method [getEndorsementByApplicationCode](#getEndorsementByApplicationCode). ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- applicationCode | String | String | Required | The code of the application | 97030375 ###Output Type | Description | Example ---- | ----------- | ------- String | The policy code | 11109524 ###Example 1 This example shows the case that you are not authorized to access a policy *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:getPolicyCodeByApplicationCode> <applicationCode>97030377</applicationCode> </v1:getPolicyCodeByApplicationCode> </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>You are not authorized for this action</faultstring> <detail> <ns2:AuthorizationException xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <message>You are not authorized for this action</message> </ns2:AuthorizationException> </detail> </S:Fault> </S:Body> </S:Envelope> ``` ###Example 2 This examples shows if an application has not been issued as a policy *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:getPolicyCodeByApplicationCode> <applicationCode>97030375</applicationCode> </v1:getPolicyCodeByApplicationCode> </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 finding policy code</faultstring> <detail> <ns2:ValidationException xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <report> <message> <severity>error</severity> <code>5</code> <target>/policyCode</target> <body>Το Συμβόλαιο δεν υπάρχει.</body> </message> <valid>false</valid> </report> </ns2:ValidationException> </detail> </S:Fault> </S:Body> </S:Envelope> ``` ###Example 3 The example shows an application that has a corresponding policy *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:getPolicyCodeByApplicationCode> <applicationCode>97030377</applicationCode> </v1:getPolicyCodeByApplicationCode> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getPolicyCodeByApplicationCodeResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return>11109524</return> </ns2:getPolicyCodeByApplicationCodeResponse> </S:Body> </S:Envelope> ``` ##getPolicyDocument <a name="getPolicyDocument"></a> This service is for downloading the policy document for the latest endorsement. In order to download a policy it **must** be inside a Journal. If not, then a new Journal, a SOAP error will be returned. **Notice this behaviour has changed with respect to the previous versions where the Journal was created automatically**. After creating a Journal, it takes some time (approximately 5 minutes) in order to download the actual pdf document. You can have it though immediately as an HTML document (available only for motor policies). ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | Required | The code of the policy | 123456789 ###Output Type | Description | Example ---- | ----------- | ------- PolicyDocument | Report of policy download | *(see [getPolicyDocumentByEndorsementCode](#getPolictDocumentByEndorsementCode))* ###Example 1 This example returns a ValidationException cause this policy has an older endorsement unpaid. *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:getPolicyDocument> <policyCode>10228007</policyCode> </v1:getPolicyDocument> </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 downloading document</faultstring> <detail> <ns2:ValidationException xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <report> <message> <severity>error</severity> <code>350</code> <target>/journal</target> <body>Υπάρχει παλαιότερη Απόδειξη πληρωμών για το επιλεγμένο Ασφαλιστήριο. Απόδειξη :</body> </message> <valid>false</valid> </report> </ns2:ValidationException> </detail> </S:Fault> </S:Body> </S:Envelope> ``` ##getPolicyDocumentByApplicationCode <a name="getPolicyDocumentByApplicationCode"></a> This service is for downloading the latest policy document providing only the application code. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- applicationCode | String | String | Required | The application code | 00776474 ###Output Type | Description | Example ---- | ----------- | ------- PolicyDocument | Report of policy download | *(see [getPolicyDocumentByEndorsementCode](#getPolictDocumentByEndorsementCode))* ###Example 1 In this example application has not been issued yet to a policy *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:getPolicyDocumentByApplicationCode> <applicationCode>97030256</applicationCode> </v1:getPolicyDocumentByApplicationCode> </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 downloading policy</faultstring> <detail> <ns2:ValidationException xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <report> <message> <severity>error</severity> <code>5</code> <target>/applicationCode</target> <body>Δεν έχει εκδωθεί ασφαλιστήριο για την αίτηση 97030256.</body> </message> <valid>false</valid> </report> </ns2:ValidationException> </detail> </S:Fault> </S:Body> </S:Envelope> ``` ##getPolicyDocumentByEndorsementCode <a name="getPolicyDocumentByEndorsementCode"></a> This service is for downloading the policy document for a specific endorsement. In order to download a policy it **must** be inside a Journal. If not, then a new Journal, if it's possible, is being created automatically. After creating a Journal, it takes some time (approximately 5 minutes) in order to download the actual pdf document. You can have it though immediately as an HTML document (available only for motor policies).. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | Required | The code of the policy | 123456789 endorsementCode | String | String | Required | The code of the endorsement | 000000000 ###Output Type | Description | Example ---- | ----------- | ------- PolicyDocument | Report of policy download | *(see below)* ####PolicyDocument Field | Type | Description | Example ----- | ---- | ----------- | ------- policyCode | String | The code of the policy | 110398475 endorsementCode | String | The code of the endorsement | 00183758723 journalCode | String | The code of the Journal | 02139857 document | byte[] | The document content | JVBERi0... htmlDocument | String | The document in HTML format | status | String | The existance or not of the printed document "printed" / "to-be-printed" | to-be-printed ###Example 1 Successful retrieval of the document *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:getPolicyDocument> <policyCode>10946002</policyCode> <endorsementCode>003830083</endorsementCode> </v1:getPolicyDocument> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getPolicyDocumentResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <document>JVBERi0xLjQNCiXi48/TDQoxIDAgb2JqDQogIDw8DQogICAgL0F1dGhvcjw+</document> <journalCode>00219962</journalCode> <policyCode>10946002</policyCode> <endorsementCode>003830083</endorsementCode> <status>printed</status> </return> </ns2:getPolicyDocumentResponse> </S:Body> </S:Envelope> ``` ###Example 2 There is a possibility that the procedure of creating a new Journal is successful but in some cases the document is not in our system, then you can retrieve the journalCode, but not the document. *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:getPolicyDocument> <policyCode>11065549</policyCode> <endorsementCode>003858115</endorsementCode> </v1:getPolicyDocument> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getPolicyDocumentResponse xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <return> <journalCode>00400009</journalCode> <policyCode>11065549</policyCode> <endorsementCode>003858115</endorsementCode> <status>to-be-printed</status> </return> </ns2:getPolicyDocumentResponse> </S:Body> </S:Envelope> ``` ###Example 3 Not able to create a Journal for downloading the policy. *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:getPolicyDocument> <policyCode>11037222</policyCode> <endorsementCode>003899385</endorsementCode> </v1:getPolicyDocument> </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 downloading document</faultstring> <detail> <ns2:ValidationException xmlns:ns2="http://v1.soap.ws.api.gbox.generali.gr/"> <report> <message> <severity>error</severity> <code>300</code> <target>/journal</target> <body>Έχετε ξεπεράσει το χρηματικό όριο για τον Κωδικό Παραγωγής σας</body> </message> <valid>false</valid> </report> </ns2:ValidationException> </detail> </S:Fault> </S:Body> </S:Envelope> ``` ##getReceiptDocument <a name="getReceiptDocument"></a> This service is for downloading the receipt document of a policy for the latest endorsement. In order to download a receipt, the policy **must** be inside a Journal. If not, then a new Journal, if it's possible, is being created automatically. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | Required | The code of the policy | 123456789 ###Output Type | Description | Example ---- | ----------- | ------- ReceiptDocument | Report of receipt download | *(see [getReceiptDocumentByEndorsementCode](#getReceiptDocumentByEndorsementCode))* ##getReceiptDocumentByEndorsementCode <a name="getReceiptDocumentByEndorsementCode"></a> This service is for downloading the receipt document of a policy for a specific endorsement. In order to download a receipt, the policy **must** be inside a Journal. If not, then a new Journal, if it's possible, is being created automatically. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | Required | The code of the policy | 123456789 endorsementCode | String | String | Required | The code of the endorsement | 000000000 ###Output Type | Description | Example ---- | ----------- | ------- ReceiptDocument | Report of receipt download | *(see below)* ####ReceiptDocument Field | Type | Description | Example ----- | ---- | ----------- | ------- policyCode | String | The code of the policy | 110398475 endorsementCode | String | The code of the endorsement | 00183758723 journalCode | String | The code of the Journal | 02139857 document | byte[] | The document | ##getBillDocument <a name="getBillDocument"></a> Returns the bill document of a policy or of a quotation. If you specify only the policyCode returns the bill of the latest endorsement of the policy. If you specify the policyCode and the endorsementCode then it returns the bill document of the specific endorsement. Finally, if you specify the quotationCode, it return the bill document of the quotation. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- endorsement | Endorsement | Endorsement | Required | The data of the policy or the quotation | (*see below*) ##Error Codes <a name="errorCodes"></a> Code | Description ------ | ----------- 210 | The endorsement already exists inside in Journal 220 | The Dist Channel doesn't have outstand amount 230 | The Dist Channel doesn't have limits 300 | You have overcome the money limit 310 | You have overcome the day limit 350 | The endorsement is not the oldest of this policy 360 | The Journal have a minus journal amount