Signup Login

XML and JSON REST API Overview

We offer an easy to use XML and JSON API. Requests may be made via POST or GET. The response is XML by default; adding the parameter output=json returns a JSON response. The XML and JSON API is available at:-

http://t2a.co/rest

The default XML response is shown below. Note the status and error code:-


<?xml version="1.0"?>
<T2A_Result>
  <mode>normal</mode>
  <status>error</status>
  <error_code>missing_method</error_code>
  <t2a_version_number>2.6.0.1</t2a_version_number>
</T2A_Result>	
	

The default JSON response is shown below:-

{
  "mode":"normal",
  "status":"error",
  "error_code":"missing_method",
  "t2a_version_number":"2.6.0.1"
}
	

You can optionally specify a JSONP padding callback function in which the JSON is to be wrapped; the use of the parameter and values callback=myPadding is shown below:-

myPadding({
  "mode":"normal",
  "status":"error",
  "error_code":"missing_method",
  "t2a_version_number":"2.6.0.1"
});
	

Next: URL Encoding a GET Request