Get gift purchase by id
curl --request GET \
--url https://api.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId}', 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.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"id": "giv_EdJvIXu3SEiXe_QkPavHSA",
"friendlyId": "D3XZFWPP",
"shopId": "sh_c689d374-22ca-43d3-8d29-9ef0805cc4cb",
"offer": {
"id": "00aa4abd-5778-4199-8161-0b49b2f212e5",
"name": "My t-shirt",
"slug": "my-t-shirt",
"description": "My t-shirt description",
"primaryImage": {
"id": "00aa4abd-5778-4199-8161-0b49b2f212e5",
"url": "https://fourthwall.com/image.png",
"width": 800,
"height": 600,
"transformedUrl": "https://fourthwall.com/image.png"
}
},
"amounts": {
"subtotal": {
"value": 10,
"currency": "USD"
},
"tax": {
"value": 10,
"currency": "USD"
},
"total": {
"value": 10,
"currency": "USD"
},
"profit": {
"value": 10,
"currency": "USD"
},
"prepaidShipping": {
"value": 10,
"currency": "USD"
}
},
"email": "supporter@fourthwall.com",
"quantity": 123,
"gifts": [
{
"id": "gft_EdJvIXu3SEiXe_QkPavHSA",
"orderId": "00aa4abd-5778-4199-8161-0b49b2f212e5",
"orderFriendlyId": "D3XZFWPP",
"winner": {
"selectedAt": "2020-08-13T09:05:36.939Z",
"email": "supporter@fourthwall.com",
"username": "Johnny123"
},
"status": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"username": "Johnny123",
"message": "Sample message"
}Gifting
Get Gift Purchase
Rate limit: 100 requests / 10 seconds per shop. See Rate limiting.
Returns gift purchase details by id
GET
/
open-api
/
v1.0
/
gift-purchase
/
{giftPurchaseId}
Get gift purchase by id
curl --request GET \
--url https://api.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId}', 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.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fourthwall.com/open-api/v1.0/gift-purchase/{giftPurchaseId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"id": "giv_EdJvIXu3SEiXe_QkPavHSA",
"friendlyId": "D3XZFWPP",
"shopId": "sh_c689d374-22ca-43d3-8d29-9ef0805cc4cb",
"offer": {
"id": "00aa4abd-5778-4199-8161-0b49b2f212e5",
"name": "My t-shirt",
"slug": "my-t-shirt",
"description": "My t-shirt description",
"primaryImage": {
"id": "00aa4abd-5778-4199-8161-0b49b2f212e5",
"url": "https://fourthwall.com/image.png",
"width": 800,
"height": 600,
"transformedUrl": "https://fourthwall.com/image.png"
}
},
"amounts": {
"subtotal": {
"value": 10,
"currency": "USD"
},
"tax": {
"value": 10,
"currency": "USD"
},
"total": {
"value": 10,
"currency": "USD"
},
"profit": {
"value": 10,
"currency": "USD"
},
"prepaidShipping": {
"value": 10,
"currency": "USD"
}
},
"email": "supporter@fourthwall.com",
"quantity": 123,
"gifts": [
{
"id": "gft_EdJvIXu3SEiXe_QkPavHSA",
"orderId": "00aa4abd-5778-4199-8161-0b49b2f212e5",
"orderFriendlyId": "D3XZFWPP",
"winner": {
"selectedAt": "2020-08-13T09:05:36.939Z",
"email": "supporter@fourthwall.com",
"username": "Johnny123"
},
"status": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"username": "Johnny123",
"message": "Sample message"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
Response
OK
Example:
"giv_EdJvIXu3SEiXe_QkPavHSA"
Example:
"D3XZFWPP"
Example:
"sh_c689d374-22ca-43d3-8d29-9ef0805cc4cb"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
"supporter@fourthwall.com"
gifts
Available · object · Available · object · Available · object · Available · object · Cancelled · object · Changed To Promotion · object · Redeemed · object[]
required
- Available
- Available
- Available
- Available
- Cancelled
- Changed To Promotion
- Redeemed
Show child attributes
Show child attributes
Example:
"Johnny123"
Example:
"Sample message"
⌘I