Conversations about creating, managing, and using metafields to store and retrieve custom data for apps and themes.
I am getting header X-Shopify-API-Deprecated-Reason with value -https://developers.shopify.com/changelog/wip-metafields-value-type-migration-guide on hitting the api
<shop>.myshopify.com/admin/api/2020-10/metafields to get the shop metafields.
This looks like a valid endpoint from the documentation here : https://shopify.dev/api/admin/rest/reference/metafield#index-2020-10
Can someone please tell me what could be wrong here?
Solved! Go to the solution
This is an accepted solution.
Hi,
OK i figured it out.
In the new version 2021-07, value_type as been replaced with type.
So the depreciation header error you are getting is just informing you that the field 'value_type' will not exist in versions 2021-07 and future versions.
In case your app is using that value_type field and you are switching to 2021-07 version, you have to do the changes in your app to use the correct field.
Hi,
<shop>.myshopify.com/admin/api/2020-10/metafields to get the shop metafields.
2020-10 is no longer supported, https://shopify.dev/api/release-notes/2020-10
Update the version to a latest one.
Do you mean this api is not supported, or 2020-10 itself is not supported anymore
Because, it says, October 1, 2021 is the date from when 2020-10 won't be supported and other apis seem to work fine, without giving back this header
Any updates here?
Hi,
Just update the version 2020-10 to a more recent for example to 2021-04 and check if you still get the deprecated header.
I am still getting that header, with <shop>/myshopify.com/admin/api/2021-04/metafields.json
This is an accepted solution.
Hi,
OK i figured it out.
In the new version 2021-07, value_type as been replaced with type.
So the depreciation header error you are getting is just informing you that the field 'value_type' will not exist in versions 2021-07 and future versions.
In case your app is using that value_type field and you are switching to 2021-07 version, you have to do the changes in your app to use the correct field.
Okay, thanks a lot!!
That clarifies my doubt.
In the reason it also states that both fields are supported until 2021-10. Does that mean they are supported until October 1st, 2021 or they are supported until version 2021-10?
Another question I have is what happens to the legacy metafields that still have `value_type` as properties.
Do all of those metafields need to be deleted and re-created?
OR
Will they all be converted to have the new `type` property and all of their values (ex: `integer` will change to `number_integer`) will be changed over to its corresponding `type` from this table (https://shopify.dev/apps/metafields/definitions/types).