SMS Templates - Retrieve Information
Retrieves information about an existing SMS tempalte.
The data to be submitted to the API is composed of the following fields:
|
|
field |
|
Example |
|
Note |
|
|
|
API |
|
1.5 |
|
Required |
|
|
|
user_id |
|
john1970 |
|
Required |
|
|
|
user_api_key |
|
1959ca5645adac9b13dcb3 |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
type |
|
manage_sms_templates |
|
Required |
|
|
|
action |
|
info |
|
Required |
|
|
|
template_id |
|
1 |
|
Required |
|
|
|
|
|
|
|
|
|
|
|
Output Format: |
|
|
|
output |
|
JSON or XML |
|
Optional. If not provided, defaults to XML |
|
|
|
callback |
|
someFunctionName |
|
Optional: JSONP format |
|
|
|
condensed |
|
yes |
|
Optional (No white space) Applies only to JSON(P) output |
|
|
|
|
|
|
|
|
|
Example PHP Request:
If you are using PHP, the $data array would look like this:
- $data['user_id'] = 'john1970';
- $data['user_password'] = '1959caadac9b13dcb3';
- $data['type'] = 'manage_sms_templates';
- $data['action'] = 'info';
- $data['account_id'] = 'greatwidgets';
Success XML Response
- <response status="success">
- <template>
- <account_id>greatwidgets</account_id>
- <template_id>2</template_id>
- <template_name>SMS Points Earned</template_name>
- <campaign_id>1111222233334444</campaign_id>
- <template_rule>record</template_rule>
- <sms_body>Congratulations! You have earned more points!</sms_body>
- <include_balance>Y</include_balance>
- </template>
- </response>
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|