Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Delete a previously scheduled text message, provided that it hasn't been sent yet.

The DELETE request should be sent to the Resource URL in the following format:

Panel

http://api.textmarketer.co.uk/services/rest/sms/<scheduledID>

 

e.g. for a scheduled message with ID '101', the URL would be:

Panel

http://api.textmarketer.co.uk/services/rest/sms/101

 

Example successful response body XML:

Code Block
themeRDark
languagexml
linenumberstrue
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE response PUBLIC
"-//textmarketer.biz//DTD Web Services REST 1.6//EN"
"http://api.textmarketer.co.uk/services/rest/DTD/sms_delete.dtd">
<response processed_date="2013-07-15T15:14:18+01:00">
	<scheduled_id>101</scheduled_id>
	<status>DELETED</status>
</response>

Response meanings:

XML tag/attributeMeaning
scheduled_id 

The Unique ID of the scheduled message that was deleted.

status The status of the message, i.e., DELETED.

Specifc specific errors:

CodeMeaning
35The provided Resource ID is not valid or is malformed.
36

This can have multiple meanings: either 1) the scheduled message id doesn't exist or belongs to other account than the one using the REST API; or 2) the scheduled message has already been sent and, as so, can't be deleted.

Example error response body XML:

Code Block
themeRDark
languagexml
linenumberstrue
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE response PUBLIC
"-//textmarketer.biz//DTD Web Services REST 1.6//EN"
"http://api.textmarketer.co.uk/services/rest/DTD/errors.dtd">
<response processed_date="2013-07-15T15:35:56+01:00">
<errors>
	<error code="36">Scheduled message with id: 101 doesn't exist or has already 

been delivered.</error>
</errors>
</response>

DTD for sms DELETE:

Code Block
themeRDark
languagexml
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>
<!--
	 PUBLIC ID : -//textmarketer.biz//DTD Web Services REST 1.6//EN
	 SYSTEM ID : http:/api.textmarketer.co.uk/services/rest/DTD/sms_delete.dtd
-->
<!ELEMENT response (scheduled_id, status)>
<!ATTLIST response
	 processed_date CDATA #REQUIRED
>
<!ELEMENT scheduled_id (#PCDATA)>
<!ELEMENT status (#PCDATA)>