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.
| Scope | Quota |
|---|---|
miles:write | standard |
| Name | Type | Required | Description |
|---|---|---|---|
merchant | string | required | The 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. |
amount | number | The 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. | |
expiration | string | The 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_last4 | string | The 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. | |
notes | string | Free 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.
| Scope | Quota |
|---|---|
miles:read | standard |
No parameters.
remove_gift_card
Delete a gift card from the wallet -- a spent card, or one saved by mistake. Requires wallet-change access.
| Scope | Quota |
|---|---|
miles:write | standard |
| Name | Type | Required | Description |
|---|---|---|---|
lookup_merchant | string | Identify 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_id | string | Identify 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.
| Scope | Quota |
|---|---|
miles:write | standard |
| Name | Type | Required | Description |
|---|---|---|---|
lookup_merchant | string | Identify 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_id | string | Identify the card exactly by the id get_gift_cards or an earlier add_gift_card echo returned, e.g. gc_1. | |
merchant | string | New merchant name; renames the card. Omit to leave unchanged. | |
amount | number | New remaining balance in dollars, as a number. 0 records a fully drained card. Omit to leave unchanged. | |
expiration | string | New expiration date, written YYYY-MM-DD only; any other spelling is refused rather than stored. Omit to leave unchanged. | |
card_number_last4 | string | New 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. | |
notes | string | New 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. |