Retrieve brand
curl --request GET \
--url https://api-testbed.giftbit.com/papi/v1/brands/{brand_code} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-testbed.giftbit.com/papi/v1/brands/{brand_code}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-testbed.giftbit.com/papi/v1/brands/{brand_code}', 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/brands/{brand_code}",
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: 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/brands/{brand_code}"
req, _ := http.NewRequest("GET", 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.get("https://api-testbed.giftbit.com/papi/v1/brands/{brand_code}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-testbed.giftbit.com/papi/v1/brands/{brand_code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"brand": {
"brand_code": "WHOLEFOODS",
"name": "Whole Foods Market",
"image_url": "https://uploadedimages.giftbit.com/wholefoods/wholefoodsgiftbit-f629cfa4-c7f1-4c6f-9a67-f8ee144b8db7.png",
"regions": [
2
],
"fund_currencyisocode": "USD",
"inapp_available": true,
"variable_price": false,
"allowed_prices_in_cents": [
1000,
2500,
5000,
10000
]
},
"info": {
"code": "INFO_BRANDS_RETRIEVED",
"name": "Brand(s) Retrieved",
"message": "A list of brands or single brand has been retrieved"
}
}{
"error": {
"code": "ERROR_BRANDS_NO_SUCH_BRAND",
"name": "No brand found",
"message": "No brand found matching that code"
},
"status": 422
}Retrieve brand
Retrieves extended information about the specified brand.
GET
/
brands
/
{brand_code}
Retrieve brand
curl --request GET \
--url https://api-testbed.giftbit.com/papi/v1/brands/{brand_code} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-testbed.giftbit.com/papi/v1/brands/{brand_code}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-testbed.giftbit.com/papi/v1/brands/{brand_code}', 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/brands/{brand_code}",
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: 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/brands/{brand_code}"
req, _ := http.NewRequest("GET", 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.get("https://api-testbed.giftbit.com/papi/v1/brands/{brand_code}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-testbed.giftbit.com/papi/v1/brands/{brand_code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"brand": {
"brand_code": "WHOLEFOODS",
"name": "Whole Foods Market",
"image_url": "https://uploadedimages.giftbit.com/wholefoods/wholefoodsgiftbit-f629cfa4-c7f1-4c6f-9a67-f8ee144b8db7.png",
"regions": [
2
],
"fund_currencyisocode": "USD",
"inapp_available": true,
"variable_price": false,
"allowed_prices_in_cents": [
1000,
2500,
5000,
10000
]
},
"info": {
"code": "INFO_BRANDS_RETRIEVED",
"name": "Brand(s) Retrieved",
"message": "A list of brands or single brand has been retrieved"
}
}{
"error": {
"code": "ERROR_BRANDS_NO_SUCH_BRAND",
"name": "No brand found",
"message": "No brand found matching that code"
},
"status": 422
}Authorizations
Send your API token prefixed by Bearer in the Authorization header.
Path Parameters
Retrieve a single brand by brand_code.