BigCommerce API: How to retrieve all Categories using Postman

BigCommerce API 2024: How To Retrieve All Categories

This tutorial shows you how to retrieve all categories on BigCommerce using Postman. So let’s follow my examples of retrieving categories that give you a basic understanding of how things work.

Step 1: Check Scope on BigCommerce

Scope limits the ability to read or write data. Set the scopes to the minimum level of access needed to accomplish the task at hand.

When retrieving data, that data must be allowed access because BigCommerce only provides access to the information you are granted access to.

To know you have the right to access any information, you must verify the Scope.

Here are the steps you have to do to check the scope: 

  • Firstly, go to the Home page
  • Secondly, Select settings 
  • Last, roll down on API section, then click on API Accounts
BigCommerce API: How to retrieve all Categories using Postman

Step 2: Access Postman

Following the step checking the Scope, we can start retrieving information, and in today’s tutorial, we will recover all categories in BigCommerce.

Now, we are ready to get all categories using Postman.

Log in to your Postman and create a new workspace.

02 BigCommerca API how to retrieve all categories

Step 3: Retrieve all categories on BigCommerce using Postman

After checking the Scope, let’s move on to the last step recover all categories on BigCommerce using Postman. Create a new GET with this URL:

https://api.bigcommerce.com/stores/wxrj2hgngy/v3/catalog/categories
  1. Firstly, replace {store_hash} with your store_hash generated on BigCommerce from the API path.
  2. Secondly, enter X-Auth-Token on the Key column and  Access Token on the Value column in the Header section
  3. Then, click send button to send the API request.
BigCommerce API: How to retrieve all Categories using Postman

Follow BigCommerce Dev Center to learn more.

Response: After a second, the API will return the data of a list of categories

{
    "data": [
        {
            "id": 18,
            "parent_id": 0,
            "name": "Bath",
            "description": "",
            "views": 0,
            "sort_order": 1,
            "page_title": "",
            "meta_keywords": [
                ""
            ],
            "meta_description": "",
            "layout_file": "category_with_facets.html",
            "image_url": "",
            "is_visible": true,
            "search_keywords": "",
            "default_product_sort": "use_store_settings",
            "custom_url": {
                "url": "/bath/",
                "is_customized": false
            }
        },
        {
            "id": 19,
            "parent_id": 0,
            "name": "Garden",
            "description": "",
            "views": 0,
            "sort_order": 2,
            "page_title": "",
            "meta_keywords": [
                ""
            ],
            "meta_description": "",
            "layout_file": "category_with_facets.html",
            "image_url": "",
            "is_visible": true,
            "search_keywords": "",
            "default_product_sort": "use_store_settings",
            "custom_url": {
                "url": "/garden/",
                "is_customized": false
            }
        },
        {
            "id": 20,
            "parent_id": 0,
            "name": "Publications",
            "description": "",
            "views": 0,
            "sort_order": 4,
            "page_title": "",
            "meta_keywords": [
                ""
            ],
            "meta_description": "",
            "layout_file": "category_with_facets.html",
            "image_url": "",
            "is_visible": true,
            "search_keywords": "",
            "default_product_sort": "use_store_settings",
            "custom_url": {
                "url": "/publications/",
                "is_customized": false
            }
        },
        {
            "id": 21,
            "parent_id": 0,
            "name": "Kitchen",
            "description": "",
            "views": 0,
            "sort_order": 3,
            "page_title": "",
            "meta_keywords": [
                ""
            ],
            "meta_description": "",
            "layout_file": "category_with_facets.html",
            "image_url": "",
            "is_visible": true,
            "search_keywords": "",
            "default_product_sort": "use_store_settings",
            "custom_url": {
                "url": "/kitchen/",
                "is_customized": false
            }
        },
        {
            "id": 22,
            "parent_id": 0,
            "name": "Utility",
            "description": "",
            "views": 0,
            "sort_order": 5,
            "page_title": "",
            "meta_keywords": [
                ""
            ],
            "meta_description": "",
            "layout_file": "category_with_facets.html",
            "image_url": "",
            "is_visible": true,
            "search_keywords": "",
            "default_product_sort": "use_store_settings",
            "custom_url": {
                "url": "/utility/",
                "is_customized": false
            }
        },
        {
            "id": 23,
            "parent_id": 0,
            "name": "Shop All",
            "description": "",
            "views": 0,
            "sort_order": 0,
            "page_title": "",
            "meta_keywords": [
                ""
            ],
            "meta_description": "",
            "layout_file": "category_with_facets.html",
            "image_url": "",
            "is_visible": true,
            "search_keywords": "",
            "default_product_sort": "use_store_settings",
            "custom_url": {
                "url": "/shop-all/",
                "is_customized": false
            }
        }
    ],
    "meta": {
        "pagination": {
            "total": 6,
            "count": 6,
            "per_page": 50,
            "current_page": 1,
            "total_pages": 1,
            "links": {
                "current": "?page=1&limit=50"
            }
        }
    }
}Code language: JSON / JSON with Comments (json)

As a result, you can save the data you have already retrieved.

The above are all steps to Retrieve all BigCommerce categories with Postman. Please comment below or refer to our BigCommerce API documentation if you have any questions.

These steps will be shown visually in the video below.

Hopefully, you can do it!