Product.status not always populated

ClementBR
Shopify Partner
110 2 18

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:

             ClementBR_0-1613554395494.png

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?

 

0 Likes
Samuel_Moddapps
Tourist
15 0 1

We are also seeing this. It was only recently that we could see the status in the api at all.

I don't think you can assume it is 'active' if not present, I just set a product to 'archived' on our dev shop and still don't get the status in the response.

0 Likes
Greg_Kujawa
Shopify Partner
947 79 202

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.

rest.pnggql.png

0 Likes
Josh
Shopify Staff
Shopify Staff
1131 82 191

Hey folks, 

@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. 

0 Likes