API Documentation
Authentication
Every API request will require an API Key and Password. The API credentials need to be sent using HTTP Basic Authentication. As an added form of security, our system will also check the requesting IP address to make sure it matches the IP Address(es) set in your API account settings. The IP Address(es) can either be a single IP or an IP address range. We highly recommend using an SSL connection to prevent others from potentially confiscating your credentials.
Sandbox
There is a sandbox zone setup so you can test every request in our API without being charged. However, the sandbox will always return the same
result for each individual API request. The sandbox can be accessed by using the following URL (not available via SSL):
http://sandbox.emailonacid.com/analyticsV1/
RESTful
Our Analytic API uses the RESTful XML architecture. The system will only accept POST requests and must contain the following HTTP headers:
Accept: application/xml
Content-Type: application/xml
If those headers are not present, an error will be generated and sent as the response. Details on errors are described here.
Validation
Every API request will be validated against our .XSD file. If the request does not validate, an error will be generated and sent as the response. The .XSD file can be downloaded here.
API Error Codes
Our API will return an error (or exception) if something goes wrong in the processing or your request contains incomplete/invalid data.
Error Response:
<?xml version="1.0" encoding="utf-8"?>
<xml>
<error>
<error_type>EOAExcpetion:InvalidTestID</error_type>
<message>The test ID you have requested could not be found. It may be that the test does
exist but the account you're authenticating with does not have access to it.</message>
</error>
</xml>
Error Types and Messages:
Type | Message |
---|---|
EOAException:InvalidContentType |
Invalid Header Content-Type and Content-Accept values. These must both be present and set to application/xml. |
EOAException:InvalidXML |
Your POSTed XML failed to parse. Please check its validity. |
EOAException:InvalidXMLFormat |
The XML supplied did not validate against our XSD. Please review our XSD and update your XML accordingly. |
EOAException:NotImplemented |
You are attempting to request a resource that doesn't exist, or requesting an existing resource with an unsupported request method. |
EOAException:InvalidContent |
An error has occurred while loading your email content. It appears that all of your email content was removed after we ran it through our content filters. Please check your email content and try the test again. |
EOAException:NoCampaigns |
There are no campaigns for the supplied GUID. |
EOAException:ClickTrackingDisabled |
Click tracking is not enabled for this campaign. |
EOAException:AlreadyActive |
Campaign is already active. |
EOAException:NotActive |
Action cannot be applied to an inactive campaign. |
EOAException:ExpirationWithin30Days |
A campaign cannot expire within 30 days of its start date. |
EOAException:ExpirationExceeds3years |
Campaign cannot last more than 3 years from its start date. Please adjust the expiration date. |