Skip to main content
GET
/
api
/
v4.0
/
integrations
/
customers
/
{customerId}
/
coupons
Get Customer Coupons
curl --request GET \
  --url https://api.gameball.co/api/v4.0/integrations/customers/{customerId}/coupons \
  --header 'apikey: <api-key>' \
  --header 'secretkey: <api-key>'
const options = {method: 'GET', headers: {apikey: '<api-key>', secretkey: '<api-key>'}};

fetch('https://api.gameball.co/api/v4.0/integrations/customers/{customerId}/coupons', 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/customers/{customerId}/coupons"

headers = {
"apikey": "<api-key>",
"secretkey": "<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/customers/{customerId}/coupons");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("apikey", "<api-key>");
request.AddHeader("secretkey", "<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/customers/{customerId}/coupons"

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

req.Header.Add("apikey", "<api-key>")
req.Header.Add("secretkey", "<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/customers/{customerId}/coupons",
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>",
"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.get("https://api.gameball.co/api/v4.0/integrations/customers/{customerId}/coupons")
.header("apikey", "<api-key>")
.header("secretkey", "<api-key>")
.asString();
{
  "coupons": [
    {
      "name": "<string>",
      "code": "<string>",
      "value": 123,
      "currency": "<string>",
      "startDate": "2023-11-07T05:31:56Z",
      "expiryDate": "2023-11-07T05:31:56Z",
      "isExpired": true,
      "isActive": true,
      "usageLimit": 123,
      "limitPerCustomer": 123,
      "usedCount": 123,
      "customerUsedCount": 123,
      "isAvailableToUse": true,
      "iconPath": "<string>"
    }
  ]
}
This API retrieves a customer’s available coupons in Gameball, offering detailed information on each coupon’s type, status, and usage. Use this endpoint to access current coupon data associated with the customer for better engagement.
Security: Requires apikey and secretkey headers.

Authorizations

apikey
string
header
required
secretkey
string
header
required

Path Parameters

customerId
string
required

Unique identifier for the customer

Response

200 - application/json

Customer coupons found

coupons
object[]

List of coupon objects associated with the customer