Best way to get a group of inventory info

Hi all, I’m fairly new to the square API and am working on an app that will allow a board game shop to show their customers what their current inventory looks like. What’s in stock, out of stock, browse-able on a tablet in store. I’m looking to get these values of an inventory object: Name, Price, ID, Quantity.

From what I can tell, all of these values are split across two different API calls, /v2/inventory/counts/batch-retrieve and /v2/catalog/batch-retrieve. My current process is to pull all in_stock and low_stock inventory via batch_retrieve_inventory_counts, and use the list of IDs from those objects to try and pull the name and price via batch_retrieve_catalog_objects.

The issue that I’m having is that if the inventory in stock is an ITEM_VARIATION it doesn’t contain the item name, thought it does contain the price.

Can anyone give me a clearer path of how I can get Name, Price, ID, and Quantity. Preferably with fewer API calls, but if not just the right combination. I’m really struggling to figure out how to piece this stuff together. Thanks!

:wave: If you want to get the name of the item you’ll need to call the Catalog API with the item_id. Currently the item_variation_id doesn’t return the item name however it does return the item_id. :slightly_smiling_face:

I was able to figure it out actually. Turns out that the name of an item_variation is actually returned, it’s just in the item_variation_data sub object instead of the main object. The site that I was testing against had a lot of item_variations named “Regular” and it threw me off thinking that was an internal square name and not something they set.

Thanks for all that answered or messaged me.