Skip to content

Get the account history

GET
/v1/accounts/{account_id}/ledger
curl --request GET \
--url 'http://localhost:8080/v1/accounts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ledger?from=2026-11-01T00%3A00%3A00Z&to=2026-12-01T00%3A00%3A00Z&limit=50' \
--header 'Authorization: Bearer <token>'

Every line of the account from from (inclusive) to to (exclusive), by posting time, in posting order, with the balance after each line. The first page carries the opening balance; pages continue with cursor.

account_id
required

An account ID.

string format: uuid
/^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/

The account.

from
required
string format: date-time

Start, RFC 3339, inclusive.

Example

2026-11-01T00:00:00Z
to
required
string format: date-time

End, RFC 3339, exclusive.

Example

2026-12-01T00:00:00Z
limit
integer
default: 50 >= 1 <= 100

Page size.

cursor
string
<= 512 characters

An opaque cursor from next_cursor.

OK

Media typeapplication/json
object
account
required

An account ID.

string format: uuid
/^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
opening_balance
required

Before the first line of this page.

object
amount
required

A decimal amount, with at most the currency’s minor-unit digits (ETB: 2). Never a JSON number.

string
/^-?(0|[1-9][0-9]{0,17})(\.[0-9]{1,4})?$/
currency
required

An ISO 4217 code the ledger supports.

string
/^[A-Z]{3}$/
items
required
Array<object>
object
entry
required

An entry ID.

string format: uuid
/^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
sequence
required
integer format: int64
recorded_at
required
string format: date-time
side
required
string
Allowed values: debit credit
amount
required

An amount with its currency (ADR-0005, ADR-0009).

object
amount
required

A decimal amount, with at most the currency’s minor-unit digits (ETB: 2). Never a JSON number.

string
/^-?(0|[1-9][0-9]{0,17})(\.[0-9]{1,4})?$/
currency
required

An ISO 4217 code the ledger supports.

string
/^[A-Z]{3}$/
balance
required

After this line, on the normal side.

object
amount
required

A decimal amount, with at most the currency’s minor-unit digits (ETB: 2). Never a JSON number.

string
/^-?(0|[1-9][0-9]{0,17})(\.[0-9]{1,4})?$/
currency
required

An ISO 4217 code the ledger supports.

string
/^[A-Z]{3}$/
next_cursor
required

Pass as cursor for the next page; null on the last page.

string | null

Example

{
"opening_balance": {
"amount": "39.20",
"currency": "ETB"
},
"items": [
{
"side": "debit",
"amount": {
"amount": "39.20",
"currency": "ETB"
},
"balance": {
"amount": "39.20",
"currency": "ETB"
}
}
]
}

Bad request

Media typeapplication/problem+json

RFC 9457 Problem Details, with Mezgeb’s stable code.

object
type
required

urn:mezgeb:problem:<code>.

string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance

This occurrence: urn:uuid:<request id>.

string format: uri
code
required

A stable error code. Never renumbered or reused; see docs/api/errors.md.

string
Allowed values: invalid_request idempotency_key_required unauthenticated forbidden not_found idempotency_key_reused rate_limited internal_error not_implemented busy contention no_open_period too_few_lines too_many_lines metadata_too_large amount_not_positive account_not_found account_not_open currency_mismatch duplicate_line amount_overflow unbalanced account_total_overflow insufficient_funds invalid_template_id unknown_template unknown_template_version missing_amount unexpected_amount non_positive_amount missing_account unexpected_account bound_account_not_found account_not_allowed same_account reserved_metadata template_defect amount_not_whole_balance account_not_new fee_exceeds_amount amount_currency_mismatch amount_too_large missing_metadata invalid_metadata missing_refunded_entry unexpected_refunded_entry invalid_reference duplicate_reference invalid_status_change already_reversed cannot_reverse_reversal reason_not_allowed maker_is_checker hold_not_active hold_expired capture_exceeds_hold invalid_held_account account_is_held not_refundable refund_of_reversed_entry refund_line_not_allowed refund_exceeds_original refunded_entry_not_found refunded_entry_cannot_be_reversed cannot_reverse_refund period_not_closed period_label_taken period_close_findings adjustment_not_pending offline_unavailable attestation_unsupported public_key_registered owner_not_a_wallet tier_disabled device_not_active certificate_expired voucher_open over_tier_limit over_customer_cap shortfall_unpaid dispute_resolved break_closed break_not_closable
rule

