API reference · Owned cards
List owned cards
GET
/v1/wallets/{walletId}/owned-cardsGET /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.
Permission
cards:readAuthenticationSigned read
Anis’s answerNot signed
Staff-set limits it counts towardAll requests
.NET SDK
anis.OwnedCards.ListAsync(walletId)Parameters
| Name | In | Type | Notes |
|---|---|---|---|
walletIdrequired | path | UUID | A UUID, lower-case with hyphens. |
cursoroptional | query | string | The 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
| Status | Meaning | Body |
|---|---|---|
| 200 | Success. | MaskedCardCollection |
| 400 | Refused: the signed request is badly built. | Problem |
| 401 | Refused: not authenticated. | Problem |
| 403 | Refused: not allowed. | Problem |
| 404 | Refused: not found, or not yours. | Problem |
| 422 | Refused: the request breaks a rule. | Problem |
| 429 | Refused: a limit was reached. | Problem |
| 503 | No 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.
| Error | Code | Status |
|---|---|---|
| Invalid credentials | invalid_credentials | 401 |
| Malformed signed request | malformed_signed_request | 400 |
| Insufficient scope | insufficient_scope | 403 |
| Source address not allowed | source_ip_not_allowed | 403 |
| Rate limited | rate_limited | 429 |
| Account not authorised | binding_not_authorized | 403 |
| Account inactive | account_inactive | 403 |
| Wallet not granted | wallet_not_granted | 404 |
| Validation failed | validation_failed | 422 |
| Service unavailable | dependency_unavailable | 503 |
| Request timeout | request_timeout | 504 |
| Internal error | internal_error | 500 |
Types
MaskedCardCollection
| Field | Type | Notes |
|---|---|---|
itemsalways present | list of MaskedCard | The owned cards on this page. |
nextCursor | string | Pass it as cursor to get the next page. Absent on the last page. |
MaskedCard
| Field | Type | Notes |
|---|---|---|
soldCardIdalways present | UUID | The sold card’s id — what revealing one card takes. |
operationId | UUID | The operation id of the order that bought it. |
invoiceId | any | The invoice it is on — what revealing a whole invoice takes. |
invoiceNumber | integer | The number printed on the invoice. Quote it when you write to support; the id to reveal by is invoiceId. |
card | CardSummary | The catalogue card it was sold from. |
serialNumberMasked | string | The serial number, partly hidden. The full codes come only from a reveal. |
credentialAvailablealways present | boolean | true 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. |
purchasedAt | string (date-time) | When it was bought. |
unitPrice | any | What you paid for this card. A later refund does not change it. |
expiryDate | string (date) | The last day the card can be used, as yyyy-MM-dd. Tell your end customer. Absent when the card has none. |
CardSummary
| Field | Type | Notes |
|---|---|---|
id | UUID | The catalogue card’s id. |
name | LocalizedText | The card name in Arabic and English; empty localized text is omitted. |
faceValue | string | Optional printed value; absent when empty. |
logo | string | Optional absolute URL of the subcategory logo; absent when empty. |
subcategory | object | The card’s subcategory, with id and localized name. |
subcategory.id | UUID | The subcategory’s id. |
subcategory.name | LocalizedText | The subcategory’s name in Arabic and English. |
category | object | The card’s category, with id and localized name. |
category.id | UUID | The category’s id. |
category.name | LocalizedText | The category’s name in Arabic and English. |
LocalizedText
| Field | Type | Notes |
|---|---|---|
ar | string | The Arabic text; omitted when empty. |
en | string | The English text; omitted when empty. |