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?
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.
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.
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?
If you use the REST API, what you’d probably need to do here is something like this:
For each order, make a separate call to the FulfillmentOrder endpoint, passing in the Order ID.
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.
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.