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/ 




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.



Accept: application/json 

Authorization: bearer your_access_token

Last updated