update inventories API