API Get order v 2022-07 X-Shopify-API-Deprecated-Reason headers

Hello,

I’m trying to use to Postman client to interact with Shopify

Our version is 2022-07

However, when I make a simple

https://shopify.dev/api/admin-rest/2022-04/resources/order#get-orders?status=any

I get a header in the response,

X-Shopify-API-Deprecated-Reason: https://shopify.dev/changelog/property-deprecations-in-the-admin-api-order-and-lineitem-resource

I get list order, everything goes smoothly.

What am I missing? What should I do, to fix it?

Thanks for your help

FYI, the X-Request-ID : 786e021a-5e8d-4a1b-852d-6e08a8c49670

Here’s what I do to detect deprecated fields. I paste my query into the Shopify GraphiQL API page and check every field to look for the deprecation message.

For example, if you are using Order.referrerUrl, deprecation message suggests “Use customerJourneySummary.lastVisit.referrerUrl instead”.

You will get your results now, but in future versions, the query may not work. So you should update your query as suggested.

Thanks you so much, @suphero ,

But I only call API to get orders, I just call with simple query (status=any)

https://my-store.myshopify.com/admin/api/2022-07/orders.json?status=any

I get a header in the response,

X-Shopify-API-Deprecated-Reason: https://shopify.dev/changelog/property-deprecations-in-the-admin-api-order-and-lineitem-resource

I don’t know why it return above response in the header.

I thought you were having this issue on GraphQL. I didn’t use the REST version much. But, I think the URL returns some deprecated fields and if you’re using these fields you should be careful.

https://shopify.dev/api/admin-rest/2022-04/resources/order#resource-object

Deprecated fields: gateway, payment_details

  1. You can ignore the message if you’re not using these fields.
  2. Or you can select only the fields you are interested and if these fields are not deprecated you shouldn’t be getting this warning message.

Thanks so much, @suphero

But Shopify don’t approve to public my app,

You’re welcome. Shopify verification process may take long but I assume it is unrelated to this topic. If my answer solves your deprecation issue please accept the answer to keep the platform clean and you can open another issue.