//[[restapi:start|RESTful API]]//
====== Get Template SMS ======
==== Overview ====
Retrieve a template.
==== URL ====
Http access method: GET
Parameters on the following URL are inside braces { }
{base_url}/rest/api/template/{instanceId}/{templateB64}/{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// |
| templateB64 | Template's id/name in [[restapi:appx_ciphering|Base64 encoded]] |
| 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 is a JSON Object as follows
{
"template": "This is a test",
"name": "Test Template",
"useUrlShortener": false,
"placeholders": ["name", "city"],
"textType": "",
"type": 0,
"templateId": 8
}
== Result parameters ==
^ Parameter Name ^ Description ^ Possible Values ^
| template | Text of the template | Text |
| name | The name of the template | Text |
| useUrlShortener | true if this template will use the url shortener | Boolean |
| placeholders | List of parameters to be found on the text field | Number |
| textType | Text when the template's type is 2 | Text |
| type | [[:templates#type_options|Template's types]] | Number |
| templateId | Template's id | Number |