GET Product Variants - updated_at filter queries

Highlighted
Excursionist
32 0 7

I've been successfully requesting Products and filtering the results using the updated_at_min and updated_at_max filters, for example:

 

GET /admin/api/2019-10/products/count.json?updated_at_min=2020-04-01T00:00:00&updated_at_max=2020-04-19T23:59:59

I'm now trying to do the same for the Product Variants endpoint, e.g.;

 

GET /admin/api/2019-10/variants/count.json?updated_at_min=2020-04-19T00:00:00&updated_at_max=2020-04-20T23:59:59

but it appears the Product Variants endpoint doesn't support these filters as I'm getting all Variants returned in the response. 

 

Does anyone know if it is possible to GET Product Variants but filter the response to those updated within a specified date range?

0 Likes
Highlighted
Excursionist
32 0 7

I've been doing some further testing and it appears that requests to the Products endpoint with the updated_at_min and updated_at_max filters, e.g.:

 

GET /admin/api/2019-10/products/count.json?updated_at_min=2020-04-01T00:00:00&updated_at_max=2020-04-19T23:59:59

includes Products where the Variant was updated between the 2 timestamps. So if I make a change to a Variant requesting the Products with the updated_at_min and updated_at_max filters will return this if just the Variant was modified (and not the Product). That's what I'm seeing but would love to get some kind of official confirmation here?

0 Likes