logo   HOME

Email Contacts

This page lists the optional parameters, request data and reponse in xml

Retrieve contact information [HTTP GET]

https://appapi.dlangemobile.com/xml/emailcontacts/{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

<EmailContact>
  <ID>1</ID>
  <EmailAddress>contact@domain.com</EmailAddress>
  <FirstName>Test</FirstName>
  <LastName>Contact</LastName>
  <OptedOut>false</OptedOut>
</EmailContact>

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/emailcontacts/{api_key}/{contact_id}

URL Parameters

  • api_key (Required) - Your API application key.
  • contact_id (Required) - ID of contact to retrieve data.

Request Notes

  • EmailAddress - Contact email address.
  • FirstName - Contact first name. Max number of characters is 50.
  • LastName - Contact last name. Max number of characters is 50.

Example XML Request

<EmailContact>
  <EmailAddress>contact@domain.com</EmailAddress>
  <FirstName>New</FirstName>
  <LastName>Contact</LastName>
</EmailContact>

Response Notes

Returns the updated contact if successful.

Example XML Response

<EmailContact>
  <ID>1</ID>
  <EmailAddress>contact@domain.com</EmailAddress>
  <FirstName>New</FirstName>
  <LastName>Contact</LastName>
</EmailContact>

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 email address.
  • 105 - Invalid email address 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 - Email address already exists. App does not accept duplicate email addresses.

Delete contact [HTTP DELETE]

https://appapi.dlangemobile.com/xml/emailcontacts/{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.