I feel like APIs often accept form encoding solely because it allows you to show curl examples. However since nested objects don't always flatten nicely you end up with a special syntax or do not allow nesting at all.
In this case you can't update an invoice and it's line items at once - which seems a little odd to me. It would be the most convenient thing to do from the API consumers perspective - which is what APIs should aim for.