Andmevahetussüsteemi X-tee liides: Difference between revisions
No edit summary |
|||
Line 8: | Line 8: | ||
= X-tee sõnum = | = X-tee sõnum = | ||
X-tee | X-tee päring on vastavalt teenuse kirjeldusele kas | ||
* SOAP ümbrik | |||
* või on MIME multipart/related stiilis, mille esimeses osas on SOAP ümbrik. | |||
Vastus on SOAP ümbrik. | |||
SOAP ümbrik koosneb päisest ja kehast. | |||
== | == SOAP ümbriku päis == | ||
SOAP ümbriku päises oleva info koosseis on määratud X-tee spetsifikatsiooni poolt. | |||
== SOAP ümbriku keha == | |||
SOAP ümbriku kehas oleva info koosseis on määratud käesoleva dokumendi poolt. | |||
== | == Päringu soap ümbriku näide == | ||
<pre> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:kri="urn:kri6"> | |||
<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>10256137</id:memberCode> | |||
</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:serviceCode>getSubjectPositiveData</id:serviceCode> | |||
<id:serviceVersion>v1</id:serviceVersion> | |||
</xrd:service> | |||
<xrd:id xmlns:xrd="http://x-road.eu/xsd/xroad.xsd">5734440e50c71</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> | |||
</SOAP-ENV:Header> | |||
<SOAP-ENV:Body> | |||
<kri:getSubjectPositiveData> | |||
<subject> | |||
<ident_code>00000000000</ident_code> | |||
</subject> | |||
<is_digi_agreement>1</is_digi_agreement> | |||
<lang>en</lang> | |||
</kri:getSubjectPositiveData> | |||
</SOAP-ENV:Body> | |||
</SOAP-ENV:Envelope> | |||
</pre> | |||
== Vastuse soap ümbriku näide == | |||
<pre> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:kri="urn:kri6"> | |||
<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>10256137</id:memberCode> | |||
</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:serviceCode>getSubjectPositiveData</id:serviceCode> | |||
<id:serviceVersion>v1</id:serviceVersion> | |||
</xrd:service> | |||
<xrd:id xmlns:xrd="http://x-road.eu/xsd/xroad.xsd">5734440e50c71</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"> | |||
RglGFiBmbZJ0JLwm+vzfGn4fQEIY1YfM81H3SekOw5VnwxO/jilTfHG0zgsaUH9LzLOCqb5YssDz0MbMzm3DhQ== | |||
</xrd:requestHash> | |||
</SOAP-ENV:Header> | |||
<SOAP-ENV:Body> | |||
<kri:getSubjectPositiveDataResponse> | |||
<subject_positive_data> | |||
<consumer_credits> | |||
<consumer_credit> | |||
<type code="O">Other</type> | |||
<begin_date>2016-07-14</begin_date> | |||
<end_date>2017-07-14</end_date> | |||
<total_sum>200</total_sum> | |||
<balance>200</balance> | |||
<unpaid_sum>7</unpaid_sum> | |||
<currency>EUR</currency> | |||
<schedule_payments> | |||
<schedule_payment> | |||
<due_date>2016-10-22</due_date> | |||
<sum>100.0</sum> | |||
</schedule_payment> | |||
</schedule_payments> | |||
<subject> | |||
<ident_code>48508060269</ident_code> | |||
<role code="GRT">Guarantor</role> | |||
</subject> | |||
<update_datetime>2016-01-01 03:00:00</update_datetime> | |||
</consumer_credit> | |||
</consumer_credits> | |||
<requests/> | |||
</subject_positive_data> | |||
<fault xsi:nil="true"/> | |||
</kri:getSubjectPositiveDataResponse> | |||
</SOAP-ENV:Body> | |||
</SOAP-ENV:Envelope> | |||
</pre> | |||
= Teenused = | = Teenused = | ||
Revision as of 12:53, 10 August 2016
Tutvustus
KRI6 on Krediidiinfo liides, mille vahendusel Osalejad vahetavad krediiditaotleja krediidikohustuste andmeid omavahel X-tee versioon 6 vahendusel. See spetsifikatsioon kirjeldab andmete vahetuse tehnilisi aspekte. KRI6 teenuste kasutamine eeldab, et osaleja on liitunud X-teega.
WSDL
KRI6 WSDL asub aadresslil https://services.krediidiinfo.ee/wsdl/kri6.wsdl.
X-tee sõnum
X-tee päring on vastavalt teenuse kirjeldusele kas
- SOAP ümbrik
- või on MIME multipart/related stiilis, mille esimeses osas on SOAP ümbrik.
Vastus on SOAP ümbrik.
SOAP ümbrik koosneb päisest ja kehast.
SOAP ümbriku päis
SOAP ümbriku päises oleva info koosseis on määratud X-tee spetsifikatsiooni poolt.
SOAP ümbriku keha
SOAP ümbriku kehas oleva info koosseis on määratud käesoleva dokumendi poolt.
Päringu soap ümbriku näide
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:kri="urn:kri6"> <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>10256137</id:memberCode> </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:serviceCode>getSubjectPositiveData</id:serviceCode> <id:serviceVersion>v1</id:serviceVersion> </xrd:service> <xrd:id xmlns:xrd="http://x-road.eu/xsd/xroad.xsd">5734440e50c71</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> </SOAP-ENV:Header> <SOAP-ENV:Body> <kri:getSubjectPositiveData> <subject> <ident_code>00000000000</ident_code> </subject> <is_digi_agreement>1</is_digi_agreement> <lang>en</lang> </kri:getSubjectPositiveData> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Vastuse soap ümbriku näide
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:kri="urn:kri6"> <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>10256137</id:memberCode> </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:serviceCode>getSubjectPositiveData</id:serviceCode> <id:serviceVersion>v1</id:serviceVersion> </xrd:service> <xrd:id xmlns:xrd="http://x-road.eu/xsd/xroad.xsd">5734440e50c71</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"> RglGFiBmbZJ0JLwm+vzfGn4fQEIY1YfM81H3SekOw5VnwxO/jilTfHG0zgsaUH9LzLOCqb5YssDz0MbMzm3DhQ== </xrd:requestHash> </SOAP-ENV:Header> <SOAP-ENV:Body> <kri:getSubjectPositiveDataResponse> <subject_positive_data> <consumer_credits> <consumer_credit> <type code="O">Other</type> <begin_date>2016-07-14</begin_date> <end_date>2017-07-14</end_date> <total_sum>200</total_sum> <balance>200</balance> <unpaid_sum>7</unpaid_sum> <currency>EUR</currency> <schedule_payments> <schedule_payment> <due_date>2016-10-22</due_date> <sum>100.0</sum> </schedule_payment> </schedule_payments> <subject> <ident_code>48508060269</ident_code> <role code="GRT">Guarantor</role> </subject> <update_datetime>2016-01-01 03:00:00</update_datetime> </consumer_credit> </consumer_credits> <requests/> </subject_positive_data> <fault xsi:nil="true"/> </kri:getSubjectPositiveDataResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Teenused
getSubjectPositiveData
Krediiditaotleja andmete pärimine Osalejate andmekogudest.
Päringu sõnum
Vastuse sõnum
addSubjectPositiveData
Ühe tarbijakrediidi andmete registreerimine.
Päringu sõnum
Vastuse sõnum
updateSubjectPositiveData
Ühe tarbijakrediidi andmete uuendamine.
Päringu sõnum
Vastuse sõnum
deleteSubjectPositiveData
Ühe tarbijakrediidi andmete kustutamine.
Päringu sõnum
Vastuse sõnum
uploadPositiveDataMtom
Kõigi kehtivate tarbijakrediitide andmete sisseimportimine.
Päringu sõnum
Päringu sõnum on MTOM/XOP formaadis, mis vastab SOAP multipart/related standardile. Sõnumi esimeses osas on SOAP ümbrik. Sõnumi teises osas on gzip-ga kokkupakkitud ja seejärel base64-ga kodeeritud tarbijakrediitide andmetega xml, mis vastab skeemile http://www.krediidiinfo.ee/schemas/positive_register/data_exchange.xsd.
SOAP ümbriku parameetrid on:
Näitepäring:
...Teised päised 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:ns1="urn:kri6" xmlns:xrd="http://x-road.eu/xsd/xroad.xsd" xmlns:id="http://x-road.eu/xsd/identifiers" xmlns:inc="http://www.w3.org/2004/08/xop/include"> <SOAP-ENV:Header> <xrd:client id:objectType="MEMBER"> <id:xRoadInstance>EE</id:xRoadInstance> <id:memberClass>XX</id:memberClass> <id:memberCode>00000000</id:memberCode> </xrd:client> <xrd:service id:objectType="SERVICE"> <id:xRoadInstance>EE</id:xRoadInstance> <id:memberClass>XX</id:memberClass> <id:memberCode>10256137</id:memberCode> <id:serviceCode>uploadPositiveDataMtom</id:serviceCode> <id:serviceVersion>v1</id:serviceVersion> </xrd:service> <xrd:id>4894e35d-bf0f-44a6-867a-8e51f1daa7e0</xrd:id> <xrd:userId>EE00000000000</xrd:userId> <xrd:protocolVersion>4.0</xrd:protocolVersion> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:uploadPositiveDataMtom> <positive_data> <inc:Include href="cid:xxx"/> </positive_data> </ns1:uploadPositiveDataMtom> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --MIME_boundary Content-Type: application/octet-stream Content-Transfer-Encoding: base64 Content-ID: <xxx> Content-Disposition: attachment; ZZZ --MIME_boundary--
Vastuse sõnum
uploadPositiveDataStatus
Üleslaetud kõigi kehtivate tarbijakrediitide andmete alusel tekitatud faili töötlemise staatuse pärimine.
Päringu sõnum
Vastuse sõnum
Veakoodid
X | Request failed |
Päringu tegemine ebaõnnestus | |
X | Access denied |
Puudub liigipääs süsteemile | |
X | Partial members |
Päring sisaldab mitte kõiki Osalejate Andmekogudest Andmeid. Veakirjelduses on toodud Osalejate arv, kelle andmekogudest Andmete pärimine ebaõnnestus. |