FYI
the property psContentTypeSent needs to be set as "application/json; charset=utf-8"
It's current set as "application/JSON; charset=utf-8"
I'm finding I have to reset this property all the time, else it returns an error.
I've tested this with Xero Accounting