Thanks Con.
I followed your suggestion and figured it out (dont know why I didnt think to create it manually and then look at the GET).
For the record, this works when creating variations with combinations of attributes:
POST https://zzzzz.com/wp-json/wc/v3/products/1234/variations/batch
{"create":
[
{ "regular_price": "18.0000",
"sku": "12345",
"attributes":[
// array of attribute id's & options that identify this variation
{ "id": 93, "option": "Small"},
{ "id": 94, "option": "Black"}
]
},
{ "regular_price": "19.0000",
"sku": "98765",
"attributes":[
{ "id": 93, "option": "Medium"},
{ "id": 94, "option": "Black"}
]
}
]
-
This reply was modified 5 years, 11 months ago by t71southw.