API reference · Catalogue

List cards for sale

GET/v1/wallets/{walletId}/catalog/subcategories/{subcategoryId}/cards

The cards of a subcategory that this wallet can buy, with the price this wallet pays. Pages with a cursor.

Permissioncatalogue:read
AuthenticationSigned read
Staff-set limits it counts towardAll requests
.NET SDKanis.Catalogue.ListCardsAsync(walletId, subcategoryId)
  • Send a card’s unitPrice as the order’s expectedUnitPrice. The other prices are for display.

Parameters

NameInTypeNotes
walletIdrequiredpathUUIDA UUID, lower-case with hyphens.
subcategoryIdrequiredpathUUIDA 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.CatalogueCollection
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

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
Account not authorisedbinding_not_authorized403
Account inactiveaccount_inactive403
Wallet not grantedwallet_not_granted404
Not foundresource_not_found404
Validation failedvalidation_failed422
Service unavailabledependency_unavailable503
Request timeoutrequest_timeout504
Internal errorinternal_error500

Types

CatalogueCollection

FieldTypeNotes
itemsalways presentlist of CatalogueObjectThe categories, subcategories or cards on this page — each list route returns one kind.
nextCursorstringPass it as cursor to get the next page. Absent on the last page.

CatalogueObject

One of: CatalogueCategory, CatalogueSubcategory, CatalogueCard — each route answers with exactly one of them.

CatalogueCategory

FieldTypeNotes
idalways presentUUIDThe category’s id.
nameLocalizedTextThe category’s name, in Arabic and English.
descriptionLocalizedTextA description, in Arabic and English.
logostringThe address of the category’s logo image.
typestringWhether the category is local or international. Values: local, international
inStockalways presentbooleanWhether anything in it can be bought now.
displayOrderalways presentintegerThe order to show categories in — lower first.

LocalizedText

FieldTypeNotes
arstringThe Arabic text.
enstringThe English text.

CatalogueSubcategory

FieldTypeNotes
idalways presentUUIDThe subcategory’s id.
categoryIdalways presentUUIDThe category it belongs to.
nameLocalizedTextThe subcategory’s name, in Arabic and English.
descriptionLocalizedTextA description, in Arabic and English.
logostringThe address of the subcategory’s logo image.
isBestSellingalways presentbooleanMarked by Anis as a best seller.
displayOrderalways presentintegerThe order to show subcategories in — lower first.
availablealways presentbooleanWhether it can be bought from now.

CatalogueCard

FieldTypeNotes
idalways presentUUIDThe card’s id — the cardId an order carries.
subcategoryIdalways presentUUIDThe subcategory it belongs to.
nameLocalizedTextThe card’s name, in Arabic and English.
faceValuestringThe value printed on the card, when it has one.
unitPriceMoneyThe price THIS wallet pays. Send it unchanged as the order’s expectedUnitPrice. A card without it cannot be sold to this wallet.
businessPriceMoneyFor display. An order at this price can be refused as price_changed.
personalPriceMoneyThe retail price, shown only while it is above the business price. For display.
hasSpecialOfferalways presentbooleanWhether a special offer applies.
specialOfferPriceMoneyThe offer price, shown only with a special offer. For display.
availablealways presentbooleanWhether the card can be bought now.

Money

FieldTypeNotes
amountalways presentstringA decimal string with exactly three decimals, such as "10.500" — never a JSON number.
currencyalways presentstringThe currency code, such as LYD: always the wallet’s currency.
asOfstring (date-time)When this price or balance was read.