Developer API
Welcome to the first iteration of the Yiftee developer API! Below you will find descriptions of all API endpoints that will allow you to search for merchants, send gifts, and check the status of your purchases.
Things to know
All calls to our API MUST specify the api_token parameter. Certain function involving transactions must also contain the api_secret field. These values can be found in your app settings page. In addition, there are two different domains: app.yiftee.com/v2/ for production use and sandbox.yiftee.com/v2 for testing. Be sure to use the approptiate secret depending on which server you are querying.
API Objects
Below you'll find sample JSON objects that are returned from the Various API endpoints.
Merchant
{
"id": 138591,
"name": "Domino's Pizza",
"description": "Get a rad pizza!",
"web": "http://www.dominos.com/",
"image": "http://app.yiftee.com/system/merchants/business_photo_images/138591/icon_400x400/business_photo.jpg",
"logo": "http://app.yiftee.com/system/merchants/logo_images/138591/icon_400x400/logo.jpg",
"max_price": 200,
"min_price": 5,
"address": {
"address1": "876 Geary St.",
"address2": "",
"city": "San Francisco",
"state": "California",
"zipcode": "94109"
}
}
Receipt
{
"total": 6.25,
"account_balance": 975.0,
"invoice_id": 20890,
"transactions" : [
{
"audit_number": "JvVN7D5",
"recipient_details": {
"name": "Matt Green",
"email": "matt@yiftee.com",
"phone": ""
},
"message": "A Gift for You!",
"price_paid" : "6.25",
"sender_name" : "Aldo",
"gift": {
"merchant_id": 24,
"merchant_name": "Coupa Cafe",
"redeemable_at_copy": "538 Ramona St, Palo Alto, California 94301",
"amount": "5.00",
"status": "DELIVERED",
"expiration_date": "Tuesday Nov 31",
"recipient_gift_link": "http://app.yiftee.com/g/wvtcLlz",
"sender_gift_link": "http://app.yiftee.com/p/CM8KJlr",
"image_url": "https://app.yiftee.com/system/merchants/business_photo_images/24/icon_100x100_no_crop/coupamerchantphoto.png"
}
}
]
}
GET /account/balance
Returns the account balance
Response |
balance | number signifying current account balance |
GET /merchants/national_brands
Returns all national brands in our database
GET /merchants/lat_lon
Returns all merchants around area at lat/lon
Parameters |
lat | latitude   (required) |
lon | longitude   (required) |
radius | radius in miles of search; default=5 |
GET /merchants/zipcode
Get’s all merchants in specified zipcode
Parameters |
zipcode | zipcode   (required) |
limit | number of results to return; default=20 |
offset | offset of search results; default=5 |
GET /merchants/city_state
Returns all merchants in the specified city and state
Parameters |
city | city name   (required) |
state | state   (required) |
limit | number of results to return; default=20 |
offset | offset of search results; default=5 |
GET /gift/status
Returns the status of a given gift
Parameters |
audit_number | the audit number of the transaction   (required) |
GET /order/status
Returns the status of a given order (collection of gifts)
Parameters |
invoice_id | the invoice id of the order   (required) |
POST /gift/give
Send a gift
Parameters |
merchant_id | the id of the merchant   (required) |
price | amount of the gift to give   (required) |
sender_name | name of person sending gift; default=account name |
sender_image | an image to associate with the sender; default=account image |
sender_email | an email address of the sender; default=account email |
message | message to accompany gift; default=? |
recipient_email | email address to send gift to   (required for Yiftee to deliver gift unless recipient_phone is specified) |
recipient_phone | phone number to text gift to   (required for Yiftee to deliver gift unless recipient_email is specified) |
recipient_name | name of recipient; default=email or phone number |
exchangeable | can the gift be exchanged for a different merchant; default=true or false |
donatable | can the gift be donated; default=true or false |