curl --request GET \
--url https://api.gameball.co/api/v4.0/integrations/configurations/referrals \
--header 'apikey: <api-key>'const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api.gameball.co/api/v4.0/integrations/configurations/referrals', 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/configurations/referrals"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.gameball.co/api/v4.0/integrations/configurations/referrals");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("apikey", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gameball.co/api/v4.0/integrations/configurations/referrals"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
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/configurations/referrals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <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.get("https://api.gameball.co/api/v4.0/integrations/configurations/referrals")
.header("apikey", "<api-key>")
.asString();{
"referralMethod": "<string>",
"eventName": "<string>",
"eventMetaData": {
"name": "<string>",
"operator": "<string>",
"value": "<string>"
},
"friendReward": {
"score": 123,
"point": 123,
"coupon": {
"couponType": "<string>",
"discountValue": 123,
"product": {
"productId": "<string>",
"productName": "<string>",
"variantId": "<string>",
"variantName": "<string>",
"productDisplayName": "<string>"
},
"collections": [
{
"collectionId": "<string>",
"collectionName": "<string>"
}
],
"group": {
"handle": "<string>",
"title": "<string>",
"url": "<string>",
"iconPath": "<string>",
"description": "<string>",
"maxPerCustomer": 123,
"startDate": "2023-11-07T05:31:56Z",
"expiryDate": "2023-11-07T05:31:56Z",
"isAvailable": true,
"isActive": true
},
"options": {
"name": "<string>",
"expiryAfter": 123,
"usageLimit": 123,
"capping": 123,
"minOrderValue": 123,
"codePrefix": "<string>",
"redeemInstructions": "<string>"
}
}
},
"customerReward": {
"score": 123,
"point": 123,
"coupon": {
"couponType": "<string>",
"discountValue": 123,
"product": {
"productId": "<string>",
"productName": "<string>",
"variantId": "<string>",
"variantName": "<string>",
"productDisplayName": "<string>"
},
"collections": [
{
"collectionId": "<string>",
"collectionName": "<string>"
}
],
"group": {
"handle": "<string>",
"title": "<string>",
"url": "<string>",
"iconPath": "<string>",
"description": "<string>",
"maxPerCustomer": 123,
"startDate": "2023-11-07T05:31:56Z",
"expiryDate": "2023-11-07T05:31:56Z",
"isAvailable": true,
"isActive": true
},
"options": {
"name": "<string>",
"expiryAfter": 123,
"usageLimit": 123,
"capping": 123,
"minOrderValue": 123,
"codePrefix": "<string>",
"redeemInstructions": "<string>"
}
},
"extraReward": {
"forEvery": 123,
"score": 123,
"point": 123,
"coupon": {}
}
}
}Referrals Configurations
Retrieve referral program configuration for the loyalty program.
curl --request GET \
--url https://api.gameball.co/api/v4.0/integrations/configurations/referrals \
--header 'apikey: <api-key>'const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api.gameball.co/api/v4.0/integrations/configurations/referrals', 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/configurations/referrals"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.gameball.co/api/v4.0/integrations/configurations/referrals");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("apikey", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gameball.co/api/v4.0/integrations/configurations/referrals"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
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/configurations/referrals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <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.get("https://api.gameball.co/api/v4.0/integrations/configurations/referrals")
.header("apikey", "<api-key>")
.asString();{
"referralMethod": "<string>",
"eventName": "<string>",
"eventMetaData": {
"name": "<string>",
"operator": "<string>",
"value": "<string>"
},
"friendReward": {
"score": 123,
"point": 123,
"coupon": {
"couponType": "<string>",
"discountValue": 123,
"product": {
"productId": "<string>",
"productName": "<string>",
"variantId": "<string>",
"variantName": "<string>",
"productDisplayName": "<string>"
},
"collections": [
{
"collectionId": "<string>",
"collectionName": "<string>"
}
],
"group": {
"handle": "<string>",
"title": "<string>",
"url": "<string>",
"iconPath": "<string>",
"description": "<string>",
"maxPerCustomer": 123,
"startDate": "2023-11-07T05:31:56Z",
"expiryDate": "2023-11-07T05:31:56Z",
"isAvailable": true,
"isActive": true
},
"options": {
"name": "<string>",
"expiryAfter": 123,
"usageLimit": 123,
"capping": 123,
"minOrderValue": 123,
"codePrefix": "<string>",
"redeemInstructions": "<string>"
}
}
},
"customerReward": {
"score": 123,
"point": 123,
"coupon": {
"couponType": "<string>",
"discountValue": 123,
"product": {
"productId": "<string>",
"productName": "<string>",
"variantId": "<string>",
"variantName": "<string>",
"productDisplayName": "<string>"
},
"collections": [
{
"collectionId": "<string>",
"collectionName": "<string>"
}
],
"group": {
"handle": "<string>",
"title": "<string>",
"url": "<string>",
"iconPath": "<string>",
"description": "<string>",
"maxPerCustomer": 123,
"startDate": "2023-11-07T05:31:56Z",
"expiryDate": "2023-11-07T05:31:56Z",
"isAvailable": true,
"isActive": true
},
"options": {
"name": "<string>",
"expiryAfter": 123,
"usageLimit": 123,
"capping": 123,
"minOrderValue": 123,
"codePrefix": "<string>",
"redeemInstructions": "<string>"
}
},
"extraReward": {
"forEvery": 123,
"score": 123,
"point": 123,
"coupon": {}
}
}
}Headers
Response
Referral settings retrieved successfully
This specifies who will receive the referral reward when a successful referral is made. Possible values: CustomerOnly (Only the customer making the referral will receive the reward. The referred friend will not receive any reward), CustomerAndFriend (Both the customer making the referral and the referred friend will receive rewards, encouraging mutual benefit).
This describes the event that will trigger the referral reward. Example: if the eventName is set to place_order, the referral reward will be granted when the referred friend completes an order after using the referral link. Other events can also be configured to trigger the reward, depending on your system's setup.
Was this page helpful?