Chris Hundley
posted this on July 13, 2011 09:34 am
Optify's application programming interface (API) allows your organization to expand upon the core functionality provided by Optify's Real Time marketing software. In particular, it allows external applications to retrieve data from Optify data interfaces, making integration with other software applications simple. This document is a reference for the Optify API. It includes information about:
Optify's API is only accessible to customers of Optify. In addition to an Optify account, API authentication token is required for access. Please send an email to info@optify.net to request your token.
The Optify API is built with standard REST conventions. Data is transferred in either Xml or Json over HTTPS.
The Optify API is located at https://api.optify.net
You must pass your API token with all requests. You can pass this in the URL or in a HTTP header. To include the token in a URL, use a query string parameter of the form “access_token=<your token>”. The HTTP header is the standard Authorization HTTP header. The full header is “Authorization: OAuth <your token>”. To confirm that an access token is valid you can use the “whoami” endpoint at the following URL:
This endpoint returns the name of the user associated with the access token or “nobody” if authentication is missing or invalid.
Optify returns objects as Xml or Json. The MIME type for responses depends on standard content negotiation techniques. The simplest method of requesting a specific content type is to provide an extension in the file segment of the request URL. For example, the URL https://api.optify.net/v1/sites.xml returns Xml. The URL https://api.optify.net/sites.json returns the same object encoded as Json. Alternately you can specify the MIME type using the “Accept” HTTP header. To request Xml specify use “Accept: text/xml”. For Json, “Accept: application/json”. The default MIME type if you do not request a specific type is Xml. If you include both an extension and an Accept header, the extension overrides the Accept header. This documentation generally details the Xml version of response payloads. The content in the Json embodiment of objects generally mirrors the Xml embodiment. Differences follow a specific set of conventions:
All input and output to Optify’s API is UTF-8. No other character encodings are supported. International characters in URLs should be encoded as URL escaped UTF-8.
To protect Optify’s servers, some API calls are metered. Very high volumes of calls associated with an account may trigger throttling. If you receive an HTTP 503 status code your request has been throttled. Throttling applies to a single IP address and, if applicable, to the account associated with the access token. If your application depends on a high volume of API requests and you are being throttled, please contact Optify support to request a higher limit.