2

How can I get products of specific category? For Example If I hit https://www.example.com/index.php/rest/V1/categories/[category_id]/products

it should return all products of same Category [category_id] with all details. But it is returning only sku

[
    {
        "sku": "CN-101",
        "position": 1,
        "category_id": "6"
    },
    {
        "sku": "AA-102",
        "position": 1,
        "category_id": "6"
    },
    {
        "sku": "GY-105",
        "position": 1,
        "category_id": "6"
    },
    {
        "sku": "DR-107W",
        "position": 1,
        "category_id": "6"
    },
    {
        "sku": "DR-107G",
        "position": 1,
        "category_id": "6"
    }
]

Please Guide me how I'll get all products with details by category ?

0

You can try to get the products of a specific category with this API call:

rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=category_id&searchCriteria[filter_groups][0][filters][0][value]={categoryId}

This should return all the infos about the products.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.