Getting X-Shopify-API-Deprecated-Reason on hitting <shop>.myshopify.com/admin/api/2020-10/metafields

Solved
talha93
New Member
7 0 0

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? 

0 Likes
Jayvin
Shopify Partner
221 34 57

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.

0 Likes
talha93
New Member
7 0 0

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

0 Likes
talha93
New Member
7 0 0

 Any updates here?

0 Likes
Jayvin
Shopify Partner
221 34 57

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.

0 Likes
talha93
New Member
7 0 0

 I am still getting that header, with <shop>/myshopify.com/admin/api/2021-04/metafields.json

0 Likes
Jayvin
Shopify Partner
221 34 57

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.

0 Likes
talha93
New Member
7 0 0

Okay, thanks a lot!!

That clarifies my doubt.

0 Likes