RESTful API

Retrieve Client's Credits

Overview

Clients will require credits to send messages. Every message (regardless the channel) cost 1 credit. Use this method to see how many credits a client currently have.

URL

Parameters on the following URL are inside braces { }

https://www.messangi.com/messangi_mmc/rest/api/tools/getClientCredits/{instanceId}/{publicKey}/{signature}
Parameter Name Description
instanceId An instance id is the workspace identification number, if you don't know yours please request it using our ticketing tool, you will need to provide your Mobile Engagement Campaign Manager's URL and your user login
publicKey The public key to access this API. if you don't know yours please request it using our ticketing tool, you will need to provide your Mobile Engagement Campaign Manager's URL and your user login
signature The unique SHA256 signature for this call, it's involve all input parameters. To learn about generating the correct signature please visit our Java Example

Response

The Response XML is divided in a static part and a dynamic one, we call it dynamic because it will vary depending on the method you invoke. Please read our Response XML Basics section if you want to learn more about the response parts.

<input>getClientCredits</input>
<status>OK</status>
<description>Completed</description>
<result>
	<clientCredits>
		<credits>7059</ credits >
		<clientId>As223sdadq8d8287v5v</clientId>
	</clientCredits>
</result>
Result parameters
Parameter Name Description Possible Values
credits The available credit count at the moment Number
clientId The client's Id Text

Retrieve Client's Transactions

Overview

A transaction is a credit operation, related to a purchase or expense. This method will list all your transactions.

URL

Parameters on the following URL are inside braces { }

https://www.messangi.com/messangi_mmc/rest/api/tools/getClientTransactions/{instanceId}/{publicKey}/{signature}
Parameter Name Description
instanceId An instance id is the workspace identification number, if you don't know yours please request it using our ticketing tool, you will need to provide your Mobile Engagement Campaign Manager's URL and your user login
publicKey The public key to access this API. if you don't know yours please request it using our ticketing tool, you will need to provide your Mobile Engagement Campaign Manager's URL and your user login
signature The unique SHA256 signature for this call, it's involve all input parameters. To learn about generating the correct signature please visit our Java Example

Response

The Response XML is divided in a static part and a dynamic one, we call it dynamic because it will vary depending on the method you invoke. Please read our Response XML Basics section if you want to learn more about the response parts.

<input>getClientTransactions</input>
<status>OK</status>
<description>Completed</description>
<result>
	<clientTransactions>
		<clientTransaction>
			<amount>1</amount>
			<operationType>DEDUCT</ operationType >
			<date>2013-11-06T13:35:01.000-04:30</date>
			<timezone>America/Caracas</timezone>
			<clientId>As223sdadq8d8287v5v</clientId>
		</clientTransaction>
		<clientTransaction>
			<amount>500</amount>
			<operationType>PURCHASE</ operationType >
			<date>2013-11-06T13:35:01.000-04:30</date>
			<timezone>America/Caracas</timezone>
			<clientId>As223sdadq8d8287v5v</clientId>
		</clientTransaction>		  
	</clientTransactions>
</result>
Result parameters
Parameter Name Description Possible Values
clientTransaction.amount The transaction's amount. Number
clientTransaction.operationType Operation type. PURCHASE / DEDUCT
clientTransaction.date Time mark at the origination moment A formatted date string: yyyy-MM-dd'T'HH:mm:ss.SSSZZ
For more information please review the pattern letters quick reference
clientTransaction.timezone Timezone used Text
clientTransaction.clientId The client identification Text