Skip to content
API

Get Categories

GET
/v1/catalog-search-service/catalogs/categories

Get categories.

Authentication

Topsort’s APIs are authenticated via bearer tokens. Requests must include an authorization header containing your private API key.

Don't have an API key yet? Learn how to generate one.

Authorization
required
string

The header containing a private API key. Format this header as follows:

Authorization: Bearer <YOUR-API-KEY>

Query Parameters

object
next_page

A token provided in a previous response. If not empty, it is used to retrieve the page that follows.

string

A token provided in a previous response. If not empty, it is used to retrieve the page that follows.

Responses

Successful Response

application/json
object
hasMore
required

Whether this is the last page of results or not.

boolean
nextPage

A token to retrieve the next page of results.

string
>= 1 characters
response
required

Array of categories.

Array<object>

A category is a division for products within a marketplace catalog. Categories may be organized into hierarchies.

object
id
required

The category ID. If there is no ID for categories in the marketplace, this can be the category name as long as it is unique.

string
>= 1 characters
name
required

The category name.

string
>= 1 characters
parentId

The ID of the parent category. This model assumes each category can at most one parent category. In this example, bneEmHKG2yUe could be a reference to the Beers category.

string
>= 1 characters