Tradenity Blog

Sun, Mar 10, 2019
  • developer
  • java
  • sdk
  • announcements

We are happy to announce the general availability of the Tradenity Java SDK in version 1.0 release. This new release corresponds to the Tradenity API V1 GA containing all the new resources and updates.

The SDK Java API was carefully designed to make accessing the Tradenity REST API a seamless experience to java programmers. It was designed to provide object oriented interface hiding all the http request/response details of the REST API. Robustness and ease of use are key factors making You can download it from our Maven repository (more details below). The reference documentation is available here.

Tradenity is a next generation eCommerce platform. A headless eCommerce backend that implement all the required features for a modern eCommerce solution. Exposing these functionality to developers via a simple yet powerful API. Tradenity taked eCommerce complexity out of the equation and let developers focus on innovating in their applications.


To use the Tradenity SDK, you must have:

  • Working Java development environment (currently JDK 1.7 is the only tested version, but Java 6 abd 8 should work).
  • Active account in Tradenity

API Reference

The reference documentation is available here.


The SDK is available through maven central, You can install it using any compatible tool.




compile com.tradenity:java-sdk:1.0.2


<dependency org="com.tradenity" name="java-sdk" rev="1.0.2"/>

Setup your credentials

First of all, you have to get API keys for your store, you can find it in your store Edit page. To get there navigate to the stores list page, click on the Edit button next to your store name, scroll down till you find the API Keys section.

Initialize the library

With the API key in hand, you can initialize the Tradenity client. Tradenity client needs the API key and an instance of SessionTokenStore which is an object that makes Tradenity session integrates with the web framework’s session mechanism. The Java SDK provide the interface and a default implementation suitable for single user application (such as android app). The Spring SDK extension provide implementation suitable for Spring and Grails. It’s easy to implement your own for other frameworks, It is a simple 3 method interface.

TradenityClient client = new TradenityClient('sk_xxxxxxxxxxxxxxxxxxx')

Make sure to replace the api keys with the ones for your store, otherwise you will get authentication error

Make your First call

The Tradenity SDK is organized into a group of model entitiy classes that corresponds to the REST API’s resources, each encapsulate the operation for a specific entity model, for example to perform operations related to the Brand resource you can use the corresponding tradenity.sdk.entities.Brand class.

Now, just call any method in your code.

BrandService brandService = new BrandService(client);
Brand brand = brandService.findById("1243-9786786-jhgjtu-789s6i");

Tutorials and sample applications

We provide 2 sample applications, actually it is the same application implemented using 2 frameworks: Spring MVC, and Grails.

Live demo

Camera store sample application live demo

Source code

You can find the code at github:

Camera store for spring mvc code.

Camera store for grails code.

Tutorials and guides

We also provide a detailed explanation of the code of these sample applications in the form of a step by step tutorials:

Camera store for spring mvc tutorial.

Camera store for grails tutorial.