Query API for All Items Whose Specific CustomFieldValue changed in the past 24 hours

When I am hitting the /Account/{accountID}/Item API method resource I want to know of the best query I can run to obtain only the items whose specific CustomFieldValue changed in the past 24 hour period.
Currently when I attempt to do this using the .timeStamp I will get back all of the updated products in that timeframe.
For example...
/Account/{accountId}/Item.json?load_relations=["ItemShops","CustomFieldValues"]&ItemShops.timeStamp=>,2019-04-22T00:00:00`
This above request works and returns the data I need but it is sending back all items that have been updated due to any action, it also sends back all of the CustomFieldValues.
I only want to get the items back that have had a specific CustomFieldValue that was modified.
So this is kinda a pseudo example of what I'm going after...
/Account/{accountID}/Item.json?load_relations=["CustomFieldValues.value"]&CustomFieldValues.value.timeStamp=>,2019-04-22T00:00:00&CustomFieldValues.value=MY_CUSTOM_FIELD_NAME
What is the best way to accomplish this?
Thank you!
1 comment
Hey @jzbg, unfortunately you're not able to do this with the API. The best you're going to do is to store the payload of the data in a DB and then periodically check the API for changes, recording the timestamp.
Adrian Samuel
Software Developer
Lightspeed HQ