List a voucher's receipts
const url = 'http://localhost:8080/v1/offline/vouchers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/receipts';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8080/v1/offline/vouchers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/receipts \ --header 'Authorization: Bearer <token>'Every receipt recorded for one of the client’s vouchers, in counter order, with its outcome and the entry that paid it: what the device spent, what is waiting and what is frozen.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”An offline voucher ID.
The voucher.
Responses
Section titled “Responses”The receipts
object
object
An offline device ID.
An offline voucher ID.
An account ID.
An amount with its currency (ADR-0005, ADR-0009).
object
A decimal amount, with at most the currency’s minor-unit digits (ETB: 2). Never a JSON number.
An ISO 4217 code the ledger supports.
The device’s clock: recorded, never trusted.
What happened to an uploaded receipt (protocol §9, spec §5.5); REFUSED is a receipt an operator refused in a dispute (§14).
Example
{ "items": [ { "device": "0192f3c4-0000-7000-8000-000000000d01", "counter": 1, "voucher": "0192f3c4-0000-7000-8000-000000000e01", "digest": "e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3", "payee": "0192f3c4-0000-7000-8000-000000000003", "amount": { "amount": "60.00", "currency": "ETB" }, "event_time": "2026-11-16T01:00:00Z", "outcome": "SETTLED", "entry": "0192f3c4-0000-7000-8000-000000000e11" } ]}Bad request
RFC 9457 Problem Details, with Mezgeb’s stable code.
object
urn:mezgeb:problem:<code>.
This occurrence: urn:uuid:<request id>.
A stable error code. Never renumbered or reused; see docs/api/errors.md.
The posting rule (1001–1012) or template rule (2001–2022) that refused the request.
The zero-based line of the entry at fault.
The template role at fault.
The amount or metadata key at fault.
For invalid_request: each field at fault.
object
A JSON Pointer into the request body.
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"}idempotency_key_required
{ "type": "urn:mezgeb:problem:idempotency_key_required", "title": "An Idempotency-Key header is required", "status": 400, "code": "idempotency_key_required", "detail": "An Idempotency-Key header is required.", "instance": "urn:uuid:0192f3c4-0000-7000-8000-00000000abcd"}Unauthenticated
RFC 9457 Problem Details, with Mezgeb’s stable code.
object
urn:mezgeb:problem:<code>.
This occurrence: urn:uuid:<request id>.
A stable error code. Never renumbered or reused; see docs/api/errors.md.
The posting rule (1001–1012) or template rule (2001–2022) that refused the request.
The zero-based line of the entry at fault.
The template role at fault.
The amount or metadata key at fault.
For invalid_request: each field at fault.
object
A JSON Pointer into the request body.
Examples
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
RFC 9457 Problem Details, with Mezgeb’s stable code.
object
urn:mezgeb:problem:<code>.
This occurrence: urn:uuid:<request id>.
A stable error code. Never renumbered or reused; see docs/api/errors.md.
The posting rule (1001–1012) or template rule (2001–2022) that refused the request.
The zero-based line of the entry at fault.
The template role at fault.
The amount or metadata key at fault.
For invalid_request: each field at fault.
object
A JSON Pointer into the request body.
Examples
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
RFC 9457 Problem Details, with Mezgeb’s stable code.
object
urn:mezgeb:problem:<code>.
This occurrence: urn:uuid:<request id>.
A stable error code. Never renumbered or reused; see docs/api/errors.md.
The posting rule (1001–1012) or template rule (2001–2022) that refused the request.
The zero-based line of the entry at fault.
The template role at fault.
The amount or metadata key at fault.
For invalid_request: each field at fault.
object
A JSON Pointer into the request body.
Examples
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
RFC 9457 Problem Details, with Mezgeb’s stable code.
object
urn:mezgeb:problem:<code>.
This occurrence: urn:uuid:<request id>.
A stable error code. Never renumbered or reused; see docs/api/errors.md.
The posting rule (1001–1012) or template rule (2001–2022) that refused the request.
The zero-based line of the entry at fault.
The template role at fault.
The amount or metadata key at fault.
For invalid_request: each field at fault.
object
A JSON Pointer into the request body.
Examples
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"}Headers
Section titled “Headers”Seconds to wait before retrying.
Internal error
RFC 9457 Problem Details, with Mezgeb’s stable code.
object
urn:mezgeb:problem:<code>.
This occurrence: urn:uuid:<request id>.
A stable error code. Never renumbered or reused; see docs/api/errors.md.
The posting rule (1001–1012) or template rule (2001–2022) that refused the request.
The zero-based line of the entry at fault.
The template role at fault.
The amount or metadata key at fault.
For invalid_request: each field at fault.
object
A JSON Pointer into the request body.
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"}template_defect (2013)
{ "type": "urn:mezgeb:problem:template_defect", "title": "The template books a role it does not declare", "status": 500, "code": "template_defect", "rule": 2013, "detail": "The template books a role it does not declare.", "instance": "urn:uuid:0192f3c4-0000-7000-8000-00000000abcd"}