API reference · Owned cards

Reveal a card

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

POST /v1/wallets/{walletId}/owned-cards/{soldCardId}/reveal — Shows one bought card’s codes. Sends no body.

Permissioncards:reveal
AuthenticationSigned change
Anis’s answerSigned
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
400Refused: the signed request is badly built.Problem
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 of this call is signed by Anis — success and every refusal. Require the signature and verify it before you act on the answer; an answer without one is a failure, never an answer (how).

Refusals

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

ErrorCodeStatus
Invalid credentialsinvalid_credentials401
Malformed signed requestmalformed_signed_request400
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.
expiryDatestring (date)The last day the card can be used, as yyyy-MM-dd. Tell your end customer. Absent when the card has none.
invoiceIdanyThe invoice the card is on. Also inside an order’s soldCards.
cardCardSummaryThe catalogue card that was sold, so you know which card these codes are for. Also inside an order’s soldCards.
purchasedAtstring (date-time)When the card was bought. Also inside an order’s soldCards.

CardSummary

FieldTypeNotes
idUUIDThe catalogue card’s id.
nameLocalizedTextThe card name in Arabic and English; empty localized text is omitted.
faceValuestringOptional printed value; absent when empty.
logostringOptional absolute URL of the subcategory logo; absent when empty.
subcategoryobjectThe card’s subcategory, with id and localized name.
subcategory.idUUIDThe subcategory’s id.
subcategory.nameLocalizedTextThe subcategory’s name in Arabic and English.
categoryobjectThe card’s category, with id and localized name.
category.idUUIDThe category’s id.
category.nameLocalizedTextThe category’s name in Arabic and English.

LocalizedText

FieldTypeNotes
arstringThe Arabic text; omitted when empty.
enstringThe English text; omitted when empty.