Get all promotions
Using the /promotions endpoint, you can get information on every operator running an active promotion on any of their products — airtime or data
Promotions
GET https://topups.reloadly.com/promotions
Query Parameters
size
integer
The number of operators offering discounts to be retrieved on a page. Default value is 200
page
integer
The page of the list of operators offering promotions. Default value is 1
Headers
Authorization*
string
Your access token is required as a bearer token in the request's header
{
"content":[
{
"promotionId":1,
"operatorId":129,
"title":"Tigo El Salvador From 25 Jun 2018 00:00 To 25 July...",
"title2":"Get 500 MB and 150 minutes for USA or Canada",
"description":"For top ups of $10 or more, customer...",
"startDate":"Mon, 25 Jun 2018 06:00:00 +0000",
"endDate":"Tue, 26 Jun 2018 05:59:00 +0000",
"denominations":"USD 10 and up",
"localDenominations":null
},
{
"promotionId":2,
"operatorId":158,
"title":"Tigo Guatemala From 30 Jun 2018 00:00 To 30 Jun",
"title2":"Bonus 3x",
"description":"Calls and SMS to USA, OnNet an...",
"startDate":"Sat, 30 Jun 2018 06:00:00 +0000",
"endDate":"Sun, 01 Jul 2018 05:59:00 +0000",
"denominations":"USD 14 and up",
"localDenominations":"GTQ 100.80 and up"
}
],
"pageable":{
"sort":{
"unsorted":true,
"sorted":false
},
"pageSize":3,
"pageNumber":0,
"offset":0,
"paged":true,
"unpaged":false
},
"totalPages":15,
"totalElements":44,
"last":false,
"sort":{
"unsorted":true,
"sorted":false
},
"first":true,
"numberOfElements":3,
"size":3,
"number":0
}{
"timeStamp":"2021-05-11 21:14:00",
"message":"Full authentication is required to access this resource",
"path":"/promotions",
"errorCode":"INVALID_TOKEN",
"infoLink":null,
"details":[
]
}{
"timestamp":"2021-05-18T11:35:57.291+0000",
"status":404,
"error":"Not Found",
"message":"No message available",
"path":"/promotion"
}Request samples
curl --location --request GET 'https://topups.reloadly.com/promotions' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
--header 'Accept: application/com.reloadly.topups-v1+json' using System;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text;
using Newtonsoft.Json;
namespace WebAPIClient {
class Program {
static async Task Main(string[] args) {
await ApiCall();
}
private static async Task ApiCall() {
var message = new HttpRequestMessage(HttpMethod.Get, "https://topups.reloadly.com/promotions");
message.Headers.TryAddWithoutValidation("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE");
message.Headers.TryAddWithoutValidation("Accept", "application/com.reloadly.topups-v1+json");
using
var httpClient = new HttpClient();
var response = await httpClient.SendAsync(message);
var responseBody = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject < dynamic > (responseBody);
Console.WriteLine(result);
}
}
}package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://topups.reloadly.com/promotions"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
req.Header.Add("Accept", "application/com.reloadly.topups-v1+json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://topups.reloadly.com/promotions")
.method("GET", null)
.addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE")
.addHeader("Accept", "application/com.reloadly.topups-v1+json")
.build();
Response response = client.newCall(request).execute();var request = require('request');
var options = {
'method': 'GET',
'url': 'https://topups.reloadly.com/promotions',
'headers': {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept': 'application/com.reloadly.topups-v1+json',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://topups.reloadly.com/promotions',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept: application/com.reloadly.topups-v1+json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
import json
url = "https://topups.reloadly.com/promotions"
payload={}
headers = {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN_HERE',
'Accept': 'application/com.reloadly.topups-v1+json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)Response parameters
Parameter
Type
Description
promotionId
integer
This is a unique identifier for the ongoing promotion
operatorId
integer
Indicates the ID of the operator offering the promotion
title1
string
Indicates the duration of the promotion and the name of the operator offering it
title2
string
Indicates additional information on the promotion
description
string
This indicates a summary of what the promotion is about
startDate
string
The date the promotion begins
endDate
string
The date the promotion ends
denominations
string
Indicates the top-up amounts that are eligible for the promotion
localDenominations
string
Indicates the local top-up amounts in the destination's currency that are eligible for the promotion
Last updated
Was this helpful?