Getting a list of categories

Learn how to get a list of categories.

To get a list of categories:

Step 1: Get an OAuth access token (optional)

To get the OAuth access token, use the POST /oauth/token resource. The following example sets the API key to the client_id in the POST entity, also called the request body or payload.

POST /oauth20/token/ 

{

client_id=a78b756bd47e258841d7f007f3f62a&grant_type=password

}

Step 2: Get the categories

To get the top-level categories, use the Categories resource. Use the access token acquired in Step 1 as the bearer token in the Authorization header. This example request overrides the default text format (XML) for the Commerce API. In the Accept header set the format to application/json.

GET https://api.digitalriver.com/v1/shoppers/me/categories HTTP/1.1

Header:

Accept: application/json 

Authorization: bearer your_access_token

Last updated