The Sandbox enviroment is a test enviroment that does not affect the live Tradera.com site.
Here you can create items/auctions and users without worrying about users bidding on your
test auctions.
In the Developer Center you can administrate users,
and bid on your own auctions.
To enable the Sandbox enviroment for an API call, use either "sandbox=1" on the query string,
or the ConfigurationHeader SOAP header (see for example the custom SOAP request for
AddItem).
Sample Sandbox call (in C#)
01: [STAThread]
02: static void Main(string[] args) {
03:
04: try {
05: string appId = "yourAppId"; // Use your application Id
06: string appServiceKey = "yourAppServiceKey"; // Use your application service key
07:
08: Tradera.Api.PublicService publicService = new Tradera.Api.PublicService();
09: publicService.Url += string.Format("?appId={0}&appKey={1}&sandbox=1",
10: appId, appServiceKey);
11:
12: DateTime officalTraderaTime = publicService.GetOfficalTime();
13:
14: Console.WriteLine("The offical Tradera time is: {0}", officalTraderaTime);
15: Console.ReadLine();
16:
17: } catch(Exception exception) {
18:
19: Console.WriteLine("Error: {0}", exception.Message);
20: Console.WriteLine(exception.StackTrace);
21: Console.ReadLine();
22: }
23: }
To call a RestrictedService method in the Sandbox environment, you need a Sandbox token. To create one,
first create a Sandbox user in the Developer Center. Then, call the tokenlogin page (see
Using the Restricted Service for instructions), but
add "sandbox=1" to the query-string.
Example:
http://api.tradera.com/tokenlogin.aspx?appId=XX&pkey=YY&skey=ZZ&sandbox=1
You can then use the FetchToken method (remember to use "sandbox=1" or the
ConfigurationHeader!) to get the Sandbox token.
The Sandbox enviroment is reset whenever there is an important upgrade to the Tradera.com site that
needs to be reflected for test calls.