• Resolved morshed

    (@morshed)


    Hello,

    Is there any way to get all products of a specific category through rest api?

    Thanks

    • This topic was modified 2 years, 7 months ago by morshed.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @morshed!

    Is there any way to get all products of a specific category through rest api?

    This will require custom coding which is beyond the scope of this forum.
    I would suggest you check this with a developer who will help you get the required code/customization.

    You can check related support documentation here:
    https://woocommerce.com/document/woocommerce-rest-api/
    https://woocommerce.github.io/woocommerce-rest-api-docs/

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.
    
    Lastly, for direct assistance with code customizations, we recommend consulting with the WooCommerce Customizations Partners. https://woocommerce.com/customizations/

    Nevertheless, I’m going to leave this thread open for a bit to see if anyone is able to chime in to help you out here.`

    Hello @morshed,

    Yes, it’s certainly possible with the category filter. To fetch all products in a certain category, you will want to use the products API with the category parameter:

    /wp-json/wc/v3/products?category=ID

    Replace ID with the ID of your category. This is in the documentation here:
    https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-products

    Hope that helps!
    Naz.

    Hopefully, the above information was helpful. I’m going to mark the thread as resolved. Feel free to create a new topic if you need assistance with anything else.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WC Rest API: Get products list by category slug’ is closed to new replies.