A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi there,
I understand that when a field is deprecated, you can no longer use this field when creating records when using the API version where it was deprecated.
However, I couldn't find info on how long those deprecated fields will actually remain in the API response when doing a GET request. Since each API version is supported for 1 year, I'd assume they'll disappear after 1 year of deprecation.
But if I look at the REST Order API, the `gateway` and `payment_details` fields, for example, had been deprecated for years now but they're still there in the API response.
Do deprecated fields actually get removed from the API response at all or do they simply become read-only?
Anyone know?
Solved! Go to the solution
This is an accepted solution.
Hi there!
A field that is marked as deprecated doesn't necessarily mean that it is going to be removed in the near future. As you have noticed some fields may be marked as deprecated for more than a year.
When a field is marked as deprecated it is because we no longer recommend using it. This could be because we have released a new field(s) that better represent the data.
Sometimes, but not always, these old fields will be removed entirely forcing a migration to the new fields.
Make sure to keep watch for banners in your partner dashboard, as well as on the API reference documentation letting you know about fields that will be removed entirely.
To learn more visit the Shopify Help Center or the Community Blog.
This is an accepted solution.
Hi there!
A field that is marked as deprecated doesn't necessarily mean that it is going to be removed in the near future. As you have noticed some fields may be marked as deprecated for more than a year.
When a field is marked as deprecated it is because we no longer recommend using it. This could be because we have released a new field(s) that better represent the data.
Sometimes, but not always, these old fields will be removed entirely forcing a migration to the new fields.
Make sure to keep watch for banners in your partner dashboard, as well as on the API reference documentation letting you know about fields that will be removed entirely.
To learn more visit the Shopify Help Center or the Community Blog.
Hey there @lizk ,
Thanks so much for clarifying that! That's really good to know and certainly makes us feel better we'll get a warning ahead of time via the partner dashboard before they're completely removed.
Hi,
Just searching for answers about a specific deprecated fields in the API.
We were recently notifiedd that order resource field "origin_location" is deprecated. It is a crucial field we use in our CRM for identifying POS sales vs. in-store. Following your response; is there a new field that replaces this one? How do we know what that is please?
Best regards,
David
ornge-shop.myshopify.com
Hey @adminorngeshop ,
I was looking at the API docs and it appears Shopify recommends using the `assigned_location` field from the FulfillmentOrder endpoint instead:
If you use the REST API, what you'd probably need to do here is something like this:
It might be possible for a line item to have multiple FulfillmentOrder records associated with it, so that's something to consider as well.