Stock not updating for child products of product bundle item in sales invoice through api

While doing sales invoice through Api for parent product of product bundle item, stock of child products not getting updated. please assist on how to fix this issue ?