Get recently updated products

I’m using the current REST API to get products that were recently updated. I don’t need each change (inventory_chages) I just need to be able to query Products that were change after a given time. I also want to filter that by a specific warehouse. It doesn’t seem like that currently exists.

Any ideas on how I can get that? In my mind it would look something like this:

{
account {
data {
warehouses(warehouse_id:“xxxxxxxxxx”) {
products(first:10, updated_at_from:‘2019-10-18 00:00:00’){
edges{
node{
sku
warehouse_products {
on_hand
reserve_inventory
}
}
}
}
}
}
}
}

I don’t currently see a way to filter by the warehouse_id or the product updated_at.

I too am looking for a way to replicate the RESP API "get-products’ using the ‘updated_at_min’ option. How can this be done using the new API?

@adam You can use the warehouse_products query and filter by a specific warehouse_id

{
  warehouse_products(warehouse_id: "xxxx") {
    request_id
    complexity
    data {
      edges {
        node {
          on_hand
          reserve_inventory
        }
      }
    }
  }
}

@adam @PulseRetail you should now be able to filter warehouse products by updated date.
You should be able to filter by

  • created_from
  • created_to
  • updated_from
  • updated_to

Ex:

{
  warehouse_products(warehouse_id: "xxxx", updated_from: "2019-01-01") {
    request_id
    complexity
    data(first: 10) {
      edges {
        node {
          id
          legacy_id
          warehouse_id
          account_id
          created_at
          updated_at
          on_hand
        }
      }
    }
  }
}

Great news – thanks for the update. Will test right away.

Follow up question … the problem with using ‘warehouse_products’ is that if we have 20 locations we have to make 20 API calls for each product of which there are 100K+. This is not very efficient at all! With the RESP-API ‘get-product’ we could use the ‘updated_at_min’ and it was only one request (multiple pages) to get ALL products that had changed. There MUST be a better way to retrieve all products that have changed - i.e. where the quantity on hand has changed. Any suggestions?