You can mark it as closed as option. If document is connected with other documents you can not delete it so you will not be able to delete PO, as you will not be able to remove Goods receipt.
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 ...