curl --request POST \
--url https://api.elliephant.com/api/gift-link \
--header 'API-KEY: <api-key>' \
--header 'API-PASSWORD: <api-key>' \
--header 'CLIENT-ID: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"order_ref_id": "<string>",
"product_id": 123,
"variation_id": 123,
"currency": "<string>",
"base_location": "<string>",
"gift_of_choice": "<string>",
"order_branding": "<string>",
"recipient_details": [
{
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"delivery_address": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"suburb": "<string>",
"state": "<string>",
"postcode_zipcode": "<string>",
"country": "<string>"
}
}
]
}
'import requests
url = "https://api.elliephant.com/api/gift-link"
payload = {
"order_ref_id": "<string>",
"product_id": 123,
"variation_id": 123,
"currency": "<string>",
"base_location": "<string>",
"gift_of_choice": "<string>",
"order_branding": "<string>",
"recipient_details": [
{
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"delivery_address": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"suburb": "<string>",
"state": "<string>",
"postcode_zipcode": "<string>",
"country": "<string>"
}
}
]
}
headers = {
"CLIENT-ID": "<api-key>",
"API-KEY": "<api-key>",
"API-PASSWORD": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'CLIENT-ID': '<api-key>',
'API-KEY': '<api-key>',
'API-PASSWORD': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
order_ref_id: '<string>',
product_id: 123,
variation_id: 123,
currency: '<string>',
base_location: '<string>',
gift_of_choice: '<string>',
order_branding: '<string>',
recipient_details: [
{
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone_number: '<string>',
delivery_address: {
address_line_1: '<string>',
address_line_2: '<string>',
suburb: '<string>',
state: '<string>',
postcode_zipcode: '<string>',
country: '<string>'
}
}
]
})
};
fetch('https://api.elliephant.com/api/gift-link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.elliephant.com/api/gift-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'order_ref_id' => '<string>',
'product_id' => 123,
'variation_id' => 123,
'currency' => '<string>',
'base_location' => '<string>',
'gift_of_choice' => '<string>',
'order_branding' => '<string>',
'recipient_details' => [
[
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'phone_number' => '<string>',
'delivery_address' => [
'address_line_1' => '<string>',
'address_line_2' => '<string>',
'suburb' => '<string>',
'state' => '<string>',
'postcode_zipcode' => '<string>',
'country' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"API-PASSWORD: <api-key>",
"CLIENT-ID: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.elliephant.com/api/gift-link"
payload := strings.NewReader("{\n \"order_ref_id\": \"<string>\",\n \"product_id\": 123,\n \"variation_id\": 123,\n \"currency\": \"<string>\",\n \"base_location\": \"<string>\",\n \"gift_of_choice\": \"<string>\",\n \"order_branding\": \"<string>\",\n \"recipient_details\": [\n {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"delivery_address\": {\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"suburb\": \"<string>\",\n \"state\": \"<string>\",\n \"postcode_zipcode\": \"<string>\",\n \"country\": \"<string>\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("CLIENT-ID", "<api-key>")
req.Header.Add("API-KEY", "<api-key>")
req.Header.Add("API-PASSWORD", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.elliephant.com/api/gift-link")
.header("CLIENT-ID", "<api-key>")
.header("API-KEY", "<api-key>")
.header("API-PASSWORD", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"order_ref_id\": \"<string>\",\n \"product_id\": 123,\n \"variation_id\": 123,\n \"currency\": \"<string>\",\n \"base_location\": \"<string>\",\n \"gift_of_choice\": \"<string>\",\n \"order_branding\": \"<string>\",\n \"recipient_details\": [\n {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"delivery_address\": {\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"suburb\": \"<string>\",\n \"state\": \"<string>\",\n \"postcode_zipcode\": \"<string>\",\n \"country\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.elliephant.com/api/gift-link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["CLIENT-ID"] = '<api-key>'
request["API-KEY"] = '<api-key>'
request["API-PASSWORD"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_ref_id\": \"<string>\",\n \"product_id\": 123,\n \"variation_id\": 123,\n \"currency\": \"<string>\",\n \"base_location\": \"<string>\",\n \"gift_of_choice\": \"<string>\",\n \"order_branding\": \"<string>\",\n \"recipient_details\": [\n {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"delivery_address\": {\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"suburb\": \"<string>\",\n \"state\": \"<string>\",\n \"postcode_zipcode\": \"<string>\",\n \"country\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"order_data": {
"order_id": 152,
"order_number": "EO-00152"
},
"order_totals": {
"currency": "AUD",
"product_price": 110,
"qty": 2,
"shipping_cost": 22,
"subtotal": 242,
"order_fee": 9.68,
"order_total": 251.68
},
"recipient_return": [
{
"suborder_id": 357,
"suborder_number": "EO-00152-1",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"gift_url": "https://elliephantv2.com/redeem-your-gift/bfb7f903acf87bfea4c9698f3e2a6138"
},
{
"suborder_id": 358,
"suborder_number": "EO-00152-2",
"first_name": "Jane",
"last_name": "Smith",
"email": "[email protected]",
"gift_url": "https://elliephantv2.com/redeem-your-gift/a5c7ba3d3d4c7250ccc3191a938030d5"
}
]
}{
"status": "error",
"message": "You need to set a product_id"
}Place a gifting order
curl --request POST \
--url https://api.elliephant.com/api/gift-link \
--header 'API-KEY: <api-key>' \
--header 'API-PASSWORD: <api-key>' \
--header 'CLIENT-ID: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"order_ref_id": "<string>",
"product_id": 123,
"variation_id": 123,
"currency": "<string>",
"base_location": "<string>",
"gift_of_choice": "<string>",
"order_branding": "<string>",
"recipient_details": [
{
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"delivery_address": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"suburb": "<string>",
"state": "<string>",
"postcode_zipcode": "<string>",
"country": "<string>"
}
}
]
}
'import requests
url = "https://api.elliephant.com/api/gift-link"
payload = {
"order_ref_id": "<string>",
"product_id": 123,
"variation_id": 123,
"currency": "<string>",
"base_location": "<string>",
"gift_of_choice": "<string>",
"order_branding": "<string>",
"recipient_details": [
{
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"delivery_address": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"suburb": "<string>",
"state": "<string>",
"postcode_zipcode": "<string>",
"country": "<string>"
}
}
]
}
headers = {
"CLIENT-ID": "<api-key>",
"API-KEY": "<api-key>",
"API-PASSWORD": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'CLIENT-ID': '<api-key>',
'API-KEY': '<api-key>',
'API-PASSWORD': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
order_ref_id: '<string>',
product_id: 123,
variation_id: 123,
currency: '<string>',
base_location: '<string>',
gift_of_choice: '<string>',
order_branding: '<string>',
recipient_details: [
{
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone_number: '<string>',
delivery_address: {
address_line_1: '<string>',
address_line_2: '<string>',
suburb: '<string>',
state: '<string>',
postcode_zipcode: '<string>',
country: '<string>'
}
}
]
})
};
fetch('https://api.elliephant.com/api/gift-link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.elliephant.com/api/gift-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'order_ref_id' => '<string>',
'product_id' => 123,
'variation_id' => 123,
'currency' => '<string>',
'base_location' => '<string>',
'gift_of_choice' => '<string>',
'order_branding' => '<string>',
'recipient_details' => [
[
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'phone_number' => '<string>',
'delivery_address' => [
'address_line_1' => '<string>',
'address_line_2' => '<string>',
'suburb' => '<string>',
'state' => '<string>',
'postcode_zipcode' => '<string>',
'country' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"API-PASSWORD: <api-key>",
"CLIENT-ID: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.elliephant.com/api/gift-link"
payload := strings.NewReader("{\n \"order_ref_id\": \"<string>\",\n \"product_id\": 123,\n \"variation_id\": 123,\n \"currency\": \"<string>\",\n \"base_location\": \"<string>\",\n \"gift_of_choice\": \"<string>\",\n \"order_branding\": \"<string>\",\n \"recipient_details\": [\n {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"delivery_address\": {\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"suburb\": \"<string>\",\n \"state\": \"<string>\",\n \"postcode_zipcode\": \"<string>\",\n \"country\": \"<string>\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("CLIENT-ID", "<api-key>")
req.Header.Add("API-KEY", "<api-key>")
req.Header.Add("API-PASSWORD", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.elliephant.com/api/gift-link")
.header("CLIENT-ID", "<api-key>")
.header("API-KEY", "<api-key>")
.header("API-PASSWORD", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"order_ref_id\": \"<string>\",\n \"product_id\": 123,\n \"variation_id\": 123,\n \"currency\": \"<string>\",\n \"base_location\": \"<string>\",\n \"gift_of_choice\": \"<string>\",\n \"order_branding\": \"<string>\",\n \"recipient_details\": [\n {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"delivery_address\": {\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"suburb\": \"<string>\",\n \"state\": \"<string>\",\n \"postcode_zipcode\": \"<string>\",\n \"country\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.elliephant.com/api/gift-link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["CLIENT-ID"] = '<api-key>'
request["API-KEY"] = '<api-key>'
request["API-PASSWORD"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_ref_id\": \"<string>\",\n \"product_id\": 123,\n \"variation_id\": 123,\n \"currency\": \"<string>\",\n \"base_location\": \"<string>\",\n \"gift_of_choice\": \"<string>\",\n \"order_branding\": \"<string>\",\n \"recipient_details\": [\n {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"delivery_address\": {\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"suburb\": \"<string>\",\n \"state\": \"<string>\",\n \"postcode_zipcode\": \"<string>\",\n \"country\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"order_data": {
"order_id": 152,
"order_number": "EO-00152"
},
"order_totals": {
"currency": "AUD",
"product_price": 110,
"qty": 2,
"shipping_cost": 22,
"subtotal": 242,
"order_fee": 9.68,
"order_total": 251.68
},
"recipient_return": [
{
"suborder_id": 357,
"suborder_number": "EO-00152-1",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"gift_url": "https://elliephantv2.com/redeem-your-gift/bfb7f903acf87bfea4c9698f3e2a6138"
},
{
"suborder_id": 358,
"suborder_number": "EO-00152-2",
"first_name": "Jane",
"last_name": "Smith",
"email": "[email protected]",
"gift_url": "https://elliephantv2.com/redeem-your-gift/a5c7ba3d3d4c7250ccc3191a938030d5"
}
]
}{
"status": "error",
"message": "You need to set a product_id"
}Authorizations
Body
ID generated from your system passed to ours that is the unique reference number for this order.
This the product id of the product that you want to gift.
The variation id of the product you would like to gift. Only needed if the product is a variable product.
The country code in ISO 3166-1 alpha-2 format. eg AU for Australia.
An option if you want your user to have an option to choose a different gift as a gift of choice. This is either a Y or N.
The type of branding that you are want for your gift link. This is either elliephant or company. company can only be used if your company branding as been set in your company profile.
An array of information about the recipient.
Show child attributes
Show child attributes
Response
Successful response
Detail on if the order was placed successfully. Will either be success or error
An array containing the order values.
Show child attributes
Show child attributes
An array containing the order totals.
Show child attributes
Show child attributes
An array containing the recipient details.
Show child attributes
Show child attributes