Getting Started

In order to use the API, one must first, if not already done, sign up in order to get an API key.
The API key will allow a user to access the different API methods and targets.

How to make a request

One must first select both the target and method to call.
Basically, in order to make a request, one must use the following url :
http://api.affiliation.placedesleads.com/apiV1/?api_key=[PARTNER_API_KEY]&target=[TARGET]&method=[METHOD]
	
Each method can have one or more mandatory parameters and one or more optional parameters.

Response format

All API responses are provided in JSON.
One part of the response has the key "request" that summarizes the elements received when the API was called.
Another part, under the key "response", contains the data returned by the method called.
As an example, here is a sample reponse :
{
  "request": {
    "url": "/apiV1/?api_key=API_KEY_PROVIDED&target=DisplayReporting&method=getCampaignReporting&idCampaign=XXXX",
    "parameters": {
      "version": "V1",
      "api_key": "API_KEY_PROVIDED",
      "target": "DisplayReporting",
      "method": "getCampaignReporting",
      "idCampaign": "XXXX"
    }
  },
  "response": {
    "data": {
      "volume": 0,
      "route_count": 0,
      "print_total_count": 0,
      "print_count": 0,
      "click_total_count": 0,
      "click_count": 0,
      "lead_count": 0,
      "action_count": 0
    }
  }
}