KiCreditRiskManagement en
Jump to navigation
Jump to search
eesti keeles |
Introduction
KiCreditRiskManagement is the name of a Credit Risk Management Web Service based on SOAP protocol. The service - http://www.krediidiinfo.ee/index.php?m=49
WSDL
KiCreditRiskManagement WSDL is located at http://services.krediidiinfo.ee/KiCreditRiskManagement.wsdl.
Methods
start
Adding company into Credit Risk Management.
Name | Type | Description | |
---|---|---|---|
Input parameter: | regCode | xs:string | Company’s registry code. |
Output parameter: | resultCode | xs:int | The value is 0, if the request succeeds. If the value is negative, then it is an error code. Possible values of error codes. |
end
Ending company's credit risk management.
Name | Type | Description | |
---|---|---|---|
Input parameter: | regCode | xs:string | Ettevõtte registrikood. |
Output parameter: | resultCode | xs:int | The value is 0, if the request succeeds. If the value is negative, then it is an error code. Possible values of error codes. |
getCreditRiskData
Requesting company's basic data and events.
Name | Type | Description | |
---|---|---|---|
Input parameter: | regCode | xs:string | Ettevõtte registrikood. |
Output parameter: | xml | xs:string | Response in XML format. XML layout is located at http://www.krediidiinfo.ee/schemas/services/KiCreditRiskManagement__getCreditRiskData.xsd. See an example: KiCreditRiskManagement__getCreditRiskData.xml. An empty tag company will be given in XML, if the requested company does not exist in the credit management database |
getEvents
Requesting events in certain period of time.
Name | Type | Description | |
---|---|---|---|
Input parameter: | begin | xs:date | Start date (incl), from which the events are requested. |
end | xs:date | End date (incl), until the events are requested. | |
Output parameter: | xml | xs:string | Response in XML format. XML layout is located at http://www.krediidiinfo.ee/schemas/services/KiCreditRiskManagement__getEvents.xsd. See an example: KiCreditRiskManagement__getEvents.xml. If the requested company is not under credit risk management then a) Reminder Management events are given in XML if the company is under Reminder Management b) An empty tag event will be given in XML, if the requested company does not exist in the Reminder Management database. |
Error codes
-20400 UNKNOWN
Unknown error
-20401 INVALID_REGCODE
Invalid registry code
-20402 SERVICE_ALREADY_ACTIVE
The company is already in credit risk management.
-20403 SERVICE_INACTIVE
The company is not in credit risk management.
-20404 LONG_PERIOD
Requested period of time is too long.
Arendamine
Liidese integreerimiseks vajaliku arenduse jaoks on tehtud näidiskasutaja:
- Autentimise meetod: Basic Authentication
- Kasutajanimi: 30546
- Parool: soapdemo
Näide PHP-s
<?php /** * Example of using Krediidiinfo AS SOAP interface KiCreditRiskManagement. * * In this example the demo username and password is used so there is no need * to contact with Krediidiinfo AS in order to run this program. * * @link http://services.krediidiinfo.ee/wiki/index.php/KiCreditRiskManagement * @author Julia Parkkonen <julia.parkkonen@krediidiinfo.ee> * @created 04.06.2013 */ $wsdl_url = 'http://services.krediidiinfo.ee/KiCreditRiskManagement.wsdl'; $params = array('location' => 'https://services.krediidiinfo.ee/soap.php?name=KiCreditRiskManagement' , 'login' => '30546' // <-- username. Make sure username is string type (PHP bug?). , 'password' => 'soapdemo' // <-- password ); $client = new SoapClient($wsdl_url, $params); $regCode = '10256137'; $resultCode = $client->start($regCode); if ($resultCode == 0) { echo "Ettevõte lisatud krediidiriskide jälgimise alla!"; } $xml = $client->getCreditRiskData($regCode); echo $xml; $resultCode = $client->end($regCode); if ($resultCode == 0) { echo "Ettevõte krediidiriskide jälgimine on lõpetatud!"; } $xml = $client->getEvents('2013-01-01', '2013-01-07'); echo $xml; ?>