API reference
Revaluations
Foreign balances moved to the closing rate, the difference posted as a gain or loss of its own.
- POST
/v1/revaluationsRevalue foreign balances - GET
/v1/revaluations/previewPreview a foreign currency revaluation
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
Response
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 -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
| Name | Type | Description |
|---|---|---|
as_ofQuery · Required | string (date) | The closing date. |
Response
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 "https://api.ledgerit.ai/v1/revaluations/preview" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Objects
The objects these operations take and return.
RevaluationRequest
| Name | Type | Description |
|---|---|---|
as_ofRequired | string (date) | The closing date: balances and rates as of it. |
RevaluationOut
| Name | Type | Description |
|---|---|---|
accountsRequired | array of RevaluedOut | |
as_ofRequired | string (date) | |
entry_idRequired | string or null | An id that starts with |
RevaluedOut
| Name | Type | Description |
|---|---|---|
account_idRequired | string | An id that starts with |
carryingRequired | string | What its lines add up to in the books' currency. |
currencyRequired | string | |
differenceRequired | string | Revalued less carrying: the gain (positive) or loss to post. |
foreign_balanceRequired | string | What the account holds in the currency; negative for a credit balance. |
rateRequired | string | The rate in force on the day. |
revaluedRequired | string | The foreign balance at the rate. |