Welcome to Flexigift, the service that lets you spend your gift cards at Amazon.com. This quick start will walk you through:
Do this first!
Customers who want to spend their third-party gift cards at Amazon.com must first register with Flexigift. Flexigift supports multiple users, but in this walkthrough we will add only one.
To register a user with Flexigift:
user_id
: A unique user ID of your choosing.amazon_id
: The user’s Amazon account ID.name
: Full name. Jack Johnson in this example.email
: A valid email address.Ex:
curl -POST -H "Content-type: application/json" -d ' {
"user_id": "user006",
"amazon_id": "amz3456",
"name": "Jack Johnson",
"email": "jack.johnson@example.com",
}' 'http://localhost:3000/users'
Note the unique id
in the system’s response (7 in our example). You will need it to link a
gift card to this user later.
Ex:
{
"user_id": "user006",
"amazon_id": "amz3456",
"name": "Jack Johnson",
"email": "jack.johnson@example.com",
"id": 7
}
Jack has a gift card from Kohl’s that he would like to spend at Amazon.com. Let’s register his card with Flexigift:
card_id
: Unique identifier provided by the issuer of the card.user_id
: The user associated with the payment card. Jack’s ID is user006.issuer
: The merchant that issued the payment card. Kohls in this case.balance
: How much money is left on the card.expiry_date
: Date the gift card expires.Ex:
curl -XPOST -H "Content-type: application/json" -d ' {
"card_id": "kohls-gc-001",
"user_id": "user006",
"issuer": "Kohls",
"balance": 250,
"expiry_date": "2025-12-31"
}' 'http://localhost:3000/gift_cards'
Note the unique id
in the system’s response (6 in our example):
{
"card_id": "kohls-gc-001",
"user_id": "user006",
"issuer": "Kohls",
"balance": 250,
"expiry_date": "2025-12-31",
"id": 6
}
Now that Jack and his Kohl’s gift card are registerd with Flexigift, link the card to Jack’s Flexigift
account. Do this by adding the card_id
of Jack’s Kohl’s gift card to his account:
IMPORTANT!: The Update User request overwrites all of the exiting user’s data. You must re-submit
all of your user’s existing data or it will be cleared.
user_id
: user006amazon_id
: amz3456name
: Jack Johnsonemail
: jack.johnson@example.comgift_cards
: kohls-gc-001Ex:
curl -XPUT -H "Content-type: application/json" -d ' {
"user_id": "user006",
"amazon_id": "amz3456",
"name": "Jack Johnson",
"email": "jack.johnson@example.com",
"gift_cards": ["kohls-gc-001"]
}' 'http://localhost:3000/users/6'
Note that the system response shows that Jack’s user account is now linked to his Kohl’s card via
the gift_cards
property:
{
"user_id": "user006",
"amazon_id": "amz3456",
"name": "Jack Johnson",
"email": "jack.johnson@example.com",
"gift_cards": [
"kohls-gc-001"
],
"id": 6
}
The gift card issuers (Kohl’s in our example) decide which of their products are eligible to be purchased through Flexigift. Jack now has a Kohl’s card linked to his account and ready to spend, but there are no eligible products for him to buy. Let’s change that!
To register an eligible product:
product_id
: Part number provided by the issuer.name
: Product name provided by the issuer.price
: Price provided by the issuer.eligible_issuer
: The company that issued the card.Ex:
curl -XPOST -H "Content-type: application/json" -d ' {
"product_id": "kohls-dogbed-001",
"name": "Deluxe Round Dog Bed",
"price": "50.00",
"eligible_issuer": "Kohls"
}' 'http://localhost:3000/products
Note in the system response that the system has assigned a unique internal id
property:
{
"product_id": "kohls-dogbed-001",
"name": "Deluxe Round Dog Bed",
"price": "50.00",
"eligible_issuer": "Kohls",
"id": 5
}
Now that Jack Johnson’s Kohl’s gift card is linked to his Flexigift account, and an eligible Kohl’s catalog item is registered with Flexigift, when Jack adds the Kohl’s Deluxe Round Dog Bed to his Amazon.com shopping cart, Amazon will offer him the option to pay with his Kohl’s gift card.