To Understand the value_type field deprecation for metafields

Sankeerthana
New Member
2 0 0

Shopify metafields API has a field value_type which is deprecated and replaced by type in API version 2021-07.
But when trying it via POSTMAN to create the metafields we are facing issue with an error value_type field should be present for the particular namespace and key.

Request Body :

{
"product": {
"metafields": [
{
"key": "integer",
"value": 8745623,
"type": "integer",
"namespace": "product"
}
]
}
}


The API version we used here is 2021-07.
Ideally It should not cause any issue. Not sure the field is actually deprecated or not,
If deprecated when? and why it is still expecting as a mandatory field to be present in the metafieldsAdding metafields to the customer APIAdding metafields to the customer API

0 Likes
Dave_Pelletier
Shopify Staff
Shopify Staff
21 3 1
0 Likes
Sankeerthana
New Member
2 0 0
Hi Dave_Pelletier,

The issue is not only happening for products/{{product_id}}/metafields.json
endpoint but also when trying to add metafields for customers endpoint as
well,
Can you please ensure us when this value_type won't be a mandatory field to
set the dataType, when will that actually get deprecated?

We are actually making the latest changes in our integrations with the
latest API changes after the deprecation. So, want to know exactly when the
value_type gets deprecated.
Please let me know if anything required from my side
Thanks for the early response

Attaching screenshot for adding customer metafields
0 Likes
Dave_Pelletier
Shopify Staff
Shopify Staff
21 3 1

Hi , I can't give an exact timeline but we're working on addressing this issue for all resource endpoints as soon as possible. Once the fix is live, value_type will be properly deprecated for all endpoints that set metafields.

0 Likes