We are happy to announce the general availability of the Tradenity Java SDK in version 0.8.0 release. 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.
To use the Tradenity SDK, you must have:
The reference documentation is available here.
The SDK is available through our maven repository, You can install it using any compatible tool.
<repository> <id>tradenity-public</id> <name>tradenity-public-releases</name> <url>http://artifacts.tradenity.com/artifactory/tradenity-release-public</url> </repository>
<dependency> <groupId>com.tradenity</groupId> <artifactId>java-sdk</artifactId> <version>0.8.0</version> </dependency>
<dependency org="com.tradenity" name="java-sdk" rev="0.8.0"/>
First of all, you have to get API keys for your store, you can find it in your store
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.
With the API key in hand, you can initialize the Tradenity client.
Tradenity client needs the API key and an instance of
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
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
Now, just call any method in your code.
Brand brand = brandService.findById("1243-9786786-jhgjtu-789s6i");
We provide 2 sample applications, actually it is the same application implemented using 2 frameworks:
Spring MVC, and
You can find the code at github:
We also provide a detailed explanation of the code of these sample applications in the form of a step by step tutorials: