Did you maybe try with function "Write-off Prepayment"?
http://www.hansamanuals.com/main/english/mailnumber___3396/theconf___516/manuals/levelzero___3393/version___71/hwconvindex.htm
Hi, Paul.
Sounds like you're talking about REST API. And that your are overwriting data with older values if B managed to read record before A finished to update it. Classic conflict resolution ...