Solved

When a field is deprecated, how long before it actually gets removed from the API response?

Jonathan-HA
Shopify Partner
316 24 99

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?

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill
Accepted Solution (1)

lizk
Shopify Staff
246 57 68

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.

View solution in original post

Replies 4 (4)

lizk
Shopify Staff
246 57 68

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.

Jonathan-HA
Shopify Partner
316 24 99

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.

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill
adminorngeshop
Visitor
1 0 0

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

Jonathan-HA
Shopify Partner
316 24 99

Hey @adminorngeshop ,

 

I was looking at the API docs and it appears Shopify recommends using the `assigned_location` field from the FulfillmentOrder endpoint instead:

 

JonathanHA_0-1666807547283.png

 

If you use the REST API, what you'd probably need to do here is something like this:

 

  1. For each order, make a separate call to the FulfillmentOrder endpoint, passing in the Order ID.
  2. For each FulfillmentOrder record, search the line_items subfield for the line_item_id to figure which line item in the order is associated with which FulfillmentOrder.
  3. Retrieve the assigned_location field from each FulfillmentOrder record.

It might be possible for a line item to have multiple FulfillmentOrder records associated with it, so that's something to consider as well.

 

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill