Product Categories

This endpoint returns a paginated list of all available product categories. It is commonly used to populate category dropdowns, filters, or navigational menus in frontend applications. Each category includes basic metadata such as name, slug, description, and hierarchy (parent ID).


List All Categories

Endpoint URL

GET
https://altium.test/api/product-categories/all

Description

You can access all product categories registered in the system and match them with products.

Authorization

   Authentication: Bearer <token>

Request URL

GET
https://altium.test/api/product-categories/all

Example Response

{
    "data": [
        {
            "id": 10,
            "name": "Main Category",
            "slug": "main-category",
            "description": "<p>Main category description</p>",
            "featured_image": "https://altium.test/storage/94/Wireframe---1-(1).png"
            "parent_id": null
        },
        {
            "id": 11,
            "name": "Sub Category",
            "slug": "sub-category",
            "description": "<p>Sub category description</p>",
            "featured_image": null
            "parent_id": 10
        },
        {
            "id": 12,
            "name": "3rd Level Category",
            "slug": "3rd-level-category",
            "description": "<p>3rd Level category description</p>",
            "featured_image": null
            "parent_id": 11
        },
    ],
    "pagination": {
            "total": 3,
            "current_page": 1,
            "last_page": 1,
            "per_page": 10,
            "next_page_url": null,
            "prev_page_url": null
        }
}

Did this document help you?