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

Solved

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

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? 

Accepted Solution (1)
Jayvin
Shopify Partner
284 42 89

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.

banned

View solution in original post

Replies 8 (8)

Jayvin
Shopify Partner
284 42 89

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.

banned
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

talha93
New Member
7 0 0

 Any updates here?

Jayvin
Shopify Partner
284 42 89

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.

banned
talha93
New Member
7 0 0

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

Jayvin
Shopify Partner
284 42 89

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.

banned
talha93
New Member
7 0 0

Okay, thanks a lot!!

That clarifies my doubt.

DexG
Shopify Partner
5 0 2

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).