//[[restapi:start|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 { }
{base_url}/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 [[misc:otto|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 [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// |
| signature | The unique [[restapi:appx_ciphering#SHA256 - Cipher|SHA256]] signature for this call, it's involve all input parameters. To learn about generating the correct signature please visit our [[restapi:appx_call_ex|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 [[restapi:appx_resp_xml|Response XML Basics]] section if you want to learn more about the response parts.
getClientCredits
OKCompleted7059 credits >
As223sdadq8d8287v5v
== 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 { }
{base_url}/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 [[misc:otto|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 [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// |
| signature | The unique [[restapi:appx_ciphering#SHA256 - Cipher|SHA256]] signature for this call, it's involve all input parameters. To learn about generating the correct signature please visit our [[restapi:appx_call_ex|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 [[restapi:appx_resp_xml|Response XML Basics]] section if you want to learn more about the response parts.
getClientTransactions
OKCompleted1DEDUCT operationType >
2013-11-06T13:35:01.000-04:30America/CaracasAs223sdadq8d8287v5v500PURCHASE operationType >
2013-11-06T13:35:01.000-04:30America/CaracasAs223sdadq8d8287v5v
== 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 [[restapi:appx_date#date_format_-_pattern_letters|pattern letters]] quick reference |
| clientTransaction.timezone | Timezone used | Text |
| clientTransaction.clientId | The client identification | Text |