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
  • Using the Lang filter
  1. Tutorials
  2. Build Custom UI Elements 👑

Show Notifications Inbox

Gameball generates customer notifications for the customer as he progresses through your Gameball configured program. The notifications generated can be for Reward Campaign achievements, VIP tier achievements, wallet points rewards, or any other event as per your program's configurations.

In case you would like to build a custom notification tab/inbox for your customer within your app or web page, you can easily achieve this using the Notifications API.

The Notifications API returns a paged list of customer's notifications ordered by date. Each notification item in the list has all the information you need to display the notification.

{
    "notifications": [
        {
            "notificationId" : "123",
            "title": "New level!",
            "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
}

For each notification, you have its title, message, icon, and status - if it has been read by the customer or not.

curl -X PUT -H 'apiKey: 807b041b7d35425988e354e1f6bce186' -d '{
        "notificationIds" : ["123", "3441", "3245"]
  }' -v -i 'https://api.gameball.co/api/v3.0/integrations/notifications'

Using the query string filters, you can set the desired inbox page size by setting the limit value. The below API call returns the first page with size of 20 notifications.

https://api.gameball.co/api/v3.0/integrations/notifications/:playerUniqueId?
limit=20

You can also control the desired page by setting the page number as a query filter. The following example returns the second page where a page size is 20 notifications.

https://api.gameball.co/api/v3.0/integrations/notifications/:playerUniqueId?
limit=20&page=2

Using the Lang filter

In case your app or web page supports different locales and changes based on your customer's preferences. After configuring your supported locales in Gameball, you will need the API response text to match the locale of the current customer.

To do so, you can provide the optional Lang query filter to your API call so that Gameball can respond using the corresponding configured locale.

For example, if your app supports English and French, and the current customer using the app selected French as his preferred language. All you need to do is to call the API as follows:

https://api.gameball.co/api/v3.0/integrations/notifications/:playerUniqueId?
limit=20&page=2&lang=fr

PreviousBuild LeaderboardsNextAdapt UI to Configurations

Last updated 1 year ago

Once a notification is seen by the customer, you can update Gameball to set the notification as read using the . All you have to do is to call the PUT API with the list of notification ids that have been read by the customer.

In order to better understand how to configure your languages and know their respective language codes, check this in our Help Center.

article
Notifications PUT API