API reference · Owned cards

Reveal a card

POST/v1/wallets/{walletId}/cards/{soldCardId}/reveal

Shows one bought card’s codes. Sends no body.

Permissioncards:reveal
AuthenticationSigned change
Staff-set limits it counts towardAll requests, Reveals
.NET SDKanis.OwnedCards.RevealAsync(walletId, soldCardId)

Parameters

NameInTypeNotes
walletIdrequiredpathUUIDA UUID, lower-case with hyphens.
soldCardIdrequiredpathUUIDA UUID, lower-case with hyphens.

Request

Signed with your key, with a one-time nonce and a digest of the body.

Headers: Signature-Input, Signature, Content-Digest, Nonce, X-Anis-Date, Accept-Language (optional). The SDKs set all of them for you.

Body: No body at all — not even {}. Any byte is refused with validation_failed. The signature still covers the digest of the empty body.

Responses

StatusMeaningBody
200Success.RevealedCredential
401Refused: not authenticated.Problem
403Refused: not allowed.Problem
404Refused: not found, or not yours.Problem
409Refused: conflicts with the current state.Problem
422Refused: the request breaks a rule.Problem
429Refused: a limit was reached.Problem
503No decision: a dependency was unavailable.Problem

Every answer is signed by Anis; the SDKs check it before you see it.

Refusals

Every refusal is a signed problem. Branch on its code; each links to what it means and what to do.

ErrorCodeStatus
Invalid credentialsinvalid_credentials401
Insufficient scopeinsufficient_scope403
Source address not allowedsource_ip_not_allowed403
Rate limitedrate_limited429
Replay detectedreplay_detected409
Account not authorisedbinding_not_authorized403
Account inactiveaccount_inactive403
Wallet not grantedwallet_not_granted404
Card not foundcard_not_found404
Validation failedvalidation_failed422
Reveal not allowedreveal_not_allowed409
Business subscription requiredbusiness_subscription_required409
Wallet disabledwallet_disabled409
Wallet expiredwallet_expired409
Service unavailabledependency_unavailable503
Request timeoutrequest_timeout504
Internal errorinternal_error500

Types

RevealedCredential

FieldTypeNotes
soldCardIdalways presentUUIDThe sold card these codes belong to.
serialNumberstringThe card’s serial number. A secret: store it where you keep secrets and never log it.
voucherstringThe card’s voucher code. A secret: store it where you keep secrets and never log it.
revealedAtstring (date-time)When it was revealed.