Groups
This page lists the optional parameters, request data and reponse in xml
Assign contact to group [HTTP PUT]
https://appapi.dlangemobile.com/xml/groups/{api_key}/{group_id}/contacts/{contact_id}
URL Parameters
- api_key (Required) - Your API application key.
- group_id (Required) - ID of group.
- contact_id (Required) - Contact ID to assign to group.
Response Notes
Returns a list of all contacts assigned to the contact including the contact ID if successful.
Example XML Response
<Contacts>
<Contact>
<ID>1</ID>
<PhoneNumber>+12345678903</PhoneNumber>
<FirstName>Test</FirstName>
<LastName>Contact 1</LastName>
</Contact>
<Contact>
<ID>2</ID>
<PhoneNumber>+12345678901</PhoneNumber>
<FirstName>Test</FirstName>
<LastName>Contact 2</LastName>
</Contact>
</Contacts>
Error Codes
- 001 - API key is required.
- 002 - Invalid API key.
- 101 - Define a valid Contact ID.
- 102 - Invalid Contact ID format. Contact ID should be an integer.
- 103 - Contact not found. Please provide a valid Contact ID.
- 201 - Define a valid Group ID.
- 202 - Invalid Group ID format. Group ID should be an integer.
- 203 - Group not found. Please provide a valid Group ID.
Remove contact from group [HTTP DELETE]
https://appapi.dlangemobile.com/xml/groups/{api_key}/{group_id}/contacts/{contact_id}
URL Parameters
- api_key (Required) - Your API application key.
- group_id (Required) - ID of group.
- contact_id (Required) - ID of contact to remove from group.
Response Notes
Returns a list of all contacts assigned to the group including the contact ID if successful.
Example XML Response
<Contacts>
<Contact>
<ID>1</ID>
<PhoneNumber>+12345678904</PhoneNumber>
<FirstName>Test</FirstName>
<LastName>Contact 1</LastName>
</Contact>
<Contact>
<ID>2</ID>
<PhoneNumber>+12345678901</PhoneNumber>
<FirstName>Test</FirstName>
<LastName>Contact 2</LastName>
</Contact>
</Contacts>
Error Codes
- 001 - API key is required.
- 002 - Invalid API key.
- 101 - Define a valid Contact ID.
- 102 - Invalid Contact ID format. Contact ID should be an integer.
- 103 - Contact not found. Please provide a valid Contact ID.
- 201 - Define a valid Group ID.
- 202 - Invalid Group ID format. Group ID should be an integer.
- 203 - Group not found. Please provide a valid Group ID.