KiCreditRiskManagement en: Difference between revisions
(→end) |
(→end) |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 42: | Line 42: | ||
== ''end'' == | == ''end'' == | ||
Ending company's credit risk management. | Ending company's credit risk management. The end date of the service is set to the last day of the following month, if the service has been started in the current month, and in the case of a previously started service, the last day of the current month. | ||
Line 81: | Line 81: | ||
| xml | | xml | ||
| xs:string | | xs:string | ||
| Response in XML format. XML | | Response in XML format. XML schema is located at [http://www.krediidiinfo.ee/schemas/services/KiCreditRiskManagement__getCreditRiskData.xsd http://www.krediidiinfo.ee/schemas/services/KiCreditRiskManagement__getCreditRiskData.xsd]. See an example: [http://www.krediidiinfo.ee/schemas/services/KiCreditRiskManagement__getCreditRiskData.xml 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'' == | == ''getEvents'' == | ||
Requesting events in certain period of time. | Requesting events in certain period of time (max 30 days). | ||
Line 108: | Line 108: | ||
| xml | | xml | ||
| xs:string | | xs:string | ||
| Response in XML format. XML | | Response in XML format. XML schema is located at [http://www.krediidiinfo.ee/schemas/services/KiCreditRiskManagement__getEvents.xsd http://www.krediidiinfo.ee/schemas/services/KiCreditRiskManagement__getEvents.xsd]. See an example: [http://www.krediidiinfo.ee/schemas/services/KiCreditRiskManagement__getEvents.xml KiCreditRiskManagement__getEvents.xml]. | ||
|} | |} | ||
Line 152: | Line 152: | ||
<?php | <?php | ||
/** | /** | ||
* Example of using | * Example of using Creditinfo Eesti AS SOAP interface KiCreditRiskManagement. | ||
* | * | ||
* In this example the demo username and password is used so there is no need | * In this example the demo username and password is used so there is no need | ||
* to contact with | * to contact with Creditinfo Eesti AS in order to run this program. | ||
* | * | ||
* @link http://services.krediidiinfo.ee/wiki/index.php/KiCreditRiskManagement | * @link http://services.krediidiinfo.ee/wiki/index.php/KiCreditRiskManagement | ||
* @author Julia Parkkonen <julia.parkkonen@ | * @author Julia Parkkonen <julia.parkkonen@creditinfo.ee> | ||
* @created 04.06.2013 | * @created 04.06.2013 | ||
*/ | */ | ||
Line 172: | Line 172: | ||
$resultCode = $client->start($regCode); | $resultCode = $client->start($regCode); | ||
if ($resultCode == 0) { | if ($resultCode == 0) { | ||
echo " | echo "Company is added into credit risk management!"; | ||
} | } | ||
Line 182: | Line 182: | ||
$resultCode = $client->end($regCode); | $resultCode = $client->end($regCode); | ||
if ($resultCode == 0) { | if ($resultCode == 0) { | ||
echo " | echo "Company's credit risk management is ended!"; | ||
} | } | ||
Latest revision as of 08:25, 1 December 2023
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. The end date of the service is set to the last day of the following month, if the service has been started in the current month, and in the case of a previously started service, the last day of the current month.
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. |
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 schema 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 (max 30 days).
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 schema is located at http://www.krediidiinfo.ee/schemas/services/KiCreditRiskManagement__getEvents.xsd. See an example: KiCreditRiskManagement__getEvents.xml. |
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.
Developing
Sample user is made for integrating the service:
- Method of authentication: Basic Authentication
- Username: 30546
- Password: soapdemo
Example in PHP
<?php /** * Example of using Creditinfo Eesti AS SOAP interface KiCreditRiskManagement. * * In this example the demo username and password is used so there is no need * to contact with Creditinfo Eesti AS in order to run this program. * * @link http://services.krediidiinfo.ee/wiki/index.php/KiCreditRiskManagement * @author Julia Parkkonen <julia.parkkonen@creditinfo.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 "Company is added into credit risk management!"; } $xml = $client->getCreditRiskData($regCode); echo $xml; $resultCode = $client->end($regCode); if ($resultCode == 0) { echo "Company's credit risk management is ended!"; } $xml = $client->getEvents('2013-01-01', '2013-01-07'); echo $xml; ?>