In this section: Gift cards

Gift cards

The gift cards in a member's wallet, and adding, updating, or removing one.

add_gift_card

Save a gift card to the member's wallet. Requires wallet-change access.

ScopeQuota
miles:writestandard
NameTypeRequiredDescription
merchantstringrequiredThe merchant the gift card is for, stored exactly as given -- there is no catalog to resolve it against, so spell it the way the member did.
amountnumberThe remaining balance in dollars, as a number (e.g. 73.40). 0 is a valid, meaningful balance for a drained card the member still holds; pass it rather than omitting the field.
expirationstringThe expiration date, written YYYY-MM-DD only. Any other spelling is refused rather than stored; leave it out if the member only knows an approximate date.
card_number_last4stringThe last four digits of the gift card number, exactly four digits. Write-only on this surface: never returned by this tool's echo or by get_gift_cards. Never a full card number or a PIN.
notesstringFree text about the card. Write-only on this surface: never returned by this tool's echo or by get_gift_cards, so do not store anything here you will need to read back. Never a full card number or a PIN.

get_gift_cards

The wallet's stored gift cards: merchant, balance, and expiration only.

ScopeQuota
miles:readstandard

No parameters.

remove_gift_card

Delete a gift card from the wallet -- a spent card, or one saved by mistake. Requires wallet-change access.

ScopeQuota
miles:writestandard
NameTypeRequiredDescription
lookup_merchantstringIdentify the card by its stored merchant name, e.g. REI, when that merchant appears exactly once. An ambiguous name is refused rather than guessed at; retry with card_id.
card_idstringIdentify the card exactly by the id get_gift_cards or an earlier add_gift_card echo returned, e.g. gc_1.

update_gift_card

Change a gift card already in the wallet -- most often its balance after the member spends some of it. Requires wallet-change access.

ScopeQuota
miles:writestandard
NameTypeRequiredDescription
lookup_merchantstringIdentify the card by its stored merchant name, e.g. REI. A name matching more than one stored card is refused with the candidates named; retry with card_id.
card_idstringIdentify the card exactly by the id get_gift_cards or an earlier add_gift_card echo returned, e.g. gc_1.
merchantstringNew merchant name; renames the card. Omit to leave unchanged.
amountnumberNew remaining balance in dollars, as a number. 0 records a fully drained card. Omit to leave unchanged.
expirationstringNew expiration date, written YYYY-MM-DD only; any other spelling is refused rather than stored. Omit to leave unchanged.
card_number_last4stringNew last four digits of the gift card number, exactly four digits. Write-only: never returned by this tool's echo or by get_gift_cards. Omit to leave unchanged; an empty string is also treated as no change.
notesstringNew free text about the card. Write-only: never returned by this tool's echo or by get_gift_cards. Omit to leave unchanged; an empty string is treated as no change, not as clearing the field.