2

How can I get products of a 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 the 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 on how I'll get all products with details by category?

1 Answer 1

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 and acknowledge you have read our privacy policy.

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