Skip to main content
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

1

Read the resource

Fetch it and note the version (for example, 0).
2

Send that version with your change

Include the version you just read in your PATCH request body.
3

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.

API version

The Finance API is at v1.1.0, which adds the payment-request settle, reverse, and update endpoints and POLYGON as a supported chain.
Payment-request amounts are objects that carry both sides of the conversion — { "fiat": <number>, "crypto": "<string>" } — across amount, originalAmount, settlementAmount, settledAmount, and shortfallAmount. See Payment requests.

Next steps

Update a party

Send the version with your PATCH request.

Safe retries with idempotency keys

The other half of safe writes — duplicate-proof creates.