WordPress Woocommerce REST API V3 attributes and terms

I woocommerce you can create Attributes, like Color
These attributes can have terms, like red, green, white. Later on, you can add these attributes to a product.

I know how to add these attributes by means of the API, like described here:
http://woothemes.github.io/woocommerce-rest-api-docs/#create-a-product-attribute

Read More

I’ve been searching for hours, but there seems to be no way to add terms with the API. Am I missing something?

Related posts

3 comments

  1. You add terms with the Update A Product api, here:

    You make a PUT request: /wc-api/v3/products/<id>

    In the request body you send:
    {"product":{"categories":[...],"tages":[...]}}

  2. It accepts the attribute slug/taxonomy name; Just use this one:

    example.com/wp-json/wc/v3/products?attribute=pa_compatible-for&attribute_term=249
    

    I know it’s not documented properly!
    Have a good time.

Comments are closed.