Contacts
This page lists the optional parameters, request data and reponse in xml
Retrieve contact information [HTTP GET]
https://appapi.dlangemobile.com/xml/contacts/{api_key}/{contact_id}
URL Parameters
- api_key (Required) - Your API application key.
- contact_id (Required) - ID of contact to retrieve data.
Response Notes
- ID - Used to update, delete and get contact groups
Example XML Response
<Contact>
<ID>1</ID>
<PhoneNumber>+1234567890</PhoneNumber>
<FirstName>Test</FirstName>
<LastName>Contact</LastName>
<OptedOut>false</OptedOut>
</Contact>
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.
Update contact information [HTTP PUT]
https://appapi.dlangemobile.com/xml/contacts/{api_key}/{contact_id}
URL Parameters
- api_key (Required) - Your API application key.
- contact_id (Required) - ID of contact to retrieve data.
Request Notes
- PhoneNumber - phone number with country code
- FirstName - Contact first name. Max number of characters is 50.
- LastName - Contact last name. Max number of characters is 50.
Example XML Request
<Contact>
<PhoneNumber>+1234567890</PhoneNumber>
<FirstName>New</FirstName>
<LastName>Contact</LastName>
</Contact>
Response Notes
Returns the updated contact if successful.
Example XML Response
<Contact>
<ID>1</ID>
<PhoneNumber>+1234567890</PhoneNumber>
<FirstName>New</FirstName>
<LastName>Contact</LastName>
</Contact>
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.
- 110 - Provide valid contact info. Request XML is invalid or not passed as post data.
- 104 - Provide a phone number.
- 105 - Invalid phone number format. Should contain 10-digit number for US numbers.
- 106 - Invalid first name. Max number of characters allowed is 50.
- 107 - Invalid last name. Max number of characters allowed is 50.
- 108 - Phone number already exists. App does not accept duplicate phone numbers.
Opt In a contact [HTTP PUT]
https://appapi.dlangemobile.com/xml/contacts/{api_key}/optin
URL Parameters
- api_key (Required) - Your API application key.
Request Notes
- PhoneNumber - phone number with country code
Example XML Request
<Contact>
<PhoneNumber>+1234567890</PhoneNumber>
</Contact>
Response Notes
Returns HTTP Status 200 if successful; otherwise, returns an error with code and description.
Error Codes
- 001 - API key is required.
- 002 - Invalid API key.
- 110 - Provide valid contact info. Request XML is invalid.
- 104 - Provide a phone number.
- 105 - Invalid phone number format. Should contain 10-digit number for US numbers.
- 114 - Invalid contact phone number. This number does not exist in your contacts list.
Opt Out a contact [HTTP PUT]
https://appapi.dlangemobile.com/xml/contacts/{api_key}/optout
URL Parameters
- api_key (Required) - Your API application key.
Request Notes
- PhoneNumber - phone number with country code
Example XML Request
<Contact>
<PhoneNumber>+1234567890</PhoneNumber>
</Contact>
Response Notes
Returns HTTP Status 200 if successful; otherwise, returns an error with code and description.
Error Codes
- 001 - API key is required.
- 002 - Invalid API key.
- 110 - Provide valid contact info. Request XML is invalid.
- 104 - Provide a phone number.
- 105 - Invalid phone number format. Should contain 10-digit number for US numbers.
- 114 - Invalid contact phone number. This number does not exist in your contacts list.
Delete contact [HTTP DELETE]
https://appapi.dlangemobile.com/xml/contacts/{api_key}/{contact_id}
URL Parameters
- api_key (Required) - Your API application key.
- contact_id (Required) - ID of contact to delete.
Response Notes
Returns status code 200 if successful. Otherwise returns error code.
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.