#Print&Pay web services Provides service methods to handle Print&Pay operations. * **Type**: SOAP * **Production WSDL**: https://services.generali.gr/soap/v2/printandpay?wsdl * **Test WSDL**: https://services-test.generali.gr/soap/v2/printandpay?wsdl Methods * [listDistChannelLimits](#listDistChannelLimits) * [findDistChannelLimit](#findDistChannelLimit) * [listJournalsByDistChannel](#listJournalsByDistChannel) * [findJournal](#findJournal) * [findEndorsement](#findEndorsement) * [listUnpaidEndorsementsByDistChannel](#listUnpaidEndorsementsByDistChannel) * [listUnpaidFastPayEndorsementsByDistChannel](#listUnpaidFastPayEndorsementsByDistChannel) * [listEndorsementsByJournal](#listEndorsementsByJournal) * [createJournal](#createJournal) * [createPayment](#createPayment) * [getPaymentStatus](#getPaymentStatus) * [Error Codes](#errorCodes) ##listDistChannelLimits <a name="listDistChannelLimits"></a> Returns the amount 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 | 00100 totalAmount | BigDecimal | The allowed total amount of the Dist Channel | 300.00 outstandingAmount | BigDecimal | The remaining amount | 5.05 totalDays | Integer | The allowed total days | 10 outstandingDays | Integer | The remaining days | -5 *(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:v2="http://v2.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v2:listDistChannelLimits/> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:listDistChannelLimitsResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <distChannelCode>00100</distChannelCode> <outstandingAmount>5.05</outstandingAmount> <outstandingDays>-5</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>06249</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>06288</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>06246</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>06245</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>06258</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>06248</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>06247</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>06255</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>08000</distChannelCode> <outstandingAmount>99245069.82</outstandingAmount> <outstandingDays>920</outstandingDays> <totalAmount>99250000.00</totalAmount> <totalDays>923</totalDays> </return> <return> <distChannelCode>06241</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>06244</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>06252</distChannelCode> <outstandingAmount>251.49</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>251.49</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>00303</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>06303</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>06250</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>00302</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>00510</distChannelCode> <outstandingAmount>9997105.39</outstandingAmount> <outstandingDays>973</outstandingDays> <totalAmount>9999900.00</totalAmount> <totalDays>990</totalDays> </return> <return> <distChannelCode>06260</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> <return> <distChannelCode>06310</distChannelCode> <outstandingAmount>300.00</outstandingAmount> <outstandingDays>10</outstandingDays> <totalAmount>300.00</totalAmount> <totalDays>10</totalDays> </return> </ns2:listDistChannelLimitsResponse> </S:Body> </S:Envelope> ``` ##findDistChannelLimit <a name="findDistChannelLimit"></a> Returns the amount 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:v2="http://v2.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v2:findDistChannelLimit> <distChannelCode>00510</distChannelCode> </v2:findDistChannelLimit> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:findDistChannelLimitResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <distChannelCode>00510</distChannelCode> <outstandingAmount>9997105.39</outstandingAmount> <outstandingDays>973</outstandingDays> <totalAmount>9999900.00</totalAmount> <totalDays>990</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> <distChannelCode>12345</distChannelCode> </v1:findDistChannelLimit> </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>You are not authorized to find limits for distribution channel: 00520, please use: 00304, 06241, 00301, 07797, 50072, 00896, 06249, 06281, 05000, 06250, 06303, 05225, 00928, 06247, 06252, 06000, 06244, 06243, 06279, 08000, 09000, 06245, 00302, 00900, 06258, 08002, 06310, 08802, 06248, 06242, 00311, 08800, 00530, 06246, 00611, 00610, 00511, 00300, 00510, 00100, 04400, 00305, 00303, 00306, 00048, 06288, 55003, 06255, 06260</faultstring> <detail> <ns2:AuthorizationException xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <message>You are not authorized to find limits for distribution channel: 00520, please use: 00304, 06241, 00301, 07797, 50072, 00896, 06249, 06281, 05000, 06250, 06303, 05225, 00928, 06247, 06252, 06000, 06244, 06243, 06279, 08000, 09000, 06245, 00302, 00900, 06258, 08002, 06310, 08802, 06248, 06242, 00311, 08800, 00530, 06246, 00611, 00610, 00511, 00300, 00510, 00100, 04400, 00305, 00303, 00306, 00048, 06288, 55003, 06255, 06260</message> </ns2:AuthorizationException> </detail> </ns2: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 | 08000 first | Integer | Integer | Optional | The first row. *Default value : 0* | 0 max | Integer | Integer | Optional | The number of max rows *Default value : 50* | 3 ###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 | 00771612 creationDate | Date | The date the Journal was created | 2015-09-28T00:00:00+03:00 daysToGetPaid Number | The days remaining to get paid | *(see below)* premiumAmount | BigDecimal | The gross amount of the Journal | 129.05 netAmount | BigDecimal | The net amount of the Journ | 129.05 status | String *(possible values : OPEN, IN_PAYMENT)* | The status of the Journal | OPEN distChannelCode | String | The Dist Channel code in the journal belongs | 08000 notes | String | The notes of the Journal | "ΒΟΥΡΟΣ ΚΩΣΤΑΣ" List[Endorsement] | Endorsement | A list with all the policies inside a journal | *(see below))* #### EndorsementId Field | Type | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- code | String | The code of the endorsement | 000000000 policyCode | String | The code of the policy | 11244860 quotationCode | String | The code of the quotation | 00915010 quotationPreviousPolicyCode | String | String | Optional | The old policy code of a renewal quotation | *(see example)* ###Example 1 This examples shows the output if there are existing Journals *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:listJournalsByDistChannel> <distChannelCode>08000</distChannelCode> <first>0</first> <max>3</max> </v2:listJournalsByDistChannel> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:listJournalsByDistChannelResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <code>00771612</code> <creationDate>2015-09-28T00:00:00+03:00</creationDate> <distChannel>08000</distChannel> <endorsementsId> <code>000000000</code> <policyCode>11244860</policyCode> <quotationCode>00915010</quotationCode> </endorsementsId> <netAmount>129.05</netAmount> <notes>ΧΧΧΧΧΧ ΚΩΣΤΑΣ</notes> <premiumAmount>129.05</premiumAmount> <status>OPEN</status> </return> <return> <code>00771613</code> <creationDate>2015-09-28T00:00:00+03:00</creationDate> <distChannel>08000</distChannel> <endorsementsId> <code>000000000</code> <policyCode>11244861</policyCode> <quotationCode>00915011</quotationCode> </endorsementsId> <netAmount>132.15</netAmount> <notes>ΧΧΧΧΧΧ ΕΜΜΑΝΟΥΗΛ</notes> <premiumAmount>132.15</premiumAmount> <status>OPEN</status> </return> <return> <code>00771618</code> <creationDate>2015-09-28T00:00:00+03:00</creationDate> <distChannel>08000</distChannel> <endorsementsId> <code>000000000</code> <policyCode>11244869</policyCode> <quotationCode>00915023</quotationCode> </endorsementsId> <netAmount>132.15</netAmount> <notes>ΧΧΧΧΧΧ ΚΩΝΣΤΑΝΤΙΝΟΣ</notes> <premiumAmount>132.15</premiumAmount> <status>OPEN</status> </return> </ns2:listJournalsByDistChannelResponse> </S:Body> </S:Envelope> ``` ##findJournal <a name="findJournal"></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 | 00771612 ###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:v2="http://v2.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v2:findJournal> <journalCode>00771612</journalCode> </v2:findJournal> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:findJournalResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <code>00771612</code> <creationDate>2015-09-28T00:00:00+03:00</creationDate> <distChannelCode>08000</distChannelCode> <endorsementsId> <code>000000000</code> <policyCode>11244860</policyCode> <quotationCode>00915010</quotationCode> </endorsementsId> <netAmount>129.05</netAmount> <notes>ΧΧΧΧΧΧ ΚΩΣΤΑΣ</notes> <premiumAmount>129.05</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> ``` ##findEndorsement <a name="findEndorsement"></a> Retrieve a specific 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)* #### EndorsementId Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- policyCode | String | String | Optional | The policy code | *(see example)* code | String | String | Optional | The endorsement code of the policy | 000000000 quotationCode | String | String | Optional | The quotation code | 00915126 quotationPreviousPolicyCode | String | String | Optional | The old policy code of a renewal quotation | *(see example)* ###Output Type | Description | Example ---- | ----------- | ------- EndorsementReceipt | The data of the specific policy | *(see below)* #### Endorsement Field | Type | Description | Example ----- | ---- | ----------- | ------- code | String | Endorsement Receipt code | 000000000 policyCode | String | The code of the policy | *(see example)* quotationCode | String | The code of the quotation | 00915126 previousPolicyCode | String | The old policy code of a renewal quotation | *(see example)* insuranceStartDate | Date | The start date of the policy | 2015-10-01T00:00:00+03:00 insuranceEndDate | Date | The end date of the policy | 2016-10-01T00:00:00+03:00 expireDate | Date | The expiration date of the policy | 2015-11-01T00:00:00+03:00 premiumGrossAmount | BigDecimal | The gross amount of the Endorsement | 318.92 premiumNetAmount | BigDecimal | The net amount of the Endorsement | 318.92 customerName | String | The name of the customer | STEF customerSurname | String | The surname of the customer | TEST extraDetails | String | Some extra details. To date we show the license number if exists | AAA3315 paymentCode | String | The payment code of the endorsement | 14000008216425375104 ###Example1 Searching for a policy *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:findEndorsement> <endorsement> <code>000000000</code> <policyCode></policyCode> <quotationCode>00915126</quotationCode> <quotationPreviousPolicyCode></quotationPreviousPolicyCode> </endorsement> </v2:findEndorsement> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:findEndorsementResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <code>000000000</code> <customerName>STEF</customerName> <customerSurname>TEST</customerSurname> <extraDetails>AAA3315</extraDetails> <insuranceEndDate>2016-10-01T00:00:00+03:00</insuranceEndDate> <insuranceStartDate>2015-10-01T00:00:00+03:00</insuranceStartDate> <paymentCode>14000008216425375104</paymentCode> <premiumGrossAmount>318.92</premiumGrossAmount> <premiumNetAmount>318.92</premiumNetAmount> <quotationCode>00915126</quotationCode> </return> </ns2:findEndorsementResponse> </S:Body> </S:Envelope> ``` ###Example2 Searching for a quotation *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:findEndorsement> <endorsement> <code>000000000</code> <policyCode>10865768</policyCode> <quotationCode></quotationCode> <quotationPreviousPolicyCode></quotationPreviousPolicyCode> </endorsement> </v2:findEndorsement> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:findEndorsementResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <code>000000000</code> <customerName>ΒΑΣΙΛΕΙΟΣ</customerName> <customerSurname>XXXXXXX</customerSurname> <extraDetails>IPT0332</extraDetails> <insuranceEndDate>2013-12-03T00:00:00+02:00</insuranceEndDate> <insuranceStartDate>2012-12-03T00:00:00+02:00</insuranceStartDate> <policyCode>10865768</policyCode> <premiumGrossAmount>0.00</premiumGrossAmount> <premiumNetAmount>0.00</premiumNetAmount> </return> </ns2:findEndorsementResponse> </S:Body> </S:Envelope> ``` ##listUnpaidEndorsementsByDistChannel <a name="listUnpaidEndorsementsByDistChannel"></a> Lists all the Print&Pay 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* | 3 ###Output Type | Description | Example ---- | ----------- | ------- List[EndorsementReceipt] | A list with endorsements data | *(see below)* #### EndorsementReceipt Field | Type | Description | Example ----- | ---- | ----------- | ------- code | String | Endorsement Receipt code | *(see example)* policyCode | String | The code of the policy | *(see example)* quotationCode | String | The code of the quotation | *(see example)* quotationPreviousPolicyCode | String | The old policy code of a renewal quotation | *(see example)* startDate | Date | The start date of the policy | *(see example)* endDate | Date | The end date of the policy | *(see example)* expireDate | Date | The expiration date of the policy | *(see example)* premiumAmount | BigDecimal | The gross amount of the Endorsement | *(see example)* netAmount | BigDecimal | The net amount of the Endorsement | *(see example)* customerName | String | The name of the customer | *(see example)* customerSurname | String | The surname of the customer | *(see example)* extraDetails | String | Some extra details. To date we show the license number if exists | *(see example)* paymentCode | String | The payment code of the endorsement | *(see example)* ###Example *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:listUnpaidEndorsementsByDistChannel> <distChannelCode>00510</distChannelCode> <first>10</first> <max>3</max> </v2:listUnpaidEndorsementsByDistChannel> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:listUnpaidEndorsementsByDistChannelResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <code>000000000</code> <customerName>ΚΩΝΣΤΑΝΤΙΝΟΣ</customerName> <customerSurname>XXXXXXX</customerSurname> <extraDetails>IKM9594</extraDetails> <insuranceEndDate>2016-03-12T00:00:00+02:00</insuranceEndDate> <insuranceStartDate>2015-09-12T00:00:00+03:00</insuranceStartDate> <paymentCode>14000008176327975108</paymentCode> <premiumGrossAmount>66.88</premiumGrossAmount> <premiumNetAmount>66.88</premiumNetAmount> <quotationCode>00899004</quotationCode> </return> <return> <code>000000000</code> <customerName>ΚΩΝΣΤΑΝΤΙΝΟΣ</customerName> <customerSurname>XXXXXXX</customerSurname> <extraDetails>IKM9594</extraDetails> <insuranceEndDate>2016-03-12T00:00:00+02:00</insuranceEndDate> <insuranceStartDate>2015-09-12T00:00:00+03:00</insuranceStartDate> <paymentCode>14000008176328775102</paymentCode> <premiumGrossAmount>66.88</premiumGrossAmount> <premiumNetAmount>66.88</premiumNetAmount> <quotationCode>00899005</quotationCode> </return> <return> <code>000000000</code> <customerName>ΚΩΝΣΤΑΝΤΙΝΟΣ</customerName> <customerSurname>XXXXXXX</customerSurname> <extraDetails>IKM9594</extraDetails> <insuranceEndDate>2016-03-12T00:00:00+02:00</insuranceEndDate> <insuranceStartDate>2015-09-12T00:00:00+03:00</insuranceStartDate> <paymentCode>14000008176329575107</paymentCode> <premiumGrossAmount>66.88</premiumGrossAmount> <premiumNetAmount>66.88</premiumNetAmount> <quotationCode>00899006</quotationCode> </return> </ns2:listUnpaidEndorsementsByDistChannelResponse> </S:Body> </S:Envelope> ``` ##listUnpaidFastPayEndorsementsByDistChannel <a name="listUnpaidFastPayEndorsementsByDistChannel"></a> Lists all the Fast Pay 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* | 3 ###Output Type | Description | Example ---- | ----------- | ------- List[EndorsementReceipt] | A list with endorsements data | *(see below)* #### EndorsementReceipt Field | Type | Description | Example ----- | ---- | ----------- | ------- code | String | Endorsement Receipt code | *(see example)* policyCode | String | The code of the policy | *(see example)* quotationCode | String | The code of the quotation | *(see example)* quotationPreviousPolicyCode | String | The old policy code of a renewal quotation | *(see example)* startDate | Date | The start date of the policy | *(see example)* endDate | Date | The end date of the policy | *(see example)* expireDate | Date | The expiration date of the policy | *(see example)* premiumAmount | BigDecimal | The gross amount of the Endorsement | *(see example)* netAmount | BigDecimal | The net amount of the Endorsement | *(see example)* customerName | String | The name of the customer | *(see example)* customerSurname | String | The surname of the customer | *(see example)* extraDetails | String | Some extra details. To date we show the license number if exists | *(see example)* paymentCode | String | The payment code of the endorsement | *(see example)* ###Example *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:listUnpaidFastPayEndorsementsByDistChannel> <distChannelCode>00510</distChannelCode> <first>10</first> <max>3</max> </v2:listUnpaidFastPayEndorsementsByDistChannel> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:lislistUnpaidFastPayEndorsementsByDistChannelResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <code>000000000</code> <customerName>ΚΩΝΣΤΑΝΤΙΝΟΣ</customerName> <customerSurname>XXXXXXX</customerSurname> <extraDetails>IKM9594</extraDetails> <insuranceEndDate>2016-03-12T00:00:00+02:00</insuranceEndDate> <insuranceStartDate>2015-09-12T00:00:00+03:00</insuranceStartDate> <paymentCode>14000008176327975108</paymentCode> <premiumGrossAmount>66.88</premiumGrossAmount> <premiumNetAmount>66.88</premiumNetAmount> <quotationCode>00899004</quotationCode> </return> <return> <code>000000000</code> <customerName>ΚΩΝΣΤΑΝΤΙΝΟΣ</customerName> <customerSurname>XXXXXXX</customerSurname> <extraDetails>IKM9594</extraDetails> <insuranceEndDate>2016-03-12T00:00:00+02:00</insuranceEndDate> <insuranceStartDate>2015-09-12T00:00:00+03:00</insuranceStartDate> <paymentCode>14000008176328775102</paymentCode> <premiumGrossAmount>66.88</premiumGrossAmount> <premiumNetAmount>66.88</premiumNetAmount> <quotationCode>00899005</quotationCode> </return> <return> <code>000000000</code> <customerName>ΚΩΝΣΤΑΝΤΙΝΟΣ</customerName> <customerSurname>XXXXXXX</customerSurname> <extraDetails>IKM9594</extraDetails> <insuranceEndDate>2016-03-12T00:00:00+02:00</insuranceEndDate> <insuranceStartDate>2015-09-12T00:00:00+03:00</insuranceStartDate> <paymentCode>14000008176329575107</paymentCode> <premiumGrossAmount>66.88</premiumGrossAmount> <premiumNetAmount>66.88</premiumNetAmount> <quotationCode>00899006</quotationCode> </return> </ns2:listUnpaidFastPayEndorsementsByDistChannelResponse> </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:v2="http://v2.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v2:listEndorsementsByJournal> <journalCode>00771629</journalCode> <first>0</first> <max>10</max> </v2:listEndorsementsByJournal> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:listEndorsementsByJournalResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <code>000000000</code> <customerName>TEST</customerName> <customerSurname>TEST</customerSurname> <insuranceEndDate>2016-03-29T00:00:00+03:00</insuranceEndDate> <insuranceStartDate>2015-09-29T00:00:00+03:00</insuranceStartDate> <policyCode>11244920</policyCode> <premiumGrossAmount>125.90</premiumGrossAmount> <premiumNetAmount>125.90</premiumNetAmount> <quotationCode>00915070</quotationCode> </return> </ns2:listEndorsementsByJournalResponse> </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. This method has been constructed mainly to serve bulk operations. In case you want to pay single quotation prefer payQuotation from Policy Services. 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" endorsementIds | List[Endorsement] | Endorsement | The list of endorsements which will added to Journal | *(see below)* ####EndorsementId 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 daysToGetPaid Number | The days remaining to get paid | *(see below)* 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> <ns2:createJournalResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <report> <message> <severity>error</severity> <code>18</code> <target/> <body>Η λίστα των Συναλλαγών πρέπει να κυμαίνεται μεταξύ 1-50.</body> </message> <valid>true</valid> </report> </return> </ns2:createJournalResponse> </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:v2="http://v2.soap.ws.api.gbox.generali.gr/"> <soapenv:Header/> <soapenv:Body> <v2:createJournal> <!--Optional:--> <distChannelCode>00510</distChannelCode> <!--Optional:--> <notes>""</notes> <!--Zero or more repetitions:--> <endorsementsId> <code>000000000</code> <policyCode></policyCode> <quotationCode>00915070</quotationCode> <quotationPreviousPolicyCode></quotationPreviousPolicyCode> </endorsementsId> </v2:createJournal> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:createJournalResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <report> <message> <severity>error</severity> <code>5</code> <target>/endorsementReceipts</target> <body>Ο αριθμός προσφοράς 00915070 δεν βρίσκεται στην λίστα των απλήρωτων Print&amp;Pay προσφορών.<script type="text/javascript" src="/_Incapsula_Resource?SWJIYLWA=719d34d31c8e3a6e6fffd425f7e032f3&ns=2&cb=342407075" async></script></body> </message> <valid>false</valid> </report> </return> </ns2:createJournalResponse> </S:Body> </S:Envelope> </S:Body> </S:Envelope> ``` ###Example 3 Successful persistence for Quotations *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:createJournal> <distChannelCode>00510</distChannelCode> <notes>""</notes> <!--Zero or more repetitions:--> <endorsementsId> <code>000000000</code> <policyCode></policyCode> <quotationCode>00899967</quotationCode> <quotationPreviousPolicyCode></quotationPreviousPolicyCode> </endorsementsId> <endorsementsId> <code>000000000</code> <policyCode></policyCode> <quotationCode>00900060</quotationCode> <quotationPreviousPolicyCode></quotationPreviousPolicyCode> </endorsementsId> </v2:createJournal> </soapenv:Body> </soapenv:Envelope> ``` *Output* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:createJournalResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <code>00771654</code> <creationDate>2015-10-01T00:00:00+03:00</creationDate> <daysToGetPaid>97</daysToGetPaid> <distChannelCode>00510</distChannelCode> <endorsementsId> <code>004662780</code> <policyCode>10865768</policyCode> <quotationCode>00899967</quotationCode> </endorsementsId> <endorsementsId> <code>004662781</code> <policyCode>10866637</policyCode> <quotationCode>00900060</quotationCode> </endorsementsId> <netAmount>275.15</netAmount> <notes>""</notes> <premiumAmount>275.15</premiumAmount> <status>OPEN</status> </return> </ns2:createJournalResponse> </S:Body> </S:Envelope> ``` ##createPayment <a name="createPayment"></a> Creates a payment consisting of one or multiple journal codes. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- distChannelCode | String | String | Required | Under which Dist Channel the payment will be created | 08000 journals | List[Journal] | Journal | The list of journals which will added to payment | *(see below)* ####Journal Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- journalCode | String | String | Required | The journal code| 00850560 ###Output Field | Description | Example ----- | ----------- | ------- amount| The payment amount | 132.15 creationDate| The creation date of payment |2015-10-13 diasPaymentCode |The dias payment code required for the bank payment |99911191006943475103 distChannelCode | The distribution channel code creates the payment| 08000 outstandingAmount | The outstanding amount |132.15 paymentCode |The payment code |10069434 status | The payment status | OPEN ###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:createPayment> <!--Optional:--> <Payment> <!--Optional:--> <distChannelCode>08000</distChannelCode> <journals> <!--Zero or more repetitions:--> <journal> <!--Optional:--> <journalCode>00850560</journalCode> </journal> <journal> <!--Optional:--> <journalCode>00850561</journalCode> </journal> </journals> </Payment> </v2:createPayment> </soapenv:Body> </soapenv:Envelope> ``` *(Output)* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:createPaymentResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return> <amount>132.15</amount> <creationDate>2015-10-13T00:00:00+03:00</creationDate> <diasPaymentCode>99911191006943475103</diasPaymentCode> <distChannelCode>08000</distChannelCode> <outstandingAmount>132.15</outstandingAmount> <paymentCode>10069434</paymentCode> <status>OPEN</status> </return> </ns2:createPaymentResponse> </S:Body> </S:Envelope> ``` ##getPaymentStatus <a name="getPaymentStatus"></a> Gets the status of the payment. ###Input Field | Type | Value | Required/Optional | Description | Example ----- | ---- | ----- | ----------------- | ----------- | ------- distChannelCode | String | String | Required | The distChannel the payment belongs | 08000 paymentCode | String| String | Required | The code of the payment | *(see below)* ###Ouput Field | Type | Value | Description | Example ----- | ---- | ----- | ----------- | ------- status | String | String | The payment status (OPEN, CLOSE) | *(see below)* ###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:getPaymentStatus> <!--Optional:--> <distChannelCode>08000</distChannelCode> <!--Optional:--> <paymentCode>10073307</paymentCode> </v2:getPaymentStatus> </soapenv:Body> </soapenv:Envelope> ``` *(Output)* ``` <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getPaymentStatusResponse xmlns:ns2="http://v2.soap.ws.api.gbox.generali.gr/"> <return>OPEN</return> </ns2:getPaymentStatusResponse> </S:Body> </S:Envelope> ``` ##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