Category & Group
Get Categories
The "Get Categories" API allows you to retrieve a list of categories that serve as parents for organizing content in an e-commerce system. This is essential for applications aiming to display hierarchical categorization, aiding in presenting a structured view of products.
endpoint:
/api/customer/v2/categoriesmethod:
GET
In category page design, a top grid showcases category images for quick previews. Scrolling reveals individual categories, each displaying its title and up to 10 products. This layout fosters seamless exploration and personalized selection.
- Success Response:
 
You can check more details about Category & Group Resource.
{
    "code": 200,
    "data": [
        {
            "id": 1100,
            "name": "Nokia",
            "name_en": "Nokia",
            "name_ar": "نوكيا",
            "slug": "nokia",
            "description_en": null,
            "description_ar": null,
            "description": null,
            "order": 0,
            "parent_id": 1081,
            "image": "https://docapi.supercommerce.io/storage/uploads/Nokia_wordmark.svg-removebg-preview-1681240348.png",
            "active": true,
            "products": [
                {
                    "id": 1,
                    "name_en": "Nokia 105 DS",
                    "name_ar": "نوكيا 105 DS",
                    "slug": "nokia-105-ds",
                    // ...
                }
            ],
            "type": 2,
            "meta_tag_title_en": null,
            "meta_tag_title_ar": null,
            "meta_tag_description_en": null,
            "meta_tag_description_ar": null,
            "meta_tag_keywords_en": null,
            "meta_tag_keywords_ar": null
        },
        //...
    ]
}
Check the following section to learn more about the Get Categories API Reference
Get Groups By Category
The "Get Groups by Category" API enables you to retrieve a list of groups. Each group supports the selection of a main category and the grouping of its associated subcategories. This functionality is crucial for creating well-organized and structured content presentations.
endpoint:
/api/customer/v2/groups-by-categories/:category_slugmethod:
GETURL Parameters:
category_slug: The slug of the category to retrieve groups.
Success Response:
You can check more details about Category & Group Resource.
{
    "code": 200,
    "data": [
        {
            "id": 1100,
            "name": "Nokia",
            "name_en": "Nokia",
            "name_ar": "نوكيا",
            "slug": "nokia",
            "description_en": null,
            "description_ar": null,
            "description": null,
            "order": 0,
            "parent_id": 1081,
            "image": "https://docapi.supercommerce.io/storage/uploads/Nokia_wordmark.svg-removebg-preview-1681240348.png",
            "active": true,
            "products": [
                {
                    "id": 1,
                    "name_en": "Nokia 105 DS",
                    "name_ar": "نوكيا 105 DS",
                    "slug": "nokia-105-ds",
                }
            ],
            "type": 2,
            "meta_tag_title_en": null,
            "meta_tag_title_ar": null,
            "meta_tag_description_en": null,
            "meta_tag_description_ar": null,
            "meta_tag_keywords_en": null,
            "meta_tag_keywords_ar": null
        },
        //...
    ]
}
Check the following section to learn more about the Get Groups By Category API Reference
Get SubCategory By Group
The Get SubCategories by Group API endpoint allows retrieving subcategories for a specific group, providing a categorized view of products.
endpoint:
/api/customer/v2/categories/{group_slug}/subcategoriesmethod:
GETURL Parameters:
group_slug: The slug of the group to retrieve subcategories.
Success Response:
You can check more details about Category & Group Resource.
{
    "code": 200,
    "data": [
        {
            "id": 1100,
            "name": "Nokia",
            "name_en": "Nokia",
            "name_ar": "نوكيا",
            "slug": "nokia",
            "description_en": null,
            "description_ar": null,
            "description": null,
            "order": 0,
            "parent_id": 1081,
            "image": "https://docapi.supercommerce.io/storage/uploads/Nokia_wordmark.svg-removebg-preview-1681240348.png",
            "active": true,
            "products": [
                {
                    "id": 1,
                    "name_en": "Nokia 105 DS",
                    "name_ar": "نوكيا 105 DS",
                    "slug": "nokia-105-ds",
                }
            ],
            "type": 2,
            "meta_tag_title_en": null,
            "meta_tag_title_ar": null,
            "meta_tag_description_en": null,
            "meta_tag_description_ar": null,
            "meta_tag_keywords_en": null,
            "meta_tag_keywords_ar": null
        },
        //...
    ]
}
Check the following section to learn more about the Get SubCategories By Group API Reference