I want to keep track of the last price and inventory update date for each product/variant. Is that stored in a standard location I can query with an API? Or must assign metafields for those?
Hi Newbie,
Shopify’s API doesn’t explicitly provide a standard field for the last price and inventory update date for each product variant. However, the ProductVariant object includes an updatedAt field, that tells you the last time the variant was modified. This would include changes to the price, but it would also include other changes that you might not want to track, and you can’t tell what exactly was changed from this field alone.
Regarding inventory levels, you can use the InventoryLevel object to get the inventory quantity available at a particular location. However, it also doesn’t provide information about when the last update occurred.
So, if you specifically need to track the last price update and inventory update times, you’d have to manage this yourself. One approach could be to use metafields as you’ve already suggested to store this data each time you make an update.
Hope this helps,