Update Invoice Line items after payments via API

Need the ability to modify line items on an invoice after payment via api. The function to allow balance changing edits to invoices is available in the UI but not via the api. The api is necessary because customer’s have percentage based calculated line items like service charges that don’t automatically update based on UI updates on invoices. An API driven update would allow external applications to set qty’s, unit prices, amounts, etc..