Items timeStamp when Item gets sold

AlexAlex Posts: 11Member
I want to find out which items were sold today, will the timeStamp of the item be updated when it gets sold? or only the timeStamp on itemShops?

4 comments

  • Michael CareyMichael Carey Posts: 64Administrator, Lightspeed Staff moderator
    Hi Alex,

    The item timestamp does not change when an item is sold, but the timestamp of the item shop does get updated.

    The query you would want to run to check for any items that had a change to their ItemShop today would be:

    https://api.merchantos.com/API/Account/{accountID}/Item?load_relations=["ItemShops"]&ItemShops.timeStamp%3D%3E%3D%2C2016-02-29
    Thanks,
    Mike
    Michael Carey

    Product Manager
    Lightspeed HQ
  • AlexAlex Posts: 11Member
    Thanks that worked.
  • aron_data_clymeraron_data_clymer Posts: 1Member
    This above explanation is super useful, thank you!  However, I'd like to query the Item endpoint with the ItemShops relation and bring back any items that have either 1) been updated directly or 2) have been sold.  So, I want to filter on when item.timestamp > (date) OR itemshop.timestamp > (date).  Is there a straightforward way to do this? 

    @Michael Carey
  • Michael CareyMichael Carey Posts: 64Administrator, Lightspeed Staff moderator
    edited August 2018
    Hi @aron_data_clymer,

    Try the following query:

    https://api.lightspeedapp.com/API/Account/{{account_id}}/Item?load_relations=[%22ItemShops%22]&or=timeStamp%3D%3E%2C2018-08-01%7CItemShops.timeStamp%3D%3E%2C2018-08-01

    Thanks,
    Michael Carey

    Product Manager
    Lightspeed HQ
Sign In or Register to comment.