You make requests to the API by issuing HTTP calls to an API URL in your arpReach system. This will be your base URL followed by /api.
The examples shown are for an installation where arpReach is installed in directory “a” of domain “example.com”.

API Functions

The API provides various functions such as add contact, get contact details and remove a contact from a list. The function is set in the second segment of the URI to the API, after the /api part.

Examples

http://example.com/a.php/api/add_contact/xml
http://example.com/a.php/api/add_contact/json

Response Formats

The arpReach API delivers responses in JSON or XML format. The default response format is JSON. To set the response format for any call to the API, add /xml or /json to your request URL after the function part of the URL.

Examples

In the following example, the response will default to JSON as no format is specified in the URL.

http://example.com/a.php/api/add_contact

Passing Parameters:

Parameters: are passed as GET or POST data.
Your request MUST include a parameter called “api_key” containing one of your arpReach system’s API keys. Calls to invalid or disabled API keys will be rejected with an error response. Most functions need other Parameters:, these are detailed below.

To pass Parameters: via GET, add them to the calling URL, for example

http://example.com/a.php/api/add_contact/xml?emailaddress=joe@bloggs.com&api_key=XYZ