We are using the 2020-10 REST API and have come across products which don't have a status field.
For an example please see X-Request-Id: 99bef7fd-09ed-4238-b4dc-7c44cf0d8f6f and screenshot below:
That's a bug right? It seems like the status field hasn't been populated on all fields. Can we assume that the status is 'active' then?
Was able to replicate this as well. Below are two screen shots, one a REST API request hitting the default "current" REST API version's endpoint. And another a GraphQL API request hitting the 2020-10 API version's endpoint. REST API doesn't include status, while I can specifically retrieve the status property for the same product.
@ClementBR reached out to me and we looked into this and realized these are cached responses from the Product API where your apps would have used older API versions.
There are a few options available here to fix the products:
- Patience for the cache to clear, and use a newer API version for all future calls so it doesn't happen again (no set timeframe for the cache expiry)
- Update a product with a 'blank' change to break the cache if you have access (a space in a product title generally works)
- Use GraphQL for your API calls, responses are not cached with GraphQL which is why you saw what you did @Greg_Kujawa
At any rate, once older API versions have been deprecated and are no longer in use this will no longer be able to happen as well.