Title: API Issue
Last modified: May 6, 2019

---

# API Issue

 *  Resolved [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/api-issue-3/)
 * Plugin is excellent but the problem is API not working, i tried to get the products
   list based on particular brand but doesn’t find any documentation.
 * API Sample : [https://website.com/wp-json/wc/v3/brands?name=Ponds&consumer_key=xxxxyyyyy&consumer_secret=xxxxyyyyy](https://website.com/wp-json/wc/v3/brands?name=Ponds&consumer_key=xxxxyyyyy&consumer_secret=xxxxyyyyy)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Thread Starter [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/api-issue-3/#post-11499567)
 * also tried this route,
 * …/wp-json/wc/v3/products/brands/61
 * but returned with
    { “code”: “rest_no_route”, “message”: “No route was found 
   matching the URL and request method”, “data”: { “status”: 404 } }
 *  Plugin Contributor [titodevera](https://wordpress.org/support/users/titodevera/)
 * (@titodevera)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/api-issue-3/#post-11502044)
 * Hi manigopal!
 * Info about the api usage here: [REST API docs](https://github.com/titodevera/perfect-woocommerce-brands/wiki/REST-API-docs)
 * 🙂
 *  Thread Starter [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/api-issue-3/#post-11503301)
 * i have seen this but how do i call it.. all i need is that when i click on particular
   brand it should list all products attached to it.
 *  Thread Starter [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/api-issue-3/#post-11508830)
 * something like this, /wp-json/wc/v3/products?brand=62
 *  Thread Starter [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/api-issue-3/#post-11511744)
 * [@titodevera](https://wordpress.org/support/users/titodevera/)
 * Brands API works but i do look for filter kind of API,
 * Say for eg. products?category=15 @ here this API displays / filters products 
   which are mapped to particular category.
 * As mentioned above i do look for the same
    eg. products?brand=62 which is an 
   extended API, which is now(not working)
 * But /wc/v2/brands => this works fine by displaying the brands list.
 *  Thread Starter [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/api-issue-3/#post-11512799)
 * exactly for this,
 * [http://website.com/brand/aachi/](http://website.com/brand/aachi/) ~ in this 
   it does displays the particular brands product’s
 *  Thread Starter [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [7 years ago](https://wordpress.org/support/topic/api-issue-3/#post-11553664)
 * im waiting for almost two weeks. could you share the api for it.
 *  Thread Starter [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/api-issue-3/#post-11776890)
 * wp-json/wc/v1/products?filter[brand]=62
 * tried different combination of attributes but nothing worked 🙁
 *  Thread Starter [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/api-issue-3/#post-11781130)
 * tried with these keys,
 * wp-json/wc/v2/products?filter[brand]=nestle
 * wp-json/wc/v2/products?filter[brand]=62
 * wp-json/wc/v2/brands/nestle
 * wp-json/wc/v2/brands/62
 *  [ertejaspatel](https://wordpress.org/support/users/ertejaspatel/)
 * (@ertejaspatel)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/api-issue-3/#post-12214500)
 * Is there any way to get a brand by name through REST API? I see the API docs 
   but it doesn’t have anything like that.
 * wp-json/wc/v3/brands?name=brand1
    wp-json/wc/v3/brands?slug=brand1
 *  [manuken](https://wordpress.org/support/users/manuken/)
 * (@manuken)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/api-issue-3/#post-12505530)
 * Hi Guys,
 * Did you make API for brands work? It would be really helpful.
 *  [manuken](https://wordpress.org/support/users/manuken/)
 * (@manuken)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/api-issue-3/#post-12505623)
 * I just take a deeper look and I found that inside the pluing’s folder there is
   file / class? called **class-perfect-woocommerce-brands.php**, in there there
   is a function called **get_brands**, that is the function called when try to 
   use brands endpoint ([http://HOSTNAME/wp-json/wc/v3/brands](http://HOSTNAME/wp-json/wc/v3/brands)).
 * github class [link](https://github.com/titodevera/perfect-woocommerce-brands/blob/master/classes/class-perfect-woocommerce-brands.php)
 * I dont know much about php but seems to me that the function used to get the 
   brands is not returning any data. I printed brands collection when get_brands
   is executed and it was empty.
 * Does anyone around know more about php and woocommerce development to take a 
   look?
    -  This reply was modified 6 years, 3 months ago by [manuken](https://wordpress.org/support/users/manuken/).

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘API Issue’ is closed to new replies.

 * ![](https://ps.w.org/perfect-woocommerce-brands/assets/icon-256x256.jpg?rev=2912506)
 * [Perfect Brands for WooCommerce](https://wordpress.org/plugins/perfect-woocommerce-brands/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/perfect-woocommerce-brands/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/perfect-woocommerce-brands/)
 * [Active Topics](https://wordpress.org/support/plugin/perfect-woocommerce-brands/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/perfect-woocommerce-brands/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/perfect-woocommerce-brands/reviews/)

## Tags

 * [brands](https://wordpress.org/support/topic-tag/brands/)

 * 12 replies
 * 2 participants
 * Last reply from: [manuken](https://wordpress.org/support/users/manuken/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/api-issue-3/#post-12505623)
 * Status: resolved