Cancel reward
curl --request DELETE \
--url https://api-testbed.giftbit.com/papi/v1/gifts/{uuid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-testbed.giftbit.com/papi/v1/gifts/{uuid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-testbed.giftbit.com/papi/v1/gifts/{uuid}', 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-testbed.giftbit.com/papi/v1/gifts/{uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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-testbed.giftbit.com/papi/v1/gifts/{uuid}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api-testbed.giftbit.com/papi/v1/gifts/{uuid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-testbed.giftbit.com/papi/v1/gifts/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"gift": {
"uuid": "d30be501ed2546e580c5c9eaf56633d9",
"campaign_uuid": "8f5835dfb637413793c5d55f8ea95e23",
"delivery_status": "LINKCREATED",
"status": "GIVER_CANCELLED",
"redelivery_count": 0,
"campaign_id": "may11",
"price_in_cents": 500,
"brand_code": "itunesus",
"created_date": "2016-05-11 12:18:25",
"delivery_date": "2016-05-11 12:18:32"
},
"info": {
"code": "INFO_GIFTS_CANCELED",
"name": "Gift canceled",
"message": "The gift has been canceled."
},
"status": 200
}Cancel reward
Cancels the reward. Once a reward has been claimed by the recipient it cannot be
cancelled, and rewards delivered in-app via /embedded are not eligible for
cancellation.
DELETE
/
gifts
/
{uuid}
Cancel reward
curl --request DELETE \
--url https://api-testbed.giftbit.com/papi/v1/gifts/{uuid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-testbed.giftbit.com/papi/v1/gifts/{uuid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-testbed.giftbit.com/papi/v1/gifts/{uuid}', 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-testbed.giftbit.com/papi/v1/gifts/{uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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-testbed.giftbit.com/papi/v1/gifts/{uuid}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api-testbed.giftbit.com/papi/v1/gifts/{uuid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-testbed.giftbit.com/papi/v1/gifts/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"gift": {
"uuid": "d30be501ed2546e580c5c9eaf56633d9",
"campaign_uuid": "8f5835dfb637413793c5d55f8ea95e23",
"delivery_status": "LINKCREATED",
"status": "GIVER_CANCELLED",
"redelivery_count": 0,
"campaign_id": "may11",
"price_in_cents": 500,
"brand_code": "itunesus",
"created_date": "2016-05-11 12:18:25",
"delivery_date": "2016-05-11 12:18:32"
},
"info": {
"code": "INFO_GIFTS_CANCELED",
"name": "Gift canceled",
"message": "The gift has been canceled."
},
"status": 200
}Authorizations
Send your API token prefixed by Bearer in the Authorization header.
Path Parameters
The uuid of the reward. Not to be mistaken for the uuid or id of the order.