Magento 2 API Get All Categories Of store

Magento 2 API Get All Categories Of store

In Magento 2 we can call API to get the list of categories. You need to replace https://store.com with your store URL.

URL : :  https://store.com/rest/V1/categories

ENDPOINT :  /rest/V1/categories

METHOD: GET

HEADERS : Content-Type application/json

Authorization: Bearer 

PARAMETERS: None

PAYLOAD: None

AUTHENTICATION: ADMIN TOKEN      Create admin Token Magento 2

Response JSON:

{

    "id": 2,

    "parent_id": 1,

    "name": "Default Category",

    "is_active": true,

    "position": 1,

    "level": 1,

    "product_count": 176,

    "children_data": [

        {

            "id": 10,

            "parent_id": 2,

            "name": "Test category 1",

            "is_active": true,

            "position": 1,

            "level": 2,

            "product_count": 28,

            "children_data": [ ]

        },

        {

            "id": 3,

            "parent_id": 2,

            "name": "Category 2",

            "is_active": true,

            "position": 2,

            "level": 2,

            "product_count": 24,

            "children_data": [ ]

        }

    ]

}

0   0
Eecrets Magento

Related Post

12th September 2020

Magento2 Get Admin Token Rest API

Magento2 Get Admin Token Rest API....

read more reply

List Your Business

Improve Your Business Visibility

Please rotate your device

We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site