GiftCards
Search…
Get product by ID
Using the /products/{productId} endpoint, you can access the details of a particular gift card by making a request with that gift card's product ID
get
https://giftcards.reloadly.com
/products/{productId}
Product by ID

Request samples

cURL
C#
Golang
Java
Node JS
PHP
Python
1
curl --location --request GET 'https://giftcards.reloadly.com/products/10' \
2
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
3
--header 'Accept: application/com.reloadly.giftcards-v1+json'
Copied!
1
using System;
2
using System.Threading.Tasks;
3
using System.Net.Http;
4
using System.Text;
5
using Newtonsoft.Json;
6
7
namespace WebAPIClient {
8
class Program {
9
10
static async Task Main(string[] args) {
11
await ApiCall();
12
}
13
14
private static async Task ApiCall() {
15
16
var message = new HttpRequestMessage(HttpMethod.Get, "https://giftcards.reloadly.com/products/10");
17
18
message.Headers.TryAddWithoutValidation("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE");
19
message.Headers.TryAddWithoutValidation("Accept", "application/com.reloadly.topups-v1+json");
20
21
using
22
var httpClient = new HttpClient();
23
var response = await httpClient.SendAsync(message);
24
var responseBody = await response.Content.ReadAsStringAsync();
25
var result = JsonConvert.DeserializeObject < dynamic > (responseBody);
26
27
Console.WriteLine(result);
28
}
29
30
}
31
}
Copied!
1
package main
2
3
import (
4
"fmt"
5
"net/http"
6
"io/ioutil"
7
)
8
9
func main() {
10
11
url := "https://giftcards.reloadly.com/products/10"
12
method := "GET"
13
14
client := &http.Client {
15
}
16
req, err := http.NewRequest(method, url, nil)
17
18
if err != nil {
19
fmt.Println(err)
20
return
21
}
22
req.Header.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
23
req.Header.Add("Accept", "application/com.reloadly.giftcards-v1+json")
24
25
res, err := client.Do(req)
26
if err != nil {
27
fmt.Println(err)
28
return
29
}
30
defer res.Body.Close()
31
32
body, err := ioutil.ReadAll(res.Body)
33
if err != nil {
34
fmt.Println(err)
35
return
36
}
37
fmt.Println(string(body))
38
}
Copied!
1
OkHttpClient client = new OkHttpClient().newBuilder()
2
.build();
3
Request request = new Request.Builder()
4
.url("https://giftcards.reloadly.com/products/10")
5
.method("GET", null)
6
.addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
7
.addHeader("Accept", "application/com.reloadly.giftcards-v1+json")
8
.build();
9
Response response = client.newCall(request).execute();
Copied!
1
var request = require('request');
2
var options = {
3
'method': 'GET',
4
'url': 'https://giftcards.reloadly.com/products/10',
5
'headers': {
6
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
7
'Accept': 'application/com.reloadly.giftcards-v1+json'
8
}
9
};
10
request(options, function (error, response) {
11
if (error) throw new Error(error);
12
console.log(response.body);
13
});
Copied!
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://giftcards.reloadly.com/products/10',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE',
16
'Accept: application/com.reloadly.giftcards-v1+json'
17
),
18
));
19
20
$response = curl_exec($curl);
21
22
curl_close($curl);
23
echo $response;
Copied!
1
import requests
2
import json
3
4
url = "https://giftcards.reloadly.com/products/10"
5
6
payload={}
7
headers = {
8
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
9
'Accept': 'application/com.reloadly.giftcards-v1+json'
10
}
11
12
response = requests.request("GET", url, headers=headers, data=payload)
13
14
print(response.text)
Copied!

Key response parameters

Parameter
Type
Description
productId
integer
This indicates the product ID of the gift card
productName
string
This indicates the gift card's name
global
boolean
This indicates if the gift card is global or regional (country-specific)
senderFee
integer
This indicates the fee applied for every gift card purchase. Note that this fee is applied with the user's account currency
discountPercentage
integer
This indicates the percentage discount available for every purchase of the gift card
denominationType
string
This indicates the amount(s) for which the gift card can be purchased. Options are either FIXED or RANGE
recipient
CurrencyCode
string
This indicates the currency the gift card product is delivered in
minRecipient
Denomination
integer
This indicates the minimum amount for which a gift card can be purchased. It only applies to gift cards that have a denomination type of RANGE
maxRecipient
Denomination
integer
This indicates the maximum amount for which a gift card can be purchased. It only applies to gift cards that have a denomination type of RANGE
senderCurrencyCode
string
This indicates the currency of the user's account
minSenderDenomination
integer
This indicates the minimum amount for which a gift card can be purchased in the user's account currency.
Note: This only applies to gift cards that have a denomination type of RANGE
maxSenderDenomination
integer
This indicates the maximum amount for which a gift card can be purchased in the user's account currency.
Note: This only applies to gift cards that have a denomination type of RANGE
fixedRecipient
Denominations
integer
This indicates the fixed amounts for which a gift card can be purchased.
Note: This only applies to gift cards that have a denomination type of FIXED
fixedSender
Denominations
integer
This indicates the fixed amounts for which a gift card can be purchased in the user's account currency.
Note: This only applies to gift cards that have a denomination type of FIXED
fixedRecipient
ToSender
DenominationsMap
integer
This acts as a conversion map between the gift card's price and the value when converted to the user's account currency.
Note: This only applies to gift cards that have a denomination type of FIXED
logoUrls
string
This is a URL link to an image of the gift card
brand
object
This contains details of the various brands that can be accessed in a gift card product
brandId
integer
This indicates the brand ID of a gift card's brand
brandName
string
This indicates that name of the gift card's brand
country
object
This contains all the details of the country where a gift card can be used. It only applies to gift cards that are not global
isoName
string
This indicates the ISO code of the country where a gift card can be used
name
string
This indicates the name of the country where a gift card is applicable

Other response parameters

Parameter
Type
Description
pageable
object
This contains details of the gift card's subset data controls.
sort
object
This contains details that show if the paginated data returned is sorted
sorted/unsorted
boolean
This indicates if the returned data was sorted using a data point
empty
boolean
Indicates if the returned data has a subset
offset
integer
Indicates the position of the returned data's subset
pageNumber
integer
Indicates the page number of the returned data subset
pageSize
integer
Indicates the number of pages for the returned data
paged/unpaged
boolean
Indicates if every returned data subset will be grouped into pages
totalElements
integer
Indicates the total number of gift card brands
first / last
boolean
Indicates the position of the returned data
totalPages
integer
Indicates the total number of pages returned for the gift card data
size / numberOfElements
integer
Indicates the number of gift cards on a page
number
integer
Indicates the number of the returned page. This is only applicable when a request is made and a page is specified
Last modified 1mo ago