Welcome‎ > ‎

Version 1

Common Tasks

Show a list of offers

Show a list of segments

Authentication
Some method calls are limited by an api key. The system returns an HTTP status code of 401 in cases where the call is refused due to authorization. The apiKey is passed as a querystring parameter

Querystring request example
curl -d '...' http://url/api/v1/offers?apiKey=594b797c7af64b518928dae141be2f56

Rate Limits
Some method calls are limited by requests/second/IP. The system returns an HTTP status code of 409 in cases where the call is refused due to rate limiting. 

Supported Formats

Response formats

JSON and XML formats are supported by the api.
JSON is the default format unless the Request.ContentType is set to "aplication/xml" or a format="xml" parameter is passed.
Error Handling HTTP error codes will be returned in response headers. Additionally, while receiving an HTTP status code of 200 the developer should inspect the response for the inclusion of an error node. The response may contain an error code and error message if there was an issue with the operation.

Querystring request example
curl -d '...' http://url/api/v1/offers?format=xml

Dates & Times
Dates in the api will use the ISO 8601 format. Unless otherwise stated all datetimes will be provided in UTC.

Examples:
2010-06-11T05:00:00 (date time)
2010-06-14 (date)

Currency
Money in the api will will be provided to two decimal places. Pricing information will include a currency field using the ISO 4217 format. The decimal place will always be indicated by a period('.') regardless of currency or culture. 

Examples:
{Currency : "USD", Price: 5.00}

Versioning
Versions of the api will be accessible via a version number embedded in the url. Versions will increment by whole numbers,

Example:
http://example.com/api/v1/offers/search
http://example.com/api/v2/offers/

Last updated: 1/8/2011
Subpages (2): Offer Api Segment Api
Comments