The posting rule (1001–1012) or template rule (2001–2022) that refused the request.

integer
line

The zero-based line of the entry at fault.

integer
role

The template role at fault.

string
name

The amount or metadata key at fault.

string
errors

For invalid_request: each field at fault.

Array<object>
object
pointer
required

A JSON Pointer into the request body.

string
detail
required
string

Examples

invalid_request

{
"type": "urn:mezgeb:problem:invalid_request",
"title": "The request is malformed",
"status": 400,
"code": "invalid_request",
"detail": "The request is malformed.",
"errors": [
{
"pointer": "/amounts/amount",
"detail": "\"10.255\" has more decimal places than ETB allows"
}
],
"instance": "urn:uuid:0192f3c4-0000-7000-8000-00000000abcd"
}

Unauthenticated

Media typeapplication/problem+json

RFC 9457 Problem Details, with Mezgeb’s stable code.

object
type
required

urn:mezgeb:problem:<code>.

string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance

This occurrence: urn:uuid:<request id>.

string format: uri
code
required

A stable error code. Never renumbered or reused; see docs/api/errors.md.

string
Allowed values: invalid_request idempotency_key_required unauthenticated forbidden not_found idempotency_key_reused rate_limited internal_error not_implemented busy contention no_open_period too_few_lines too_many_lines metadata_too_large amount_not_positive account_not_found account_not_open currency_mismatch duplicate_line amount_overflow unbalanced account_total_overflow insufficient_funds invalid_template_id unknown_template unknown_template_version missing_amount unexpected_amount non_positive_amount missing_account unexpected_account bound_account_not_found account_not_allowed same_account reserved_metadata template_defect amount_not_whole_balance account_not_new fee_exceeds_amount amount_currency_mismatch amount_too_large missing_metadata invalid_metadata missing_refunded_entry unexpected_refunded_entry invalid_reference duplicate_reference invalid_status_change already_reversed cannot_reverse_reversal reason_not_allowed maker_is_checker hold_not_active hold_expired capture_exceeds_hold invalid_held_account account_is_held not_refundable refund_of_reversed_entry refund_line_not_allowed refund_exceeds_original refunded_entry_not_found refunded_entry_cannot_be_reversed cannot_reverse_refund period_not_closed period_label_taken period_close_findings adjustment_not_pending offline_unavailable attestation_unsupported public_key_registered owner_not_a_wallet tier_disabled device_not_active certificate_expired voucher_open over_tier_limit over_customer_cap shortfall_unpaid dispute_resolved break_closed break_not_closable
rule

The posting rule (1001–1012) or template rule (2001–2022) that refused the request.

integer
line

The zero-based line of the entry at fault.

integer
role

The template role at fault.

string
name

The amount or metadata key at fault.

string
errors

For invalid_request: each field at fault.

Array<object>
object
pointer
required

A JSON Pointer into the request body.

string
detail
required
string

Examples

Exampleunauthenticated

unauthenticated

{
"type": "urn:mezgeb:problem:unauthenticated",
"title": "Authentication is required",
"status": 401,
"code": "unauthenticated",
"detail": "Authentication is required.",
"instance": "urn:uuid:0192f3c4-0000-7000-8000-00000000abcd"
}

Forbidden

Media typeapplication/problem+json

RFC 9457 Problem Details, with Mezgeb’s stable code.

object
type
required

urn:mezgeb:problem:<code>.

string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance

This occurrence: urn:uuid:<request id>.

string format: uri
code
required

A stable error code. Never renumbered or reused; see docs/api/errors.md.

