Gameball Developers Guide
v3.0
v3.0
  • Introduction
  • What's New in V3.0
  • Installing Gameball
    • Web
      • Show Gameball Customer Widget
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Go-Live Checklist
    • iOS
      • Getting Started
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
    • Android
      • Getting Started
      • Initialize Gameball SDK
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
    • React Native
      • Getting Started
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
      • Migration from v1 to v2
    • Flutter
      • Getting Started
      • Initialize Gameball SDK
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Referrals
      • Go-Live Checklist
    • Generic Mobile App
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
    • Retail & Modern POS
      • Initialize Gameball Customer Profile
      • Track Orders & Cashback Reward
      • Track Refunds
      • Enable Redemption
        • Prepare POS for Redemption
        • Using Virtual ID
          • Using Virtual Card
  • REST API
    • Overview
      • Server-Side SDKs
    • Authentication
    • API Reference
      • Customer
      • Event
      • Transactions
      • Order
      • Coupons
      • Leaderboard 👑
      • Notifications 👑
      • Configurations 👑
      • Batches 👑
        • Batch Operations Data
      • OTP
      • Partner 🤝
        • Client 🤝
        • Redemption Rule 🤝
        • Cashback Rule 🤝
    • Webhooks
      • Notifications Webhook
      • Customer Profile Webhook
    • Errors
    • Object Reference
  • Tutorials
    • Build Custom UI Elements 👑
      • Display Reward Campaign Progress
      • Show VIP Tiers
      • Show Customer Points Balance
      • Build Leaderboards
      • Show Notifications Inbox
      • Adapt UI to Configurations
      • Advanced UI Techniques
        • Increase Sales with Cashback UI Elements
        • Derive Engagement with Rewards Campaigns UI Elements
    • Tracking Customer Events
    • Build your Own Notification System
    • Checkout Integration Example
    • Redemption Integration Options
      • Redeem with coupon system
        • Integrate your coupon system
          • Example using e-commerce platform(WooCommerce)
          • Example using a custom coupon system
        • Build couponing experience
          • Using Gameball widget
          • Build custom experience
            • Showing customers available points
            • Allowing customers to create coupons
            • Apply the discount code to your cart
        • Coupon integration reference
      • Redeem with direct debt
        • Get customers points balance
        • Redeem customer points
  • Third Party Integrations
    • Segment Integration
Powered by GitBook
On this page
  • Available Endpoints
  • GET - Customer Notifications
  • Request
  • Response
  • Usage Example
  • PUT - Mark Notification(s) as Read
  • Request
  • Usage Example
  1. REST API
  2. API Reference

Notifications 👑

The Notifications API can be used to list the customer's notifications and also to update its status once read.

Available Endpoints

Type

Description

Endpoint

GET

/integrations/notifications/{playerUnqiueId}

PUT

/integrations/notifications

This endpoint is only available for our GURU clients only. 👑

GET - Customer Notifications

https://api.gameball.co/api/v3.0/integrations/notifications/{playerUnqiueId}

This API is used to to retrieve a specific customer's list of notifications in Gameball.

mobile or email should replace the playerUniqueId in case (only if) your account supports channel merging.

Request

Header

Attribute

Type

Required

Description

APIKey

string

Yes

Client API key

Path Parameters

Attribute

Type

Required

Description

playerUniqueId

string

Yes

Unique identifier for the customer at Gameball

Query Parameters

Attribute

Type

Required

Description

isRead

boolean

No

Read status filter. This could be used in case you need to filter notifications based on their read status.

lang

string

No

Language filter. This could be used to specify the language needed to display the notification in. Note: The language provided should be as per configured languages in your account.

Example: "en", "fr".

page

integer

No

Result page number. Starts from 1. Default is 1

limit

integer

No

Result page size. Default is 50 notifications and Max is 200

Response

Attribute

Type

Description

notifications

array

count

integer

returned currently displayed notifications list count

total

integer

total number of notifications available matching the applied filters

Example:

"count": 50

"total": 200

notification Object

Attribute

Type

Description

notificationId

string

Unique Identifier for a notification .

title

string

Notification Title

body

string

Notification Body

isRead

boolean

Indicates whether the notification is read or not.

createdAt

string

Notification's creation date, as an ISO8601 timestamp.

Example: "2019-09-21T16:53:28.190Z"

lang

string

The language in which the notification is displayed. In case the lang is not provided in the request, defaultlang is returned.

Note: The language provided should be as per configured languages in your account.

Example: "en", "fr".

icon

string

Notification's icon URL.

Sample Response

{
    "notifications": [
        {
            "notificationId" : "123",
            "title": "New VIP tier!",
            "body": "Keep it up! You are now on Bronze ",
            "isRead": true,
            "createdAt": "2021-05-12T00:08:09.646174",
            "lang": "en",
            "icon": "https://cdn.gameball.co/uploads/client776/ad8b2587-959f-48fd-ab58-a643323652begb-icon-level-13.png"
        },
        {
            "notificationId" : "124",
            "title": "Congratulations! ",
            "body": "Welcome earned. Enjoy your rewards and keep earning more!",
            "isRead": true,
            "createdAt": "2021-05-12T00:08:09.623367",
            "lang": "en",
            "icon": "https://cdn.gameball.co/uploads/client776/bcc5d9be-3861-415f-bdf9-34b4064a1320Group 2144.png"
        }
    ],
   "count": 50,
   "total": 200
}

Usage Example

curl -X GET -H 'apiKey: 807b041b7d35425988e354e1f6bce186' -v -i 
 'https://api.gameball.co/api/v3.0/integrations/notifications/player123?lang=en'
# Example 1
Gameball::Notifications.get_notifications("player123")

# Example 2
Gameball::Notifications.get_notifications("player123",{
	page: 2,
	limit: 10
})
$response = $gameball->notification
    ->getPlayerNotifications("player123",false, null, 2, 10);
notifications = gameball.get_notifications("player123")
var response = Gameball.GetPlayerNotifications("player123");

PUT - Mark Notification(s) as Read

https://api.gameball.co/api/v3.0/integrations/notifications

The API call is used to mark the customer's notification(s) as read in Gameball.

Request

Header

Attribute

Type

Required

Description

APIKey

string

Yes

Client API key

Body

Attribute

Type

Required

Description

notificationIds

array

Yes

An array of IDs of the notifications to be marked as read.

Example: ["12334", "14533", "55343"]

Sample Body

{
    "notificationIds" : ["123", "3441", "3245"]
}

Usage Example

curl -X PUT -H 'apiKey: 807b041b7d35425988e354e1f6bce186' -d '{
        "notificationIds" : ["123", "3441", "3245"]
  }' -v -i 'https://api.gameball.co/api/v3.0/integrations/notifications'
Gameball::Notifications.mark_notifications({notificationIds: ["123", "3441", "3245"]})
$response = $gameball->notification
    ->markPlayerNotificationsAsRead(["123", "3441", "3245"]);
notifications = gameball.mark_notifications(["123", "3441", "3245"])
var response = Gameball.MarkNotifications(new string[]{"123", "3441", "3245"});
PreviousLeaderboard 👑NextConfigurations 👑

Last updated 1 year ago

List of returned notification .

Customer Notifications
Mark Notification(s) as Read
objects