i just noticed that filtering with `published_status=any` no longer seems to work in the REST Admin APIs for Smart and Custom Collections, I get no results when I specify `any`. I'm pretty sure this used to work before.
`published_status=published` and `published_status=unpublished` still work.
Anyone else having this issue?
Thanks for the response!
I understand this is the default but according to the API documentation `any` is also a valid value to pass in to this parameter and used to work before.
`published_status=any` still works in the Product API.
We like writing our code with explicit values instead of relying in the defaults in case the default value changes in the future (plus it makes the code's intent clearer). We did have to push an emergency fix to our app to simply remove the parameter in order to get all the collections as `any` was returning an empty resultset.
I'm wondering if this is a bug or an intentional change? If this was intentional, will this change be applied to other API endpoints in the future?
Hi, I have this same bug.
including "published_status"=>"any" in the GET request breaks it. Returns Empty Array. This only happens with Custom and Smart Collections Get Requests.
Blog Articles & Products continue to work as expected when including "published_status"=>"any".
This was recently broken, and used to work fine last month.
Btw, all the people that comment abount published_status => null is the right way, well you are wrong. There are 3 different possible values according to the docs (any,published,unpublished). And this WAS working just fine last time I checked. This recent change broke my app.
I'm having a similar problem with Products.
I got my list of products from the API. There were 880.
To verify the results, I exported from the Shopify UI as well. But I got 1023 instead.
Looking closely at the Excel file, I saw that the difference was that only the published products were coming from the API.
Since the default is any, I should get 1023.
For the published status filter, I set it to:
"any" (explicitly) - got 880.
"published" - got 880.
"unpublished" - got 0.
For some reason the API doesn't send the unpublished products.
Let me know if that's a bug or by design.
P.S. I'm using ShopifySharp as a C# wrapper around the API calls, which should not matter, as I assume they are setting the filter correctly based on my C# code. If it's them, I'll take it up with them...