curl --request POST \
--url https://{brand}.extole.io/events \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"rewards": [
"<string>"
],
"reward_supplier_id": "<string>",
"labels": "<string>"
},
"event_name": "redeem_rewards"
}
'import requests
url = "https://{brand}.extole.io/events"
payload = {
"data": {
"rewards": ["<string>"],
"reward_supplier_id": "<string>",
"labels": "<string>"
},
"event_name": "redeem_rewards"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {rewards: ['<string>'], reward_supplier_id: '<string>', labels: '<string>'},
event_name: 'redeem_rewards'
})
};
fetch('https://{brand}.extole.io/events', 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://{brand}.extole.io/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'rewards' => [
'<string>'
],
'reward_supplier_id' => '<string>',
'labels' => '<string>'
],
'event_name' => 'redeem_rewards'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: 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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{brand}.extole.io/events"
payload := strings.NewReader("{\n \"data\": {\n \"rewards\": [\n \"<string>\"\n ],\n \"reward_supplier_id\": \"<string>\",\n \"labels\": \"<string>\"\n },\n \"event_name\": \"redeem_rewards\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{brand}.extole.io/events")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"rewards\": [\n \"<string>\"\n ],\n \"reward_supplier_id\": \"<string>\",\n \"labels\": \"<string>\"\n },\n \"event_name\": \"redeem_rewards\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{brand}.extole.io/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"rewards\": [\n \"<string>\"\n ],\n \"reward_supplier_id\": \"<string>\",\n \"labels\": \"<string>\"\n },\n \"event_name\": \"redeem_rewards\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>"
}Redeem Credits
Spends chosen rewards from this person’s balance with one supplier, by submitting the reward bank’s redeem event. The event is only accepted here - the redemption happens afterwards, and its outcome arrives as a signal rather than in this response. Read Current Balance and Transaction History until the redemption appears in redemption_history.
curl --request POST \
--url https://{brand}.extole.io/events \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"rewards": [
"<string>"
],
"reward_supplier_id": "<string>",
"labels": "<string>"
},
"event_name": "redeem_rewards"
}
'import requests
url = "https://{brand}.extole.io/events"
payload = {
"data": {
"rewards": ["<string>"],
"reward_supplier_id": "<string>",
"labels": "<string>"
},
"event_name": "redeem_rewards"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {rewards: ['<string>'], reward_supplier_id: '<string>', labels: '<string>'},
event_name: 'redeem_rewards'
})
};
fetch('https://{brand}.extole.io/events', 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://{brand}.extole.io/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'rewards' => [
'<string>'
],
'reward_supplier_id' => '<string>',
'labels' => '<string>'
],
'event_name' => 'redeem_rewards'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: 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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{brand}.extole.io/events"
payload := strings.NewReader("{\n \"data\": {\n \"rewards\": [\n \"<string>\"\n ],\n \"reward_supplier_id\": \"<string>\",\n \"labels\": \"<string>\"\n },\n \"event_name\": \"redeem_rewards\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{brand}.extole.io/events")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"rewards\": [\n \"<string>\"\n ],\n \"reward_supplier_id\": \"<string>\",\n \"labels\": \"<string>\"\n },\n \"event_name\": \"redeem_rewards\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{brand}.extole.io/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"rewards\": [\n \"<string>\"\n ],\n \"reward_supplier_id\": \"<string>\",\n \"labels\": \"<string>\"\n },\n \"event_name\": \"redeem_rewards\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>"
}Authorizations
A consumer access token, issued to a single person in the browser or app. Not a client access token - never send a client token from a consumer device.
Body
Response
Success
Acceptance of the event, not the result of the redemption. A redemption that cannot go through - too little balance, a reward no longer redeemable - still answers here and fails afterwards.
Identifier of the redeem event. The outcome is published as a signal named success or error against reward-, and an error signal carries the reason in its data.message. The browser library renames this field to event_id, so a caller reading the raw response reads id.
Was this page helpful?
