The error 400 is due to an error in the payload. Also, including the line item id keeps the line as it is, please can you remove the line item id and then try again.
You can see you logs at https://developer.xero.com/myapps at this will tell you the reason for the errors.
We recommend that you write your code to display any validation errors