This is the getInventory to be used in the api