Update requests to .../api/v3.1/... instead of .../api/v3/... .
POST
{base_url}/api/v3.1/invoice/addUpdate
The totals object is validated against the lines array, and a request whose totals do not reconcile is rejected. totals.total must equal the sum of every lines[i].total , plus totals.tax , minus totals.discounts . If totals.subtotal is sent, it must equal that same line sum on its own. A request that sends no lines is not checked.
Note that tax is carried on top of the line items rather than inside them: lines totalling 30.00 with totals.tax of 2.85 need totals.total of 32.85 .