Skip to content

Get a device

GET
/v1/offline/devices/{device_id}
curl --request GET \
--url http://localhost:8080/v1/offline/devices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

One of the client’s devices, with its status and certificate.

device_id
required

An offline device 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 device.

The device.

Media typeapplication/json
object
id
required

An offline device 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}$/
owner_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}$/
public_key
required

A compressed P-256 public key (SEC1, 33 bytes), in lower-case hex.

string
/^0[23][0-9a-f]{64}$/
key_id
required
string
/^[0-9a-f]{16}$/
tier
required
string
Allowed values: A B C
attestation
required
string
Allowed values: none card android
label
required
string
status
required
string
Allowed values: active frozen lost revoked
status_reason
required
One of:
string
next_counter
required

The first counter the device’s next voucher authorises, at the least: it rises with every receipt recorded and every voucher issued.

integer
>= 1
certificate
required
object
body
required

The exact bytes signed, in lower-case hex (protocol §3).

string
/^([0-9a-f]{2})+$/
signature
required

An ECDSA P-256 signature, r || s with low s, in lower-case hex.

string
/^[0-9a-f]{128}$/
issuer_key_id
required
string
/^[0-9a-f]{16}$/
issued_at
required
string format: date-time
valid_until
required
string format: date-time

Example

{
"tier": "A",
"attestation": "none",
"status": "active"
}

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"
}