Data exchange system X-road interface: Difference between revisions

From services.krediidiinfo.ee
Jump to navigation Jump to search
No edit summary
Line 310: Line 310:
   <tr>
   <tr>
     <td>'''-50200'''</td>
     <td>'''-50200'''</td>
     <td>'''Unknown error'''</td>
     <td>'''Internal service''' '''error'''</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td></td>
     <td></td>
     <td>Unknown error</td>
     <td>Internal service error</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''-50201'''</td>
     <td>'''-50201'''
    <td>'''Internal error'''</td>
'''-50301'''
  </tr>
</td>
  <tr>
    <td></td>
    <td>Server internal error</td>
  </tr>
  <tr>
    <td>'''-50202'''</td>
     <td>'''Invalid request'''</td>
     <td>'''Invalid request'''</td>
   </tr>
   </tr>
Line 333: Line 327:
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''-50203'''</td>
     <td>'''-50202'''</td>
     <td>'''Access denied'''</td>
     <td>'''Access denied'''</td>
   </tr>
   </tr>
Line 341: Line 335:
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''-50204'''</td>
     <td>'''-50203'''</td>
     <td>'''Partial data'''</td>
     <td>'''Partial data'''</td>
   </tr>
   </tr>
Line 354: Line 348:
   <tr>
   <tr>
     <td></td>
     <td></td>
     <td>Consumer credit data synchronization has failed</td>
     <td>Consumer credit data synchronization (insertion, updating, deletion) has failed</td>
   </tr>
   </tr><tr><td>'''-50252'''</td><td>'''Invalid consent document'''</td></tr><tr><td></td><td>The consent document has not been pre-generated or is invalid digidoc container.</td></tr><tr><td>'''-50300'''</td><td>'''Invalid xml'''</td></tr><tr><td></td><td>Xml is invalid</td></tr></table>
</table>


= Links =  
= Links =  
[[Positive_register: functional_specification | Functional specification]]
[[Positive_register: functional_specification | Functional specification]]

Revision as of 10:09, 23 January 2017

Flag of Estonia.svg eesti keeles

Overview

POSR is a data exchange system, through which creditors that are members of the system are able to share information about person’s credit obligations.

This document is about services of the system provided by the X-road. The use of services is available only for members of X-Road.

WSDL

POSR system WSDL can be downloaded on link http://services.krediidiinfo.ee/posr.wsdl

X-road message

X-road message is corresponding to the service description

  • SOAP envelope
  • or is in MIME multipart/related format. First part of the message is SOAP envelope.

Response is a SOAP envelope.

SOAP envelope consists of a header and a body.

SOAP envelope header

Composition of data of the SOAP envelope header responds to X-road specification.

SOAP envelope body

Composition of data of the SOAP envelope body is described in the present documentation.

Request soap envelope example

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns:xrd="http://x-road.eu/xsd/xroad.xsd"
                   xmlns:id="http://x-road.eu/xsd/identifiers"
                   xmlns:posr="http://www.krediidiinfo.ee/services/posr"
                   xmlns:rep="http://www.krediidiinfo.ee/schemas/positive_register/credit/v1/report.xsd">
    <SOAP-ENV:Header>
        <xrd:client id:objectType="SUBSYSTEM">
            <id:xRoadInstance>ee</id:xRoadInstance>
            <id:memberClass>COM</id:memberClass>
            <id:memberCode>00000000</id:memberCode>
            <id:subsystemCode>TEST</id:subsystemCode>
        </xrd:client>
        <xrd:service id:objectType="SERVICE">
            <id:xRoadInstance>ee</id:xRoadInstance>
            <id:memberClass>COM</id:memberClass>
            <id:memberCode>10256137</id:memberCode>
            <id:subsystemCode>POSR</id:subsystemCode>
            <id:serviceCode>getCreditReport</id:serviceCode>
            <id:serviceVersion>v1</id:serviceVersion>
        </xrd:service>
        <xrd:id>test</xrd:id>
        <xrd:userId>EE00000000000</xrd:userId>
        <xrd:protocolVersion>4.0</xrd:protocolVersion>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <posr:getCreditReport>
            <rep:subject>
                <rep:ident_code>00000000000</rep:ident_code>
            </rep:subject>
            <rep:signed_consent>TEST</rep:signed_consent>
            <rep:lang>et</rep:lang>
        </posr:getCreditReport>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response soap envelope example

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                   xmlns:posr="http://www.krediidiinfo.ee/services/posr">
    <SOAP-ENV:Header>
        <xrd:client id:objectType="MEMBER" xmlns:xrd="http://x-road.eu/xsd/xroad.xsd" xmlns:id="http://x-road.eu/xsd/identifiers">
            <id:xRoadInstance>ee</id:xRoadInstance>
            <id:memberClass>COM</id:memberClass>
            <id:memberCode>00000000</id:memberCode>
            <id:subsystemCode>Test</id:subsystemCode>
        </xrd:client>
        <xrd:service id:objectType="SERVICE" xmlns:xrd="http://x-road.eu/xsd/xroad.xsd" xmlns:id="http://x-road.eu/xsd/identifiers">
            <id:xRoadInstance>ee</id:xRoadInstance>
            <id:memberClass>COM</id:memberClass>
            <id:memberCode>10256137</id:memberCode>
            <id:subsystemCode>POSR</id:subsystemCode>
            <id:serviceCode>getCreditReport</id:serviceCode>
            <id:serviceVersion>v1</id:serviceVersion>
        </xrd:service>
        <xrd:id xmlns:xrd="http://x-road.eu/xsd/xroad.xsd">test</xrd:id>
        <xrd:userId xmlns:xrd="http://x-road.eu/xsd/xroad.xsd">EE00000000000</xrd:userId>
        <xrd:issue xmlns:xrd="http://x-road.eu/xsd/xroad.xsd"/>
        <xrd:protocolVersion xmlns:xrd="http://x-road.eu/xsd/xroad.xsd">4.0</xrd:protocolVersion>
        <xrd:requestHash algorithmId="http://www.w3.org/2001/04/xmlenc#sha512">Test</xrd:requestHash>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <posr:getCreditReportResponse>
            <credit_report xmlns:rep="http://www.krediidiinfo.ee/schemas/positive_register/credit/v1/report.xsd"
                           xmlns:cid="http://www.krediidiinfo.ee/schemas/positive_register/credit/v1/identifiers.xsd">
		<rep:consumer_credits>
                    <rep:consumer_credit>
		        <cid:type>
                            <cid:code>CC</cid:code>
                            <cid:name>Krediitkaart</cid:name>
                        </cid:type>
			<cid:begin_date>2016-07-14</cid:begin_date>
			<cid:end_date>2017-07-14</cid:end_date>
			<cid:sum>200</cid:sum>
			<cid:balance>200</cid:balance>
			<cid:unpaid_sum>7</cid:unpaid_sum>
			<cid:currency>EUR</cid:currency>
			<cid:schedule_payments>
			    <cid:schedule_payment>
			        <cid:due_date>2016-10-22</cid:due_date>
				<cid:sum>100.0</cid:sum>
			    </cid:schedule_payment>
   		        </cid:schedule_payments>
                        <cid:subjects>  
			    <cid:subject>
			        <cid:ident_code>00000000000</cid:ident_code>
			        <cid:role>
                                    <cid:code>BRW</cid:code>
                                    <cid:name>Krediidivõtja</cid:name>
                                </cid:role>
			    </cid:subject>
                        </cid:subjects>
			<cid:update_datetime>2017-01-01T03:00:00</cid:update_datetime>
		    </rep:consumer_credit>
                </rep:consumer_credits>
		<rep:inquiries>
                    <rep:inquiry>
                        <cid:datetime>2017-01-02T08:17:30</cid:datetime>
                    </rep:inquiry>
		</rep:inquiries>
            </credit_report>
            <posr:fault xsi:nil="true"/>
        </posr:getCreditReportResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Services

The member can use services if Creditinfo Eesti AS has given him the rights to use them.

generateConsent.v1

Creation of the document of person's consent in question of providing the creditor to make the inquiry about person’s credit obligations. The consent document format is pdf.

Request soap envelope body parameters

GenerateConsentReq.png

Response soap envelope body parameters

GenerateConsentResp.png

getSubjectData.v1

The request of person’s credit obligations from data repositories of creditors that are members of the data exchange system.

Request soap envelope body parameters

GetSubjectPositiveData


Response soap envelope body parameters

GetSubjectPositiveDataResponse

insertCredit.v1

Registration of the person’s credit obligation in data exchange system repository.

Request soap envelope body parameters

AddSubjectPositiveData


Response soap envelope body parameters

AddSubjectPositiveDataResponse

updateCredit.v1

Update of the person’s credit obligation in data exchange system repository.

Request soap envelope body parameters

UpdateSubjectPositiveData


Response soap envelope body parameters

UpdateSubjectPositiveDataResponse

deleteCredit.v1

Deletion of the person’s credit obligation from data exchange system repository.

Request soap envelope body parameters

DeleteSubjectPositiveData


Response soap envelope body parameters

DeleteSubjectPositiveDataResponse

uploadCreditsMtom.v1

Importing of data of all current credit obligations in data exchange system repository.

Request

Request is in format MTOM/XOP, which responds to the standard SOAP multipart/related. First part of the message is SOAP envelope. Second part of the message is XML which is zipped by gzip and encoded by base64. XML should be valid according to the schema https://services.krediidiinfo.ee/schemas/positive_register/credit/v1/insert.xsd.

Soap envelope body parameters:

UploadPositiveDataMtom


Loaninfo debtors.png


Request example:

...Other headers
Content-Type: multipart/related; type="application/xop+xml"; start="<xxx>"; start-info="text/xml"; boundary="MIME_boundary"'
MIME-Version: 1.0

--MIME_boundary
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: <xxx>

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns:xrd="http://x-road.eu/xsd/xroad.xsd"
                   xmlns:id="http://x-road.eu/xsd/identifiers"
                   xmlns:posr="http://www.krediidiinfo.ee/services/posr">
    <SOAP-ENV:Header>
        <xrd:client id:objectType="SUBSYSTEM">
            <id:xRoadInstance>ee</id:xRoadInstance>
            <id:memberClass>COM</id:memberClass>
            <id:memberCode>00000000</id:memberCode>
            <id:subsystenCode>TEST</id:subsystenCode>
        </xrd:client>
        <xrd:service id:objectType="SERVICE">
            <id:xRoadInstance>ee</id:xRoadInstance>
            <id:memberClass>COM</id:memberClass>
            <id:memberCode>10256137</id:memberCode>
            <id:subsystemCode>POSR</id:subsystemCode>
            <id:serviceCode>uploadCreditsMtom</id:serviceCode>
            <id:serviceVersion>v1</id:serviceVersion>
        </xrd:service>
        <xrd:id>test</xrd:id>
        <xrd:userId>EE00000000000</xrd:userId>
        <xrd:protocolVersion>4.0</xrd:protocolVersion>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <posr:uploadCreditsMtom>
            <positive_data>
                <inc:Include href="cid:xxx"/>
            </positive_data>
        </posr:uploadCreditsMtom>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--MIME_boundary
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64
Content-ID: <xxx>
Content-Disposition: attachment;

H4sIAAAAAAAAA12PsW7CQAyGd6S+Q+Q9dxeoRIkIbEx0KpXYoujOCRbEh84uyeM3abtQyfLi///kb7sf+1v2wCQUuYLCOMiQfQzEXQWfp0P+Bvvdy2LrI8tXj6n2CQOpZFOPpaRQwUX1Xlo7DIO5zkeahttoEK34C/aN2HsUUnpgnbAjUUz2F1NTQFZqaXrAjBLgDzsKPXGHlYmps0vnCnt+P378YHNi0YY9QtYhY2oU6zAtpR4rmLN5scyL9cltypUrX9cwi9j/Jrtv1xHpQQQBAAA=


--MIME_boundary--

Response soap envelope body parameters

UploadPositiveDataMtomResponse

getUploadStatus.v1

Requesting of the document status that was created by importing of data of all current credit obligations in data exchange system repository.

Request soap envelope body parameters

UploadPositiveDataStatus


Response soap envelope body parameters

UploadPositiveDataStatusResponse

Technical error

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
        <SOAP-ENV:Fault>
             <faultcode>SOAP-ENV:Server</faultcode>
             <faultstring>Internal service error</faultstring>
             <faultactor/>
             <detail>
                 <faultCode>-50200</faultCode>
                 <faultString>Internal service error</faultString>
             </detail>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Error codes

-50200 Internal service error
Internal service error
-50201

-50301

Invalid request
Invalid request format or data
-50202 Access denied
User has no permission to use the system
-50203 Partial data
The data in response is partial
-50250 Credit data sync failed
Consumer credit data synchronization (insertion, updating, deletion) has failed
-50252Invalid consent document
The consent document has not been pre-generated or is invalid digidoc container.
-50300Invalid xml
Xml is invalid

Links

Functional specification