Skip to content

Instantly share code, notes, and snippets.

What would you like to do?


The Brands REST API allows you to create, view, update, and delete individual, or a batch, of brands. The endpoint is /wp-json/wc/v1/products/brands which basically mimics /wp-json/wc/v1/products/categories. You can refer to the same documentation of product categories REST API.

In addition to /products/brands endpoints, the /products endpoints also updated to display brands in the response and check the JSON request for brands.


  • Retrieve all product brands:

    curl -u consumer_key:consumer_secret
  • Create a product brand:

    curl -X POST \
     -u consumer_key:consumer_secret \
     -H "Content-Type: application/json" \
     -d '{
     "name": "Apple",
     "image": {
       "src": ""
  • Delete a product brand:

    curl -X DELETE -u consumer_key:consumer_secret
  • Set brands to a product:

     curl -X PUT \
      -u consumer_key:consumer_secret \
      -H 'Content-Type: application/json' \
      -d '{"brands": [48, 49]}'

    Note: When setting a brand to a product the url needs to be products/123 where 123 is the id of the product you want to update.


This comment has been minimized.

Copy link

commented May 30, 2019

Why not use {"brands": [ {"id": 48}, {"id": 49} ]} to set brands, the same way you set categories. It took me a while to find this page and see that the standard has changed


This comment has been minimized.

Copy link

commented Aug 8, 2019

Can you list all products associated to a specific brand through the api?

Such as

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.