User Tools

Site Tools


customermessage

CustomerMessage API

Web service address

Test web service address (for testing purposes) https://testapi.moneypolo.com:26443/CustomerMessage.asmx

Real web service address https://api.moneypolo.com:26442/CustomerMessage.asmx

Please note, that test and prod keys are different from each other. Working key will be issued by MoneyPolo company at the end of the testing period.

Security

Each transmitted request must be signed with a key. MoneyPolo issues a key for the merchant at the beginning of testing. When switching to the operating mode of the service the key is changed. MoneyPolo will distribute “keys” among their clients, which has to be transmitted to web service in parametrical form.

  1. To work with the API, merchant must assign a unique RUID identifier to each client that will be transmit to the appropriate Web service methods.
  2. When opening the account, receiving a card application, card or transaction status changing, etc., the MoneyPolo sends a letter to the Merchant Client’s e-mail, provided by Client during the account registration.
  3. Each request method should have Signature object:
Name Type Required Description
MerchantCode string * Merchants's code
Sign string * Signature

Each response method has ErrorResponse object:

Name Type Required Description
ErrorCode int * Error code or 0,- if the answer is without errors.
ErrorMessage string * Error description or empty line,- if the answer is without errors.

Rules for compiling signatures to a Web service request.

Each method has an object sign:

<sign>
  <MerchantCode>string</MerchantCode>
  <Sign>string</Sign>
</sign>
  • For the correct signature generation (Sign) the following is needed:
  • produce a concatenation of data, transferred to the method of service in request object, and Key.
  • apply to the result algorythm SHA512.
  • transfer the result to the upper case.



API methods list

API consists of following methods:

GetListOfMessages method

This method’s purpose is to show client messages.

Input parameters of the method are:

Name Type Required Example Description
PersonRUID string(20) * [0-9]{1,20} Client's RUID
ThreadID int * 125 Thread ID (*1)
DateBeg string(10) * “2016-10-01” Begin Date (*2)
DateEnd string(10) * “2016-10-01” End Date (*2)
MessageState string(10) “READ”/“UNREAD”/Empty Message State (*3)

Output parameters of the method are:

Name Type Description
MPCustomerMessage List of objects of type MPCustomerMessage See object MPCustomerMessage

MPCustomerMessage object:

Name Type Description
SenderRUID string Sender RUID
ReceiverRUID string Receiver RUID
MerchantCode string Merchant Code
MessageID int Message ID
Message string Message
ThreadID int Thread ID
Subject string Subject
IsDraft byte Message Is Draft
Deleted byte Message Is Deleted
MessageState string Message State
CreateDate string Create Date of Message

Method’s additional information:

  • (*1) If you fill ThreadID like 0 then method will return you all messages with all threads.
  • (*2) DateBeg and DateEnd means return messages for a range of dates. Day format will be YYYY-MM-DD.
  • (*3) If you fill MessageState like “” (empty) then method will return you all messages with all statuses.

Signature:

PersonRUID + ThreadID + DateBeg + DateEnd + MessageState + Key

PHP Example

//GetListOfMessages
$request = array();
$request['PersonRUID'] = '125';
$request['ThreadID'] = 0;
$request['DateBeg'] = '2016-10-01';
$request['DateEnd'] = '2016-10-05';
$request['MessageState'] = '';
 
if($wsRequest->Prepare_Data($request))
{
    $result = $wsRequest->Send('GetListOfMessages');
}


GetListOfThreads method

This method’s purpose is to show all client threads.

Input parameters of the method are:

Name Type Required Example Description
PersonRUID string(20) * [0-9]{1,20} Client's RUID

Output parameters of the method are:

Name Type Description
MPCustomerThreads List of objects of type MPCustomerThreads See object MPCustomerThreads

MPCustomerThreads object:

Name Type Description
ThreadID int Thread ID
Subject string Subject
CreateDate string Create Date of Message

Signature:

PersonRUID + Key

PHP Example

//GetListOfThreads
$request = array();
$request['PersonRUID'] = '125';
 
if($wsRequest->Prepare_Data($request))
{
    $result = $wsRequest->Send('GetListOfThreads');
}



AddMessage method

This method’s purpose is to add client messages.

Input parameters of the method are:

Name Type Required Example Description
SenderRUID string(20) * [0-9]{1,20} Sender Client's RUID
ReceiverRUID string(20) * [0-9]{1,20} Receiver Client's RUID
ThreadID int * 125 Thread ID (*1)
ThreadText string(255) * “POA has expired” Thread Text (*1)
MessageBody string(4000) * “Please load new POA” Message Body
MessageIsDraft byte * 1 or 0 Message Is Draft

Output parameters of the method are:

Name Type Description
Success bool Status of operation

Method’s additional information:

  • (*1) If you fill ThreadID like 0 and ThreadText <> “” (empty) new thread will be created. Or if you fill ThreadID like <> 0 then the message will be inserted into existing thread.

Signature:

SenderRUID + ReceiverRUID + ThreadID + ThreadText + MessageBody + MessageIsDraft + Key

PHP Example

//AddMessage
$request = array();
$request['SenderRUID'] = '125';
$request['RecieverRUID'] = '521';
$request['ThreadID'] = 0;
$request['ThreadText'] = 'POA has expired';
$request['MessageBody'] = 'Please load new POA';
$request['MessageIsDraft'] = 0;
 
if($wsRequest->Prepare_Data($request))
{
    $result = $wsRequest->Send('AddMessage');
}


EditMessage method

This method’s purpose is to edit client messages.

Input parameters of the method are:

Name Type Required Example Description
PersonRUID string(20) * [0-9]{1,20} Client's RUID
MessageID int * 574 Thread ID
MessageBody string(4000) * “Please load new POA” Message Body
MessageIsDraft byte * 1 or 0 Message Is Draft
MessageState string(10) * READ/UNREAD Message State

Output parameters of the method are:

Name Type Description
Success bool Status of operation

Method’s additional information:

  • When you edit a message you have to fill all parameters in request.

Signature:

SenderRUID + MessageID + MessageBody + MessageIsDraft + MessageState + Key

PHP Example

//EditMessage
$request = array();
$request['PersonRUID'] = '521';
$request['MessageID'] = 1;
$request['MessageBody'] = 'Please load new POA';
$request['MessageIsDraft'] = 0;
$request['MessageState'] = 'READ';
 
if($wsRequest->Prepare_Data($request))
{
    $result = $wsRequest->Send('EditMessage');
}


Errors

ID Description
-202 Invalid PersonRUID
-998 Internal Error
-4000 Failed to complete Get List Of Messages process
-4001 Failed to complete Edit Message
-4002 Invalid MessageID format
-4003 Invalid IsDraft format
-4004 Invalid Deleted format
-4005 Invalid MessageState format
-4006 Failed to complete Get List Of Threads process
-4007 Failed to complete Add Message process
-4008 Invalid ThreadID format
-4009 Invalid SenderID format
-4010 Invalid ReceiverRUID format
-4012 Invalid ThreadID format
-4013 Invalid MessageState format
-4014 Invalid DateBeg format
-4015 Invalid DateEnd format
customermessage.txt · Last modified: 2018/05/04 10:06 by Dmitry Tserashonak