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
I’ve been searching for hours, but there seems to be no way to add terms with the API. Am I missing something?
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":[...]}}
Since WooCommerce 2.5 you have new endpoint for adding attributes term. Just look at the documentation.
http://woothemes.github.io/woocommerce-rest-api-docs/#product-attribute-terms
For example for creating term for the specific attribute you can POST to endpoint
JSON message:
It accepts the attribute slug/taxonomy name; Just use this one:
I know it’s not documented properly!
Have a good time.