Add api to get inventory.