Unlist a gift card offer
curl --request POST \
--url https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft', 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.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft"
req, _ := http.NewRequest("POST", 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.post("https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"gift_card_id": 123,
"price_eur": "<string>",
"price_usd": "<string>",
"stock": 123,
"is_listed": true,
"gift_card": {
"id": 123,
"region_id": 123,
"brand_id": 123,
"region": {
"id": 123,
"code": "<string>",
"name": "<string>",
"slug": "<string>",
"is_country": true
},
"brand": {
"id": 123,
"name": "<string>",
"slug": "<string>"
},
"title": "<string>",
"face_value_amount": "<string>",
"face_value_unit": "<string>",
"face_value_unit_slug": "<string>",
"lowest_price_eur": "<string>",
"lowest_price_usd": "<string>",
"highest_price_eur": "<string>",
"highest_price_usd": "<string>",
"is_enabled": true,
"created_at": 123,
"updated_at": 123
},
"created_at": 123,
"updated_at": 123
},
"message": "Gift card offer is now unlisted and cannot be bought by users",
"action": "unlisted",
"previous_is_listed": true
}{
"message": "Unauthenticated."
}{
"message": "This action is unauthorized."
}{
"message": "Resource not found."
}{
"message": "The given data was invalid.",
"errors": {
"field": [
"Something is wrong with this field!"
]
}
}{
"message": "Too many requests."
}Gift Card Offers
Unlist a gift card offer
Remove the gift card offer from public listings (is_listed = false) so buyers can no longer purchase it.
POST
/
v2
/
gift-cards
/
offers
/
{giftCardOffer}
/
draft
Unlist a gift card offer
curl --request POST \
--url https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft', 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.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft"
req, _ := http.NewRequest("POST", 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.post("https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/draft")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"gift_card_id": 123,
"price_eur": "<string>",
"price_usd": "<string>",
"stock": 123,
"is_listed": true,
"gift_card": {
"id": 123,
"region_id": 123,
"brand_id": 123,
"region": {
"id": 123,
"code": "<string>",
"name": "<string>",
"slug": "<string>",
"is_country": true
},
"brand": {
"id": 123,
"name": "<string>",
"slug": "<string>"
},
"title": "<string>",
"face_value_amount": "<string>",
"face_value_unit": "<string>",
"face_value_unit_slug": "<string>",
"lowest_price_eur": "<string>",
"lowest_price_usd": "<string>",
"highest_price_eur": "<string>",
"highest_price_usd": "<string>",
"is_enabled": true,
"created_at": 123,
"updated_at": 123
},
"created_at": 123,
"updated_at": 123
},
"message": "Gift card offer is now unlisted and cannot be bought by users",
"action": "unlisted",
"previous_is_listed": true
}{
"message": "Unauthenticated."
}{
"message": "This action is unauthorized."
}{
"message": "Resource not found."
}{
"message": "The given data was invalid.",
"errors": {
"field": [
"Something is wrong with this field!"
]
}
}{
"message": "Too many requests."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the gift card offer. Can be retrieved from the list of gift card offers.
Response
Gift card offer action result
Gift card offer object representing a gift card listing for sale
Show child attributes
Show child attributes
Action result message
Example:
"Gift card offer is now unlisted and cannot be bought by users"
Action performed
Example:
"unlisted"
Whether the offer was listed before this action
Was this page helpful?
⌘I