Overview

What is the Marketplacer Seller API (Legacy) and why would you use it.

This describes the resources that make up the official Marketplacer API V2.

Issues

If you encounter any issues with using this API, please contact our support team here with:

  1. an example of what request you’re making
  2. What headers + body are being returned from the server
  3. What you expect to happen

JSON API

This API complies with the jsonapi.org specification. Please consult its documentation to learn about it if you have not done so already.

Evolvability and Versioning

This API will evolve over time and new fields will be added to responses as new features are implemented. Ensure that any software parsing API responses is able to handle new fields being added at any time.

If it is necessary to remove or change the meaning or data-type of a field, we will inform customers of a change and continue supporting the old behavior until all clients have had a chance to update.

If you wish to receive these notifications, please let us know here, or you can view the change log here.

Rate Limits

There is a rate limit of 50 transactions per second on all our REST endpoints.

HTML Sanitization

We do not currently perform any type of HTML sanitization on resource attributes that could contain HTML or Script fragments. It is the responsibility of the consuming endpoint to perform such checks.

Content Type

API clients must supply a Content-Type header of application/vnd.api+json when sending request data:

$ curl -H "Content-Type: application/vnd.api+json" -d "{ ... }" -X POST https://bestfriendbazaar.com/api/v2/client/adverts

Pagination

Some resources may be paginated. Each paginated collection defaults to returning 50 resources at a time, with a maximum limit of 1100 if desired. A paginated resource will always contain a links key on the top-level which contains first, next and last keys:

{
  links: {
    "first": "[route]?page[number]=1&page[size]=50",
    "next": "[route]?page[number]=2&page[size]=50",
    "last": "[route]?page[number]=2&page[size]=50"
  }
}

The “first” link returned here is the link to the first page of this resource. The “next” link is the next page of this resource, and the “last” link indicates the last page of results that will show results.

For instance, to paginate through the Variants endpoint, you can make requests as so:

  GET https://bestfriendbazaar.com/api/v2/client/variants?page[number]=1
  GET https://bestfriendbazaar.com/api/v2/client/variants?page[number]=2
  ...
  GET https://bestfriendbazaar.com/api/v2/client/variants?page[number]=n

You can also change the number of items returned in one request by using the page[size] parameter. This example will only show 10 items at a time:

  GET https://bestfriendbazaar.com/api/v2/client/variants?page[size]=10

A maximum value of 500 can be specified.

Authentication

To authenticate to the API, use an Authorization header:

$ curl -H "Authorization: Bearer api_key" https://bestfriendbazaar.com/api/v2/client/adverts

If your site is protected by basic authentication, that will conflict with the Bearer method. In that case, send your API key using MARKETPLACER-API-KEY:

$ curl -u username:password -H "MARKETPLACER-API-KEY: api_key" https://bestfriendbazaar.com/api/v2/client/adverts

Information on how to create your api_key can be found in Getting Started

API Key Rotation

For more information on our API Key Rotation recommendations, please refer to this playbook.

Postman Collection

We have provided a Postman collection of the most used API calls, you can read more about the collection here.