Versions Compared

Key

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

 

Add a number/numbers to a group (excluding 'merge' groups).

POST arguments

The following parameters should be used in a POST request:

Parameter Value
numbers

The MSISDN (mobile number) you wish to add, if you want to add more then one use a comma delimited list.

username

The username of the source/master account, for authentication. Not required if you use HTTP Basic Authentication instead.

password

The password of the source/master account, for authentication. Not required if you use HTTP Basic Authentication instead.

The following parameters are DEPRECATED in favour of specifying the group ID/name in the URL. You should NOT use them in any new code, and should remove them from any existing code:

Parameter

Value

id (DEPRECATED)

The unique ID of the group to add to.

OR you could previously use (now DEPRECATED):

Parameter

Value

name (DEPRECATED)

The name of the group to add to.

Example successful response body XML:

Code Block
themeRDark
languagexml
linenumberstrue
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE response PUBLIC
"-//textmarketer.co.uk//DTD Web Services REST 1.6//EN"
"http://api.textmarketer.co.uk/services/rest/DTD/group_post.dtd">
<response processed_date="2011-04-15T09:27:42+01:00">
<added quantity="1">
	<number>447777000001</number>
</added>
<stopped quantity="1">
	<number>447777000002</number>
</stopped>
<duplicates quantity="1">
	<number>447777000003</number>
</duplicates>
</response>

Response meanings:

XML tag/attributeMeaning
added

A list of numbers that were successfully added to the group.

stopped 

A list of numbers that were not added to the group because they were already present in a 'stop group'. A 'stop group' contains numbers that should not receive messages.

duplicates

A list of numbers that were not added to the group because they were already present in the group.

quantity

The count of numbers in the added, stopped or duplicates list.

number 

A mobile number that was added, stopped, or a duplicate. Note that this will always be in international format.

Specific errors:

CodeMeaning
0

The group ID or name was not specified or was invalid.

1DEPRECATED. A 404 status code is returned instead.
2No numbers were supplied for adding to the group.
3A number was not of a valid format.
4This service will not add to a merge group. Merge groups are not handled by this resource.
Note

A 404 status code is returned if the group specified does not exist.

DTD:

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