EGift
EGifts are used for sending virtual gift cards to other customers.
Send an EGift
This request allows users to transmit funds to another person.
To send an egift as a guest, the buyer must supply their name and email, the name and email of the recipient, and their payment card details, as well as the amount that is being gifted.
For a registered user, their active login session id can be supplied, and the reference number of the billing profile they would like to use to pay for the egift can be entered instead of complete card details.
The egift arrives to the recipient in an email, which directs them to a page that allows them to log in or register with this vendor in order to accept the gift.
Query parameters
- Name
session_key- Type
- string
- Description
Session token for an end-customer.
Path parameters
- Name
vendor_id- Type
- integer
- Description
The internal reference number for the vendor.
Required attributes
- Name
amount- Type
- float
- Description
The amount that is being charged to the buyer and that is being gifted to a recipient.
- Name
buyer- Type
- object
- Description
An object that holds the buyer's information.
- Name
recipient- Type
- object
- Description
An object that holds the recipient's information.
- Name
message- Type
- object
- Description
A message from the buyer to the recipient.
- Name
billing- Type
- object
- Description
An object that holds the buyer's billing information.
Response attributes
- Name
user_egift_id- Type
- integer
- Description
An internal reference number unique to each egift.
- Name
receipt- Type
- object
- Description
An object that holds information about the receipt for this transaction.
- Name
recipient_email- Type
- string
- Description
The email of the recipient of this egift.
- Name
buyer_email- Type
- string
- Description
The email of the sender of this egift.
- Name
amount- Type
- float
- Description
The amount that is being charged to the sender's account and loaded to the recipient's account.
- Name
release_date- Type
- integer
- Description
The date this egift was released to be accepted by the recipient.
- Name
status- Type
- object
- Description
An object that contains information about the current status of the egift.
Request
curl -G https://api.spoonity.com/vendor/{vendor_id}/egift?session_key={session_key} \
-d '{
"amount": 20.00,
"buyer": {
"name": "Grace Duncan",
"email": "grace@spoonity.com"
},
"recipient": {
"name": "Grace Duncan",
"email": "grace+1@spoonity.com"
},
"message": "yew get a gift",
"billing": {
"name":"Test Card",
"number":"4242424242424242",
"expiry":{
"month":"06",
"year":"19"
},
"cvv":"123",
"zip_code":"k1n1k2"
},
"image_url": null
}'
Response
{
"user_egift_id": 6596,
"receipt": {
"receipt_id": 17075073,
"receipt_date": 1559738902,
"subtotal": 20,
"receiptType": {
"receiptType_id": 4,
"name": "E-Gift"
},
"receiptStatus": {
"receiptStatus_id": 1,
"name": "Purchase"
},
"status": {
"status_id": 1,
"name": "Active"
}
},
"recipient_email": "grace+1@spoonity.com",
"buyer_email": "grace@spoonity.com",
"amount": 20,
"release_date": 1559738903,
"status": {
"status_id": 1,
"name": "Active"
}
}
Retrieve a list of images that can be attached to EGifts
This request returns a list of images available with this vendor to be included in the egift email.
Path parameters
- Name
vendor_id- Type
- string
- Description
The internal reference number for the vendor.
Response attributes
- Name
name- Type
- string
- Description
Identifies the image in a way that is user friendly.
- Name
url- Type
- string
- Description
A direct url to the image.
- Name
tags- Type
- array
- Description
An array of strings, where each is a keyword that allows this image to be found with a search.
Request
curl -G https://api.spoonity.com/vendor/{vendor}/egift/images
Response
[
{
"name": "Merry Christmas",
"url": "https://www.spoonity.com/images/egift/136.jpg",
"tags": ["holidays", "seasonal"]
},
{
"name": "Happy Birthday",
"url": "https://www.spoonity.com/images/egift/137.jpg",
"tags": ["birthday"]
},
]