Place an order
curl --request POST \
--url https://api.elliephant.com/api/order \
--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>",
"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/order"
payload = {
"order_ref_id": "<string>",
"product_id": 123,
"variation_id": 123,
"currency": "<string>",
"base_location": "<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>',
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/order', 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/order",
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>',
'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/order"
payload := strings.NewReader("{\n \"order_ref_id\": \"<string>\",\n \"product_id\": 123,\n \"variation_id\": 123,\n \"currency\": \"<string>\",\n \"base_location\": \"<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/order")
.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 \"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/order")
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 \"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": 145,
"order_number": "EO-00145"
},
"order_totals": {
"currency": "AUD",
"product_price": 110,
"qty": 2,
"subtotal": 242,
"shipping_cost": 22,
"order_fee": 9.68,
"order_total": 251.68
}
}Orders
Place an order
POST
/
api
/
order
Place an order
curl --request POST \
--url https://api.elliephant.com/api/order \
--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>",
"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/order"
payload = {
"order_ref_id": "<string>",
"product_id": 123,
"variation_id": 123,
"currency": "<string>",
"base_location": "<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>',
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/order', 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/order",
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>',
'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/order"
payload := strings.NewReader("{\n \"order_ref_id\": \"<string>\",\n \"product_id\": 123,\n \"variation_id\": 123,\n \"currency\": \"<string>\",\n \"base_location\": \"<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/order")
.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 \"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/order")
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 \"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": 145,
"order_number": "EO-00145"
},
"order_totals": {
"currency": "AUD",
"product_price": 110,
"qty": 2,
"subtotal": 242,
"shipping_cost": 22,
"order_fee": 9.68,
"order_total": 251.68
}
}Authorizations
Body
application/json
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 array of information about the recipient.
Show child attributes
Show child attributes
⌘I