Exploring the Tradeshift REST API

October 3rd, 2011 by Joakim Recht
Tradeshift has a quite extensive API for external developers, which can be used to do any kind of integration or 3rd party processing of documents and network events. The API is accessed using standard REST and OAuth, which is available on a number of platform as standard libraries. However, getting started can be somewhat cumbersome, so we've added two new components to help new developers:
  • The "API access to own Account" app. When you install this app, you get all the necessary OAuth parameters needed to set up a REST client supporting OAuth. For production-grade integrations, you should create your own app, but you can use this app to get started.
  • The REST API Explorer app. This app is a desktop client which allows you to explore the REST API. Just install the "API access to own Account" app on any environment to get the necessary OAuth parameters and paste them into the explorer app. You can then request any URL on the API and see the raw requests and responses in different formats.
The source for the API explorer is available on Github, and the actual API documentation is available on our developer site.

OAuth access with consumer key and token

June 30th, 2011 by Jan Ypma
We are soon rolling out 3-legged OAuth signing for all API users. This means that you can now maintain a more secure token and token secret for each user individually, rather than just a consumer key and consumer secret which can be the same for all users. (more…)

Live, fluid RESTing with the Tradeshift API and Groovy (part 2)

June 3rd, 2011 by Jan Ypma
This is part 2 of a series of blog posts on how to work with the Tradeshift API interactively, and deals with documents. Please make sure your also check out part 1 on connections. (more…)

Live, fluid RESTing with the Tradeshift API and Groovy (part 1)

May 27th, 2011 by Jan Ypma
The advantage of having a REST API is that many actions can be readily performed with just a web-browser or a command-line HTTP tool like wget or curl. The authentication with OAuth complicates this somewhat, but that hurdle can be overcome. In this blog post, I'll give some tips on getting acquainted with the REST language that the Tradeshift API speaks.
This is part 1 of a 2-part series. Also check out part 2 on working with documents. (more…)

Storage refactored

May 2nd, 2011 by Jesper Moth

Just a heads up to inform you that the lib.ts.storage.getStorage method has been refactored NOT to take a callback function as argument. Storage data is now preloaded and made available directly when the components onload function gets invoked:

onload : function () {
    var storage = lib.ts.storage.getStorage (); // no async callback
    storage.setItem ( "mykey", "myvalue" );

Google Contacts – Updated

April 19th, 2011 by Jan Ypma
An update is available for the Google Contacts (addressbook) import App, to go along with the styling updates we've just deployed to our Sandbox environment. The new version includes the following updates:
  • Icon updates, in line with Google style.
  • The app now creates a button on the Network page, next to "Create manual contact". This will make the app easier to find.
  • Imported contact results are presented much nicer.
  • Javascript code cleanups.
Get it at GitHub right now, and be sure to check out the other example apps as well!

Dynamic manifest expansion

April 15th, 2011 by Jan Ypma

The syntax of using e.g. ${app.vendor_id}, has until now been limited to HTML sections of an App. In Javascript sections, you can use lib.ts.manifest instead. But what about in the manifest itself? There are several spots where it would make sense to dynamically look up information from the same manifest, e.g. for full-screen apps. This is now possible!


Get localized messages (and reflectively inspect the manifest of your app)

April 12th, 2011 by admin

Recent updates to the sandbox includes the ability to localize your apps, and to refelctively inspect the manifest of the app at runtime - enabling you to write less brittle code.


Cross-site user verification

April 12th, 2011 by Jan Ypma

Some Tradeshift App developers prefer to develop their apps on their own server, displaying them within Tradeshift as an IFRAME. This is possible by defining a component as "iframe" in the manifest. We can now securely pass the logged-in user to the IFRAME. This lessens the need for an App developer to write their own user login mechanism. (more…)

Integrating with Google Contacts

March 31st, 2011 by Jan Ypma

Combining several of the new features of the Tradeshift App platform, it is now possible to write an app that can synchronize your Google contacts into Tradeshift! In this blog post, I'll walk through the necessary components for this app. You can find the app on our Github repository.