Looks like the metafields node on the PUT request does not expect the new format of metafields, and is expecting a value_type to be supplied instead of a type.
{
"errors": {
"value_type": [
"is not included in the list"
]
}
}
This method is really important as its (as far as i know) the only way to update multiple metafields in a single request. Alternative would be to do a request for each metafield.
This method is really important as its (as far as i know) the only way to update multiple metafields in a single request. Alternative would be to do a request for each metafield.
Agree, the alternative works.
But there are many apps out there that uses the update multiple metafields in a single request and so this MUST be fixed.
I thought i was the only one to use the put method to update multiple metafields at once. Good to hear i’m not. And i totally agree that this is a must fix, based on your explanation
When using the REST Admin API version 2021-07, type is available for metafields only when querying the Metafield resource directly (/admin/api/2021-07/products/PRODUCT_ID/metafields.json). When querying a resource that can contain metafields, such as the Product resource (/admin/api/2021-07/products.json), the API still uses value_type for metafields. This issue will be fixed in API version 2021-10.