{"openapi":"3.1.0","info":{"title":"cardyay gift card search","version":"1.0.0","description":"cardyay (https://cardyay.com) is an online gift card shop. People buy digital gift cards from well-known brands and send them by e-mail, to themselves or as a gift with a personal note, right away or on a date they pick. Cards usually arrive within minutes. Payment is by card, Apple Pay or Google Pay; no account is needed.\n\nKeyless. Search cards, read one (getGiftCard), price it at an exact value with quoteGiftCard (the price, and the saving against paying the store that amount directly, if any), then either send the person to the card's url, or prepare the order with createAgentCheckout and give them the payUrl: the person pays there, so nothing is charged without them. The same tools are on the MCP server at https://cardyay.com/mcp; a guide for shopping agents is at https://cardyay.com/agent.md.","contact":{"url":"https://cardyay.com/help"}},"servers":[{"url":"https://cardyay.com"}],"paths":{"/api/public/cards/{id}":{"get":{"operationId":"getGiftCard","summary":"One gift card in full","description":"The values a card is sold at, the countries it is used in, how it is delivered, its terms, the offer it carries and the cardyay credit it earns (each null when there is none).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Card id from the search."}],"responses":{"200":{"description":"The card.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardDetail"}}}},"404":{"description":"No card on sale with this id."},"429":{"description":"Too many requests; wait a minute."}}}},"/api/public/quote":{"get":{"operationId":"quoteGiftCard","summary":"Exact price of a card at one value, and the saving against paying the store directly","description":"Live price for a buyer an AI agent sends. savingVersusPayingDirectly > 0 (saves: true) means buying the card and paying the store with it costs less than paying the store that amount directly; 0 or below means it does not. Check the brand accepts its gift card for the purchase before relying on it. creditEarned is the cardyay credit the card earns for the buyer's next order; it is not part of the saving.","parameters":[{"name":"card","in":"query","required":true,"schema":{"type":"string"},"description":"Card id from the search."},{"name":"amount","in":"query","required":true,"schema":{"type":"number","exclusiveMinimum":0},"description":"Card value in its own currency, e.g. 50."}],"responses":{"200":{"description":"The quote.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"description":"card or amount is missing."},"404":{"description":"No card on sale with this id."},"422":{"description":"The amount is not one this card is sold at."},"429":{"description":"Too many requests; wait a minute."}}}},"/api/public/cards":{"get":{"operationId":"searchGiftCards","summary":"Search the gift cards and prepaid cards on sale","description":"Find gift cards and prepaid cards by brand name, country and category (\"prepaid\" lists the prepaid cards). Each result has its kind (\"gift\" or \"prepaid\"). Use the url of a result to send the person to buy that card.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Brand or category, e.g. \"amazon\", \"coffee\", \"gaming\", \"prepaid\"."},{"name":"country","in":"query","schema":{"type":"string","minLength":2,"maxLength":2},"description":"ISO country code where the card will be used, e.g. US, GB, DE."},{"name":"category","in":"query","schema":{"type":"string"},"description":"Exact category name, e.g. \"Food & drink\"."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Matching cards, best name matches first.","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"offset":{"type":"integer"},"limit":{"type":"integer"},"cards":{"type":"array","items":{"$ref":"#/components/schemas/GiftCard"}}}}}}},"429":{"description":"Too many requests; wait a minute."}}}},"/api/public/checkout":{"post":{"operationId":"createAgentCheckout","summary":"Prepare an order for a person and get the link where they pay","description":"Creates an unpaid order for one or more cards and returns payUrl. Give payUrl to the person: they pay there by card, Apple Pay or Google Pay, and the cards are e-mailed the moment the payment goes through. Unpaid orders close by themselves. Up to 20 orders per 10 minutes per address.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items","email"],"properties":{"email":{"type":"string","format":"email","description":"The buyer: gets the receipt, and the cards not sent as gifts."},"name":{"type":"string","description":"The buyer's name, optional."},"items":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"object","required":["id","value"],"properties":{"id":{"type":"string","description":"Card id from searchGiftCards."},"value":{"type":"number","description":"Card value in major units, within the card's minValue and maxValue (and one of its values for fixed cards)."},"quantity":{"type":"integer","minimum":1,"maximum":10,"default":1},"gift":{"type":"object","required":["recipientEmail"],"properties":{"recipientEmail":{"type":"string","format":"email"},"recipientName":{"type":"string"},"senderName":{"type":"string"},"message":{"type":"string","maxLength":500},"deliverAt":{"type":"string","format":"date-time","description":"When to send it; omit to send as soon as it is paid."}}}}}}}}}}},"responses":{"201":{"description":"Order prepared. Give payUrl to the person.","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"type":"string"},"currency":{"type":"string"},"total":{"type":"number"},"totalMinor":{"type":"integer"},"payUrl":{"type":"string","format":"uri"},"note":{"type":"string"}}}}}},"400":{"description":"The request is not valid; issues lists what to fix."},"422":{"description":"A card or value is not on sale, or the order breaks a limit; error says which."},"429":{"description":"Too many orders; wait a few minutes."}}}},"/api/public/feed":{"get":{"operationId":"listAllGiftCards","summary":"Every gift card and prepaid card on sale, as a product feed","description":"One item per card: title, description, link, image, price (its smallest value; any service fee is added at checkout), currency, countries, availability and product_category (\"Gift Cards\" or \"Prepaid Cards\"). custom_label_0 is \"deal\" (the card carries the website offer), \"credit\" (it earns cardyay credit and carries no offer) or \"value\" (neither). A card that earns credit also has creditPercent (the share of its price it earns for the buyer's next order) and creditPercentInBundle (what it earns when the same order also has a gift card that sells at its value).","responses":{"200":{"description":"All cards with title, link, image, price and availability.","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"GiftCard":{"type":"object","required":["id","kind","name","countries","currency","minValue","maxValue","url"],"properties":{"id":{"type":"string","description":"Stable card id (also the last part of its page address)."},"kind":{"type":"string","enum":["gift","prepaid"],"description":"A brand’s gift card, or a prepaid card (a general-purpose card spent where its terms allow)."},"name":{"type":"string","description":"Brand name of the card, e.g. \"Amazon US\"."},"countries":{"type":"array","items":{"type":"string","description":"ISO 3166-1 alpha-2"},"description":"Countries the card can be used in."},"currency":{"type":"string","description":"ISO 4217 currency the card is sold and paid in."},"minValue":{"type":"number","description":"Smallest value a buyer can choose, in major units."},"maxValue":{"type":"number","description":"Largest value a buyer can choose, in major units."},"categories":{"type":"array","items":{"type":"string"}},"url":{"type":"string","format":"uri","description":"Page where a person buys the card (pick a value, gift or self, pay)."},"image":{"type":["string","null"],"format":"uri","description":"Card artwork."},"soldOut":{"type":"boolean","description":"Present and true when the card has no code left at any value right now: shown, but it cannot be bought."},"delivery":{"type":"string","enum":["code"],"description":"Present when the card is e-mailed as a code; otherwise it comes by e-mail as a link to the card (see getGiftCard)."}}},"CardDetail":{"type":"object","required":["id","kind","name","countries","currency","minValue","maxValue","url","values","delivery","whereToUse","quote"],"properties":{"id":{"type":"string","description":"Stable card id (also the last part of its page address)."},"kind":{"type":"string","enum":["gift","prepaid"],"description":"A brand’s gift card, or a prepaid card (a general-purpose card spent where its terms allow)."},"name":{"type":"string","description":"Brand name of the card, e.g. \"Amazon US\"."},"countries":{"type":"array","items":{"type":"string","description":"ISO 3166-1 alpha-2"},"description":"Countries the card can be used in."},"currency":{"type":"string","description":"ISO 4217 currency the card is sold and paid in."},"minValue":{"type":"number","description":"Smallest value a buyer can choose, in major units."},"maxValue":{"type":"number","description":"Largest value a buyer can choose, in major units."},"categories":{"type":"array","items":{"type":"string"}},"url":{"type":"string","format":"uri","description":"Page where a person buys the card (pick a value, gift or self, pay)."},"image":{"type":["string","null"],"format":"uri","description":"Card artwork."},"soldOut":{"type":"boolean","description":"Present and true when the card has no code left at any value right now: shown, but it cannot be bought."},"values":{"description":"The values the card is sold at, in major units: a list (fixed) or any amount between min and max (range).","oneOf":[{"type":"object","required":["type","options"],"properties":{"type":{"const":"fixed"},"options":{"type":"array","items":{"type":"number"}}}},{"type":"object","required":["type","min","max"],"properties":{"type":{"const":"range"},"min":{"type":"number"},"max":{"type":"number"}}}]},"delivery":{"type":"string","description":"How and when the card arrives, in a sentence (by e-mail, usually within minutes; any check before it is sent)."},"whereToUse":{"type":"string","description":"Where the card can be spent, and who decides it."},"about":{"type":["string","null"],"description":"The card in plain words."},"howToRedeem":{"type":["string","null"],"description":"How the card is used, when the brand gives steps."},"terms":{"type":["string","null"],"description":"The card’s own terms, when the brand gives them."},"offer":{"type":["object","null"],"description":"The offer the card carries for buyers an AI agent sends, or null.","properties":{"name":{"type":"string"},"percentOff":{"type":"number"},"appliesTo":{"type":"string"}}},"credit":{"type":["object","null"],"description":"The cardyay credit the card earns for the buyer's next order once it is delivered, or null when it earns none. percent: the share of the card price (after any offer) it earns; percentInBundle: what it earns when the same order also has a gift card that sells at its value; text: the same in a sentence.","properties":{"percent":{"type":"number"},"percentInBundle":{"type":"number"},"text":{"type":"string"}}},"quote":{"type":"string","description":"The quoteGiftCard address for this card; put the card value in place of <value>."}}},"Quote":{"type":"object","properties":{"card":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"}}},"currency":{"type":"string"},"cardValue":{"type":"number"},"serviceFee":{"type":"number"},"offer":{"type":["object","null"],"properties":{"name":{"type":"string"},"text":{"type":"string"},"amountOff":{"type":"number"}}},"youPay":{"type":"number"},"savingVersusPayingDirectly":{"type":"number","description":"cardValue - youPay. Negative: paying the store directly is cheaper."},"saves":{"type":"boolean"},"creditEarned":{"type":"number","description":"The cardyay credit this card at this value earns for the buyer's next order once it is delivered, in its currency; 0 for none. Not taken off youPay."},"quotedAt":{"type":"string","format":"date-time"},"note":{"type":"string"}}}}}}