string
Allowed values: invalid_request idempotency_key_required unauthenticated forbidden not_found idempotency_key_reused rate_limited internal_error not_implemented busy contention no_open_period too_few_lines too_many_lines metadata_too_large amount_not_positive account_not_found account_not_open currency_mismatch duplicate_line amount_overflow unbalanced account_total_overflow insufficient_funds invalid_template_id unknown_template unknown_template_version missing_amount unexpected_amount non_positive_amount missing_account unexpected_account bound_account_not_found account_not_allowed same_account reserved_metadata template_defect amount_not_whole_balance account_not_new fee_exceeds_amount amount_currency_mismatch amount_too_large missing_metadata invalid_metadata missing_refunded_entry unexpected_refunded_entry invalid_reference duplicate_reference invalid_status_change already_reversed cannot_reverse_reversal reason_not_allowed maker_is_checker hold_not_active hold_expired capture_exceeds_hold invalid_held_account account_is_held not_refundable refund_of_reversed_entry refund_line_not_allowed refund_exceeds_original refunded_entry_not_found refunded_entry_cannot_be_reversed cannot_reverse_refund period_not_closed period_label_taken period_close_findings adjustment_not_pending offline_unavailable attestation_unsupported public_key_registered owner_not_a_wallet tier_disabled device_not_active certificate_expired voucher_open over_tier_limit over_customer_cap shortfall_unpaid dispute_resolved break_closed break_not_closable
rule

The posting rule (1001–1012) or template rule (2001–2022) that refused the request.

integer
line

The zero-based line of the entry at fault.

integer
role

The template role at fault.

string
name

The amount or metadata key at fault.

string
errors

For invalid_request: each field at fault.

Array<object>
object
pointer
required

A JSON Pointer into the request body.

string
detail
required
string

Examples

Exampleforbidden

forbidden

{
"type": "urn:mezgeb:problem:forbidden",
"title": "The caller may not do this",
"status": 403,
"code": "forbidden",
"detail": "The caller may not do this.",
"instance": "urn:uuid:0192f3c4-0000-7000-8000-00000000abcd"
}

Not found

Media typeapplication/problem+json

RFC 9457 Problem Details, with Mezgeb’s stable code.

object
type
required

urn:mezgeb:problem:<code>.

string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance

This occurrence: urn:uuid:<request id>.

string format: uri
code
required

A stable error code. Never renumbered or reused; see docs/api/errors.md.

string
Allowed values: invalid_request idempotency_key_required unauthenticated forbidden not_found idempotency_key_reused rate_limited internal_error not_implemented busy contention no_open_period too_few_lines too_many_lines metadata_too_large amount_not_positive account_not_found account_not_open currency_mismatch duplicate_line amount_overflow unbalanced account_total_overflow insufficient_funds invalid_template_id unknown_template unknown_template_version missing_amount unexpected_amount non_positive_amount missing_account unexpected_account bound_account_not_found account_not_allowed same_account reserved_metadata template_defect amount_not_whole_balance account_not_new fee_exceeds_amount amount_currency_mismatch amount_too_large missing_metadata invalid_metadata missing_refunded_entry unexpected_refunded_entry invalid_reference duplicate_reference invalid_status_change already_reversed cannot_reverse_reversal reason_not_allowed maker_is_checker hold_not_active hold_expired capture_exceeds_hold invalid_held_account account_is_held not_refundable refund_of_reversed_entry refund_line_not_allowed refund_exceeds_original refunded_entry_not_found refunded_entry_cannot_be_reversed cannot_reverse_refund period_not_closed period_label_taken period_close_findings adjustment_not_pending offline_unavailable attestation_unsupported public_key_registered owner_not_a_wallet tier_disabled device_not_active certificate_expired voucher_open over_tier_limit over_customer_cap shortfall_unpaid dispute_resolved break_closed break_not_closable
rule

The posting rule (1001–1012) or template rule (2001–2022) that refused the request.

integer
line

The zero-based line of the entry at fault.

integer
role

The template role at fault.

string
name

The amount or metadata key at fault.

string
errors

For invalid_request: each field at fault.

Array<object>
object
pointer
required

A JSON Pointer into the request body.

string
detail
required
string

Examples

Examplenot_found

not_found

{
"type": "urn:mezgeb:problem:not_found",
"title": "Not found",
"status": 404,
"code": "not_found",
"detail": "Not found.",
"instance": "urn:uuid:0192f3c4-0000-7000-8000-00000000abcd"
}

Rate limited

Media typeapplication/problem+json

RFC 9457 Problem Details, with Mezgeb’s stable code.

object
type
required

urn:mezgeb:problem:<code>.

string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance

This occurrence: urn:uuid:<request id>.

string format: uri
code
required

A stable error code. Never renumbered or reused; see docs/api/errors.md.

