Authentication for the API is handled via an API Key obtained using the Accumulus administrative application. The API Key needs to be present in the Authorization header of the call. The example below illustrates this:
GET https://<server>/json/offers?skip=0&take=10 HTTP/1.1 Authorization: APIKEY 85890... Host: <server>
There are two types of API keys:
- Regular API Key. This key can be used with all API calls. It should not be embedded in a web page.
- Widget API Key. This key is only authorized to call a subset of the API calls consisting of: GetOffers, GetOffer, and Signup. It may be embedded in a web page.
Format
The API presents a RESTful interface which may be called using either XML or JSON notation. Calls to the API are of the form:
https://<server>/json/...
Server is the name of the server for either the production or sandbox environment. The example below requests the list of offers, up to a maximum of 10 using XML formatting.
https://api.accumulus.com/json/offers?skip=0&take=10