REST Services Overview (+ Intro to Swagger)

Overview

SellerCloud has exposed a REST API that will help our clients in managing products, orders, warehouses etc.

Obtain the api endpoint address using your Sellercloud team name. Insert your team name into this URL and open the URL in a new browser tab.  https://api.sellercloud.com/api/server-by-team/?team={your_team_name}. The ApiUrl in the resulting json is the api endpoint.

The REST API uses Bearer authentication, which means that for each endpoint a token must be provided in the Authentication header in the format Bearer {token}.

User Permissions for the REST API are managed from the Delta user interface. For more info on how to set up security permissions see our Delta Permissions help page.

Sellercloud recommends that you create a separate user(employee) for each different integration that you build with our REST API. Doing so allows you to customize user permissions per integration, as well as track API requests made by each integration.

Supported content type is application/json.

The endpoints that return bulk data support paging, which can be managed by the model.pageSize and model.pageNumber parameters. If these parameters are omitted from the API request, the defaults used are 10 for pageSize and 1 for pageNumber.

The expected date format of DateTime-type parameters is mm/dd/yyyy hh:mm.

The enumerations data types are documented in the Resources section.

Swagger

We have utilized Swagger to provide beautiful and rich documentation for our RESTful web services. You can access the Swagger documentation by accessing the provided API endpoint with /swagger appended at the end. The URL should look like the following example (for the TT server): https://tt.api.sellercloud.com/rest/swagger

Use your server’s Swagger URL to navigate to the documentation and test page. It will look similar to the following screenshot.

On this page you can view every controller defined in the API. Within each controller section you will find the available HTTP Methods (for example GET, PUT, POST, DELETE etc.), which you can test and execute by using the “Try it out!” button from the Swagger page. In order to utilize Swagger for testing the available API calls, you must first:

  1. Obtain a token using the api/token method available under the Authentication section on the Swagger page. To perform this operation you must have a valid SellerCloud username and password.
  2. Paste the access_token from the received response into the api_key field in the green banner at the top of the Swagger page, in the following format: Bearer {token}
  3. Press Explore.
  4. Proceed with testing other calls as you’d like.

Swagger Video

This example shows how a user can obtain an authorization token through the Swagger UI. He then uses that token to call a method for receiving metadata for an order.

Postman Video

This example shows how a user can obtain an authorization token through Postman. He then uses that token to call a method for receiving metadata for an order.

Was this article helpful?

Related Articles