List a gift card offer
curl --request POST \
--url https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/list \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/list"
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}/list', 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}/list",
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}/list"
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}/list")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/list")
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 listed and users can buy it",
"action": "listed",
"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
List a gift card offer
Make the gift card offer publicly listed (is_listed = true) so buyers can purchase it.
POST
/
v2
/
gift-cards
/
offers
/
{giftCardOffer}
/
list
List a gift card offer
curl --request POST \
--url https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/list \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/list"
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}/list', 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}/list",
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}/list"
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}/list")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gameboost.com/v2/gift-cards/offers/{giftCardOffer}/list")
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 listed and users can buy it",
"action": "listed",
"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 listed and users can buy it"
Action performed
Example:
"listed"
Whether the offer was listed before this action
Was this page helpful?
⌘I