yes, but I also have to include the existing values for ‘sku-values’
Example: If I do the following
curl 'https://api.webflow.com/sites/xxxxxxxx/products/xxxxxxx/skus/xxxxxxx' \
-H "Authorization: Bearer xxxxxxxxxxxxx" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
-X PATCH \
--data-binary $'{
"fields": {
"_archived": true
}
}'
I will get the following error (I have no idea why this is either?):
{"msg":"Variant \"undefined\" is missing option \"Color\" for product \"Thing2\".","code":409,"name":"Conflict","path":"/sites/xxxxxx/products/xxxxx/skus/xxxxxx","err":"Conflict: Variant \"undefined\" is missing option \"Color\" for product \"Thing2\"."}
if I add the existing sku-values
curl 'https://api.webflow.com/sites/xxxxxxx/products/xxxxxx/skus/xxxxxx' \
-H "Authorization: Bearer xxxxxxxxx" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
-X PATCH \
--data-binary $'{
"fields": {
"sku-values": {
"yyyyyyyyyy": "zzzzzzzzzzz"
},
"_archived": true
}
}'
i will get a successful response… but the archived property will be unchanged:
{“price”:{“value”:120,“unit”:“USD”},“_archived”:false,“_draft”:false,“sku-values”:{“yyyyyyyyyy”:“zzzzzzzzz”},“download-files”:,“name”:“Cloak Of Invisibility Color: Smoke Grey”,“slug”:“cloak-of-invisibility-color-smoke-grey”,“product”:“xxxxxxxxxxx”,“updated-on”:“2020-09-29T17:49:29.131Z”,“updated-by”:“xxxxxxxxxxx”,“created-on”:“2020-09-29T17:43:20.894Z”,“created-by”:“xxxxxxxxx”,“published-on”:null,“published-by”:null,“_cid”:“xxxxxxxxx”,“_id”:“xxxxxxxxx”}