API reference · Owned cards

List owned cards

GET/v1/wallets/{walletId}/owned-cards

GET /v1/wallets/{walletId}/owned-cards — The cards a wallet has bought, with their codes hidden: the price paid, expiry date and invoice number are shown. Pages with a cursor.

Permissioncards:read
AuthenticationSigned read
Anis’s answerNot signed
Staff-set limits it counts towardAll requests
.NET SDKanis.OwnedCards.ListAsync(walletId)

Parameters

NameInTypeNotes
walletIdrequiredpathUUIDA UUID, lower-case with hyphens.
cursoroptionalquerystringThe nextCursor of the previous page, passed back exactly as received. Leave it out for the first page.

Request

Signed with your key. No body, no nonce.

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

Body: none.

Responses

StatusMeaningBody
200Success.MaskedCardCollection
400Refused: the signed request is badly built.Problem
401Refused: not authenticated.Problem
403Refused: not allowed.Problem
404Refused: not found, or not yours.Problem
422Refused: the request breaks a rule.Problem
429Refused: a limit was reached.Problem
503No decision: a dependency was unavailable.Problem

The answers of this call are not signed — no Signature or Signature-Input header, success or refusal. There is nothing to verify; TLS protects them. Content-Digest and X-Request-Id are still present.

Refusals

A refusal of this call is a problem without a signature. 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
Account not authorisedbinding_not_authorized403
Account inactiveaccount_inactive403
Wallet not grantedwallet_not_granted404
Validation failedvalidation_failed422
Service unavailabledependency_unavailable503
Request timeoutrequest_timeout504
Internal errorinternal_error500

Types

MaskedCardCollection

FieldTypeNotes
itemsalways presentlist of MaskedCardThe owned cards on this page.
nextCursorstringPass it as cursor to get the next page. Absent on the last page.

MaskedCard

FieldTypeNotes
soldCardIdalways presentUUIDThe sold card’s id — what revealing one card takes.
operationIdUUIDThe operation id of the order that bought it.
invoiceIdanyThe invoice it is on — what revealing a whole invoice takes.
invoiceNumberintegerThe number printed on the invoice. Quote it when you write to support; the id to reveal by is invoiceId.
cardCardSummaryThe catalogue card it was sold from.
serialNumberMaskedstringThe serial number, partly hidden. The full codes come only from a reveal.
credentialAvailablealways presentbooleantrue only when revealing this card would give you a code. A refunded or invalid card, or one with no code, reads false: do not offer it to your end customer.
purchasedAtstring (date-time)When it was bought.
unitPriceanyWhat you paid for this card. A later refund does not change it.
expiryDatestring (date)The last day the card can be used, as yyyy-MM-dd. Tell your end customer. Absent when the card has none.

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.