Every party and account carries a version number that goes up by one each time the resource changes. You use it to update safely.
Why it matters
If two people — or two of your own processes — edit the same party at the same time, the second save could quietly wipe out the first. The version field prevents this: an update only succeeds if you’re working from the latest copy.
How to update
Read the resource
Fetch it and note the version (for example, 0).
Send that version with your change
Include the version you just read in your PATCH request body.
Handle a conflict
If someone changed the resource after you read it, the API returns 409. Re-fetch to get the new version, reapply your change, and send it again.
curl --request PATCH \
--url https://api.venlyfinance.com/v1/parties/{partyId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "version": 0, "firstName": "Janet" }'
A stale version returns:
{
"success": false,
"errors": [
{ "code": "concurrent-modification", "message": "This request has been modified by another user. Please refresh and try again." }
]
}
Always send the version from your most recent read — never a cached or hard-coded value.