string
Allowed values: invalid_request idempotency_key_required unauthenticated forbidden not_found idempotency_key_reused rate_limited internal_error not_implemented busy contention no_open_period too_few_lines too_many_lines metadata_too_large amount_not_positive account_not_found account_not_open currency_mismatch duplicate_line amount_overflow unbalanced account_total_overflow insufficient_funds invalid_template_id unknown_template unknown_template_version missing_amount unexpected_amount non_positive_amount missing_account unexpected_account bound_account_not_found account_not_allowed same_account reserved_metadata template_defect amount_not_whole_balance account_not_new fee_exceeds_amount amount_currency_mismatch amount_too_large missing_metadata invalid_metadata missing_refunded_entry unexpected_refunded_entry invalid_reference duplicate_reference invalid_status_change already_reversed cannot_reverse_reversal reason_not_allowed maker_is_checker hold_not_active hold_expired capture_exceeds_hold invalid_held_account account_is_held not_refundable refund_of_reversed_entry refund_line_not_allowed refund_exceeds_original refunded_entry_not_found refunded_entry_cannot_be_reversed cannot_reverse_refund period_not_closed period_label_taken period_close_findings adjustment_not_pending offline_unavailable attestation_unsupported public_key_registered owner_not_a_wallet tier_disabled device_not_active certificate_expired voucher_open over_tier_limit over_customer_cap shortfall_unpaid dispute_resolved break_closed break_not_closable
rule

The posting rule (1001–1012) or template rule (2001–2022) that refused the request.

integer
line

The zero-based line of the entry at fault.

integer
role

The template role at fault.

string
name

The amount or metadata key at fault.

string
errors

For invalid_request: each field at fault.

Array<object>
object
pointer
required

A JSON Pointer into the request body.

string
detail
required
string

Examples

Examplerate_limited

rate_limited

{
"type": "urn:mezgeb:problem:rate_limited",
"title": "Too many requests",
"status": 429,
"code": "rate_limited",
"detail": "Too many requests.",
"instance": "urn:uuid:0192f3c4-0000-7000-8000-00000000abcd"
}
Retry-After
integer
>= 1

Seconds to wait before retrying.

Internal error

Media typeapplication/problem+json

RFC 9457 Problem Details, with Mezgeb’s stable code.

object
type
required

urn:mezgeb:problem:<code>.

string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance

This occurrence: urn:uuid:<request id>.

string format: uri
code
required

A stable error code. Never renumbered or reused; see docs/api/errors.md.

string
Allowed values: invalid_request idempotency_key_required unauthenticated forbidden not_found idempotency_key_reused rate_limited internal_error not_implemented busy contention no_open_period too_few_lines too_many_lines metadata_too_large amount_not_positive account_not_found account_not_open currency_mismatch duplicate_line amount_overflow unbalanced account_total_overflow insufficient_funds invalid_template_id unknown_template unknown_template_version missing_amount unexpected_amount non_positive_amount missing_account unexpected_account bound_account_not_found account_not_allowed same_account reserved_metadata template_defect amount_not_whole_balance account_not_new fee_exceeds_amount amount_currency_mismatch amount_too_large missing_metadata invalid_metadata missing_refunded_entry unexpected_refunded_entry invalid_reference duplicate_reference invalid_status_change already_reversed cannot_reverse_reversal reason_not_allowed maker_is_checker hold_not_active hold_expired capture_exceeds_hold invalid_held_account account_is_held not_refundable refund_of_reversed_entry refund_line_not_allowed refund_exceeds_original refunded_entry_not_found refunded_entry_cannot_be_reversed cannot_reverse_refund period_not_closed period_label_taken period_close_findings adjustment_not_pending offline_unavailable attestation_unsupported public_key_registered owner_not_a_wallet tier_disabled device_not_active certificate_expired voucher_open over_tier_limit over_customer_cap shortfall_unpaid dispute_resolved break_closed break_not_closable
rule

The posting rule (1001–1012) or template rule (2001–2022) that refused the request.

integer
line

The zero-based line of the entry at fault.

integer
role

The template role at fault.

string
name

The amount or metadata key at fault.

string
errors

For invalid_request: each field at fault.

Array<object>
object
pointer
required

A JSON Pointer into the request body.

string
detail
required
string

Examples

internal_error

{
"type": "urn:mezgeb:problem:internal_error",
"title": "Internal error",
"status": 500,
"code": "internal_error",
"detail": "Internal error.",
"instance": "urn:uuid:0192f3c4-0000-7000-8000-00000000abcd"
}