All URLs are in the format:
https://api.jumpseller.com/v1/path.json?login=XXXXXX&authtoken=storetoken
The path is prefixed by the API version and the URL takes as parameters the login (your store specific API login) and your authentication token.
The current version of the API is v1.
If we change the API in backward-incompatible ways, we’ll increase the version number and maintain stable support for the old urls.
The API uses a token-based authentication with a combination of a login key and an auth token. Both parameters can be found on the left sidebar of the Account section, accessed from the main menu of your Admin Panel. The auth token of the user can be reset on the same page.
The auth token is a 32 characters string.
If you are developing a Jumpseller App, the authentication should be done using OAuth-2. Please read the article Build an App for more information.
To request all the products at your store, you would append the products index path to the base url to create an URL with the format:
https://api.jumpseller.com/v1/products.json?login=XXXXXX&authtoken=XXXXX
In curl, you can invoque that URL with:
curl -X GET "https://api.jumpseller.com/v1/products.json?login=XXXXXX&authtoken=XXXXX"
To create a product, you will include the JSON data and specify the MIME Type:
curl -X POST -d '{ "product" : {"name": "My new Product!", "price": 100} }' "https://api.jumpseller.com/v1/products.json?login=XXXXXX&authtoken=XXXXX" -H "Content-Type:application/json"
and to update the product identified with 123:
curl -X PUT -d '{ "product" : {"name": "My updated Product!", "price": 99} }' "https://api.jumpseller.com/v1/products/123.json?login=XXXXXX&authtoken=XXXXX" -H "Content-Type:application/json"
or delete it:
curl -X DELETE "https://api.jumpseller.com/v1/products/123.json?login=XXXXXX&authtoken=XXXXX" -H "Content-Type:application/json"
Create a new Product (POST method)
$url = 'https://api.jumpseller.com/v1/products.json?login=XXXXX&authtoken=XXXXX;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); //post method
curl_setopt($ch, CURLOPT_POSTFIELDS, '{ "product" : {"name": "My updated Product!", "price": 99} }');
$result = curl_exec($ch);
print_r($result);
curl_close($ch);
You can perform a maximum of:
If you exceed this limit, you’ll get a 403 Forbidden (Rate Limit Exceeded) response for subsequent requests.
The rate limits apply by IP address and by store. This means that multiple requests on different stores are not counted towards the same rate limit.
This limits are necessary to ensure resources are correctly used. Your application should be aware of this limits and retry any unsuccessful request, check the following Ruby stub:
tries = 0; max_tries = 3;
begin
HTTParty.send(method, uri) # perform an API call.
sleep 0.5
tries += 1
rescue
unless tries >= max_tries
sleep 1.0 # wait the necessary time before retrying the call again.
retry
end
end
Finally, you can review the Response Headers of each request:
Jumpseller-PerMinuteRateLimit-Limit: 60
Jumpseller-PerMinuteRateLimit-Remaining: 59 # requests available on the per-second interval
Jumpseller-PerSecondRateLimit-Limit: 2
Jumpseller-PerSecondRateLimit-Remaining: 1 # requests available on the per-second interval
to better model your application requests intervals.
In the event of getting your IP banned, the Response Header Jumpseller-BannedByRateLimit-Reset
informs you the time when will your ban be reseted.
By default we will return 50 objects (products, orders, etc) per page. There is a maximum of 100, using a query string &limit=100
.
If the result set gets paginated it is your responsibility to check the next page for more objects – you do this by using query strings &page=2
, &page=3
and so on.
https://api.jumpseller.com/v1/products.json?login=XXXXXX&authtoken=XXXXX&page=3&limit=100
Use this page to mock Jumpseller API in your testing and development.
Run our mock API sample using the open source WireMock library, or in the free edition of WireMock Cloud. You'll have a working API server simulating the behavior of Jumpseller API, which will allow you to keep building and testing even if the actual API you isn't currently available.