cURL
curl --request POST \
--url https://api.gameball.co/api/v4.0/integrations/batch/redeem \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--header 'secretkey: <api-key>' \
--data '
{
"body": [
{
"customerId": "<string>",
"transactionId": "<string>",
"transactionTime": "2023-11-07T05:31:56Z",
"email": "<string>",
"mobile": "<string>",
"amount": 123,
"points": 123,
"holdReference": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {
apikey: '<api-key>',
secretkey: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
body: JSON.stringify([
{
customerId: '<string>',
transactionId: '<string>',
transactionTime: '2023-11-07T05:31:56Z',
email: '<string>',
mobile: '<string>',
amount: 123,
points: 123,
holdReference: '<string>'
}
])
})
};
fetch('https://api.gameball.co/api/v4.0/integrations/batch/redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gameball.co/api/v4.0/integrations/batch/redeem"
payload = { "body": [
{
"customerId": "<string>",
"transactionId": "<string>",
"transactionTime": "2023-11-07T05:31:56Z",
"email": "<string>",
"mobile": "<string>",
"amount": 123,
"points": 123,
"holdReference": "<string>"
}
] }
headers = {
"apikey": "<api-key>",
"secretkey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.gameball.co/api/v4.0/integrations/batch/redeem");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("apikey", "<api-key>");
request.AddHeader("secretkey", "<api-key>");
request.AddJsonBody("{\n \"body\": [\n {\n \"customerId\": \"<string>\",\n \"transactionId\": \"<string>\",\n \"transactionTime\": \"2023-11-07T05:31:56Z\",\n \"email\": \"<string>\",\n \"mobile\": \"<string>\",\n \"amount\": 123,\n \"points\": 123,\n \"holdReference\": \"<string>\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gameball.co/api/v4.0/integrations/batch/redeem"
payload := strings.NewReader("{\n \"body\": [\n {\n \"customerId\": \"<string>\",\n \"transactionId\": \"<string>\",\n \"transactionTime\": \"2023-11-07T05:31:56Z\",\n \"email\": \"<string>\",\n \"mobile\": \"<string>\",\n \"amount\": 123,\n \"points\": 123,\n \"holdReference\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("secretkey", "<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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gameball.co/api/v4.0/integrations/batch/redeem",
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([
'body' => [
[
'customerId' => '<string>',
'transactionId' => '<string>',
'transactionTime' => '2023-11-07T05:31:56Z',
'email' => '<string>',
'mobile' => '<string>',
'amount' => 123,
'points' => 123,
'holdReference' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>",
"secretkey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.gameball.co/api/v4.0/integrations/batch/redeem")
.header("apikey", "<api-key>")
.header("secretkey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body\": [\n {\n \"customerId\": \"<string>\",\n \"transactionId\": \"<string>\",\n \"transactionTime\": \"2023-11-07T05:31:56Z\",\n \"email\": \"<string>\",\n \"mobile\": \"<string>\",\n \"amount\": 123,\n \"points\": 123,\n \"holdReference\": \"<string>\"\n }\n ]\n}")
.asString();{
"jobId": 123
}Redeem Batch Job
Enable customers to redeem loyalty points as a payment method for multiple customers in a single API call.
POST
/
api
/
v4.0
/
integrations
/
batch
/
redeem
cURL
curl --request POST \
--url https://api.gameball.co/api/v4.0/integrations/batch/redeem \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--header 'secretkey: <api-key>' \
--data '
{
"body": [
{
"customerId": "<string>",
"transactionId": "<string>",
"transactionTime": "2023-11-07T05:31:56Z",
"email": "<string>",
"mobile": "<string>",
"amount": 123,
"points": 123,
"holdReference": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {
apikey: '<api-key>',
secretkey: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
body: JSON.stringify([
{
customerId: '<string>',
transactionId: '<string>',
transactionTime: '2023-11-07T05:31:56Z',
email: '<string>',
mobile: '<string>',
amount: 123,
points: 123,
holdReference: '<string>'
}
])
})
};
fetch('https://api.gameball.co/api/v4.0/integrations/batch/redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gameball.co/api/v4.0/integrations/batch/redeem"
payload = { "body": [
{
"customerId": "<string>",
"transactionId": "<string>",
"transactionTime": "2023-11-07T05:31:56Z",
"email": "<string>",
"mobile": "<string>",
"amount": 123,
"points": 123,
"holdReference": "<string>"
}
] }
headers = {
"apikey": "<api-key>",
"secretkey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.gameball.co/api/v4.0/integrations/batch/redeem");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("apikey", "<api-key>");
request.AddHeader("secretkey", "<api-key>");
request.AddJsonBody("{\n \"body\": [\n {\n \"customerId\": \"<string>\",\n \"transactionId\": \"<string>\",\n \"transactionTime\": \"2023-11-07T05:31:56Z\",\n \"email\": \"<string>\",\n \"mobile\": \"<string>\",\n \"amount\": 123,\n \"points\": 123,\n \"holdReference\": \"<string>\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gameball.co/api/v4.0/integrations/batch/redeem"
payload := strings.NewReader("{\n \"body\": [\n {\n \"customerId\": \"<string>\",\n \"transactionId\": \"<string>\",\n \"transactionTime\": \"2023-11-07T05:31:56Z\",\n \"email\": \"<string>\",\n \"mobile\": \"<string>\",\n \"amount\": 123,\n \"points\": 123,\n \"holdReference\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("secretkey", "<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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gameball.co/api/v4.0/integrations/batch/redeem",
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([
'body' => [
[
'customerId' => '<string>',
'transactionId' => '<string>',
'transactionTime' => '2023-11-07T05:31:56Z',
'email' => '<string>',
'mobile' => '<string>',
'amount' => 123,
'points' => 123,
'holdReference' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>",
"secretkey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.gameball.co/api/v4.0/integrations/batch/redeem")
.header("apikey", "<api-key>")
.header("secretkey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body\": [\n {\n \"customerId\": \"<string>\",\n \"transactionId\": \"<string>\",\n \"transactionTime\": \"2023-11-07T05:31:56Z\",\n \"email\": \"<string>\",\n \"mobile\": \"<string>\",\n \"amount\": 123,\n \"points\": 123,\n \"holdReference\": \"<string>\"\n }\n ]\n}")
.asString();{
"jobId": 123
}Redeem Batch Job
The Batch Redeem API enables customers to redeem loyalty points as a payment method in Gameball, allowing them to use points instead of monetary value during transactions. This API supports bulk redemptions, making it efficient for handling multiple customer transactions in a single request.Security: Requires apiKey and secretKey headers.
Channel Merging Available: If your system uses different customer IDs across multiple channels (e.g., online and offline), Gameball’s channel merging feature helps unify customer profiles. By including the customer’s mobile number or email (based on your merging configuration) with each request, Gameball will combine activities into a single profile.
Body
application/json
Show child attributes
Show child attributes
Response
200 - application/json
Batch redemption processing initiated successfully
The assigned job ID, which is later used for status verification and response retrieval.
Was this page helpful?
⌘I