Bonusly

Rewards

Rewards Overview

{
  "name": "Amazon.com",
String
  "image_url": "https://bonus.ly/assets/brand_logos/amazon_com_600.png",
String (Url)
  "minimum_display_price": "$10+",
String
  "description": {
  "description": { ... }
Object
    "text": "Amazon.com Gift Cards* never expire and can be redeemed towards millions of items at www.amazon.com.",
String
    "html": "Amazon.com Gift Cards<sup>*</sup> never expire and can be redeemed towards millions of items at <a target='_blank' href='http://www.amazon.com'>www.amazon.com</a>."
String
  },
  "disclaimer_html": "<sup>*</sup> Amazon.com is not a sponsor of this promotion. Except as required by law, Amazon.com Gift Cards (GCs) cannot be transferred for value or redeemed for cash. GCs may be used only for purchases of eligible goods at Amazon.com or certain of its affiliated websites. For complete terms and conditions, see <a target='_blank' href='http://www.amazon.com/gc-legal'>www.amazon.com/gc-legal</a>. GCs are issued by ACI Gift Cards, Inc., a Washington corporation. All Amazon ®, ™ & © are IP of Amazon.com, Inc. or its affiliates. No expiration date or service fees.",
String (Url)
  "warning": "This is not for use in United States",
String
  denominations: [
Array
    {
    { ... }
Object

Reward Denomination

      "id": "24abcdef1234567890abcdef",
String
      "name": "$10 Amazon.com Gift Card",
String
      "price": 10,
Integer
      "display_price": "$10"
String
    }
  ]
}

Index

Open in API Explorer
GET /rewards

Example Request

Format:
curl --request GET \
  --url 'https://bonus.ly/api/v1/rewards?catalog_country=US&request_country=US&personalize_for=24abcdef1234567890abcdef&access_token=YOUR%20API%20KEY%20HERE' \
  --header 'accept: application/json'
require 'uri'
require 'net/http'

url = URI("https://bonus.ly/api/v1/rewards?catalog_country=US&request_country=US&personalize_for=24abcdef1234567890abcdef&access_token=YOUR%20API%20KEY%20HERE")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "bonus.ly",
  "port": null,
  "path": "/api/v1/rewards?catalog_country=US&request_country=US&personalize_for=24abcdef1234567890abcdef&access_token=YOUR%20API%20KEY%20HERE",
  "headers": {
    "accept": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("bonus.ly")

headers = { 'accept': "application/json" }

conn.request("GET", "/api/v1/rewards?catalog_country=US&request_country=US&personalize_for=24abcdef1234567890abcdef&access_token=YOUR%20API%20KEY%20HERE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://bonus.ly/api/v1/rewards?catalog_country=US&request_country=US&personalize_for=24abcdef1234567890abcdef&access_token=YOUR%20API%20KEY%20HERE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json"
  ),
));

$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/ioutil"
)

func main() {

	url := "https://bonus.ly/api/v1/rewards?catalog_country=US&request_country=US&personalize_for=24abcdef1234567890abcdef&access_token=YOUR%20API%20KEY%20HERE"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Query Parameters

Name Type Required Description Example
catalog_country String Optional US
request_country String Optional US
personalize_for String Optional 24abcdef1234567890abcdef

Responses

200 Success Rewards All catalogues
[
  "type": "gift_cards",
String
  "name": "Gift Cards",
String
  "rewards": {
  "rewards": { ... }
Object
    "items": {
    "items": { ... }
Object
      "name": "Amazon.com",
String
      "image_url": "https://bonus.ly/assets/brand_logos/amazon_com_600.png",
String (Url)
      "minimum_display_price": "$10+",
String
      "description": {
      "description": { ... }
Object
        "text": "Amazon.com Gift Cards* never expire and can be redeemed towards millions of items at www.amazon.com.",
String
        "html": "Amazon.com Gift Cards<sup>*</sup> never expire and can be redeemed towards millions of items at <a target='_blank' href='http://www.amazon.com'>www.amazon.com</a>."
String
      },
      "disclaimer_html": "<sup>*</sup> Amazon.com is not a sponsor of this promotion. Except as required by law, Amazon.com Gift Cards (GCs) cannot be transferred for value or redeemed for cash. GCs may be used only for purchases of eligible goods at Amazon.com or certain of its affiliated websites. For complete terms and conditions, see <a target='_blank' href='http://www.amazon.com/gc-legal'>www.amazon.com/gc-legal</a>. GCs are issued by ACI Gift Cards, Inc., a Washington corporation. All Amazon ®, ™ & © are IP of Amazon.com, Inc. or its affiliates. No expiration date or service fees.",
String (Url)
      "warning": "This is not for use in United States",
String
      denominations: [
Array
        {
        { ... }
Object

Reward Denomination

          "id": "24abcdef1234567890abcdef",
String
          "name": "$10 Amazon.com Gift Card",
String
          "price": 10,
Integer
          "display_price": "$10"
String
        }
      ]
    }
  }
]
400 Invalid params Errors 400 - invalid params
{
  "message": "Params *[params]* is/are invalid"
String
}

Show

Open in API Explorer
GET /rewards/:id

Example Request

Format:
curl --request GET \
  --url 'https://bonus.ly/api/v1/rewards/:id?request_country=US&access_token=YOUR%20API%20KEY%20HERE' \
  --header 'accept: application/json'
require 'uri'
require 'net/http'

url = URI("https://bonus.ly/api/v1/rewards/:id?request_country=US&access_token=YOUR%20API%20KEY%20HERE")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "bonus.ly",
  "port": null,
  "path": "/api/v1/rewards/:id?request_country=US&access_token=YOUR%20API%20KEY%20HERE",
  "headers": {
    "accept": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("bonus.ly")

headers = { 'accept': "application/json" }

conn.request("GET", "/api/v1/rewards/:id?request_country=US&access_token=YOUR%20API%20KEY%20HERE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://bonus.ly/api/v1/rewards/:id?request_country=US&access_token=YOUR%20API%20KEY%20HERE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json"
  ),
));

$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/ioutil"
)

func main() {

	url := "https://bonus.ly/api/v1/rewards/:id?request_country=US&access_token=YOUR%20API%20KEY%20HERE"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
id String Required 24abcdef1234567890abcdef

Query Parameters

Name Type Required Description Example
request_country String Optional US

Responses

200 Success Rewards Reward - full details
{
  "id": "24abcdef1234567890abcdef",
String
  "name": "$5 Amazon.com Gift Card",
String
  "price": 5,
Integer
  "display_price": "$5",
String
  "description": {
  "description": { ... }
Object
    "text": "Amazon.com Gift Cards* never expire and can be redeemed towards millions of items at www.amazon.com.",
String
    "html": "Amazon.com Gift Cards<sup>*</sup> never expire and can be redeemed towards millions of items at <a target='_blank' href='http://www.amazon.com'>www.amazon.com</a>."
String
  },
  "image_url": "http://bonus.ly/assets/brand_logos/amazon_com_600.png",
String (Url)
  "disclaimer_html": "foo",
String
  "warning": "foo",
String
  "quantity": 42.0,
Number
  "type": "gift_card"
String
}
404 Not found Errors 404 - not found
{
  "message": "*object* not found"
String
}