API reference

Revaluations

Foreign balances moved to the closing rate, the difference posted as a gain or loss of its own.

Guides: Foreign currency and revaluation

Revalue foreign balances

POST/v1/revaluations· Idempotent

client.revaluations.create()

Revalue every foreign balance at the closing rate: one revaluation entry, each account moved by its difference against FX gain or loss. Nothing is posted when nothing has moved. Refused with conflict when a currency held has no rate on or before the day.

Request body

RevaluationRequest

Response

201RevaluationOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/revaluations" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"as_of":"2026-09-30"}'

Preview a foreign currency revaluation

GET/v1/revaluations/preview

client.revaluations.preview()

Every foreign balance on a balance-sheet account at the rate in force on the closing date, and the gain or loss revaluing would post. Writes nothing.

Parameters

NameTypeDescription
as_ofQuery · Requiredstring (date)

The closing date.

Response

200RevaluationOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl "https://api.ledgerit.ai/v1/revaluations/preview" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Objects

The objects these operations take and return.

RevaluationRequest

NameTypeDescription
as_ofRequiredstring (date)

The closing date: balances and rates as of it.

RevaluationOut

NameTypeDescription
accountsRequiredarray of RevaluedOut
as_ofRequiredstring (date)
entry_idRequiredstring or null

An id that starts with je_.

RevaluedOut

NameTypeDescription
account_idRequiredstring

An id that starts with gla_.

carryingRequiredstring

What its lines add up to in the books' currency.

currencyRequiredstring
differenceRequiredstring

Revalued less carrying: the gain (positive) or loss to post.

foreign_balanceRequiredstring

What the account holds in the currency; negative for a credit balance.

rateRequiredstring

The rate in force on the day.

revaluedRequiredstring

The foreign balance at the rate.