Customer Notifications

Retrieve and manage customer notifications with these APIs. Use them to display notification lists and mark notifications as read, helping keep customers informed about their rewards and activity.

Available APIs


GET - Customer Notifications

https://api.gameball.co/api/v4/integrations/customers/{customerId}/notifications

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

Security: Requires apikey and secretkey headers.

Request

Path Parameters

customerId string Required Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.


Response

application/json

notifications array This array contains the list of notifications sent to the customer. Each notification represents an event or update that happened, based on pre-configured settings from the Gameball dashboard. These notifications are typically used to inform the customer about specific actions such as cashback rewards, point adjustments, tier changes, or campaign achievement. Each object in the array provides details about the notification, such as its content, creation date, and read status.

Example : When a customer receives a cashback reward, the system sends a notification with details about the reward (if you have enabled the cashback reward notification on your dashboard). For example, the title could be "Cashback Reward!" and the body might include "You’ve received a cashback reward for your recent purchase."

Notification Object

notificationId string Unique identifier for the notification.


title string Title of the notification.


body string The content of the notification.


isRead boolean Indicates whether the notification has been read by the customer (true if read, false if unread).


createdAt datetime The timestamp when the notification was created.


lang string Language of the notification.


icon string URL to the icon associated with the notification.It can be displayed alongside the notification message in user interfaces like a mobile app or web dashboard.


count number Number of notifications on the current page.


total number Total number of notifications.


pageNumber number The current page number of the paginated response.


Sample Response

{
    "notifications": [
        {
            "notificationId": "139944",
            "title": "Points Added!",
            "body": "Your points have been adjusted, your current points balance is 89",
            "isRead": true,
            "createdAt": "0001-01-01T00:00:00",
            "lang": "en",
            "icon": "https://cdn.gameball.co/uploads/Notifications/cachback.webp"
        },
        {
            "notificationId": "152966",
            "title": "Congratulations!",
            "body": "First Order 🛍️ earned. Enjoy your rewards and keep earning more!",
            "isRead": false,
            "createdAt": "0001-01-01T00:00:00",
            "lang": "en",
            "icon": "https://s3.us-east-2.amazonaws.com/gameball.stg.uploads/uploads/gb-library/general/order-01.webp"
        }
    ],
    "count": 3,
    "total": 3,
    "pageNumber": 1
}

PUT - Mark Customer Notifications as Read

https://api.gameball.co/api/v4/integrations/customers/{customerId}/notifications

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

Security: Requires apikey and secretkey headers.

Request

Body

application/json

notificationsIds array Required An array of notification IDs that you want to mark as read. These notification IDs are retrieved through the Get Notifications endpoint, which returns a list of all notifications sent to the customer. By marking specific notifications as read, you acknowledge that the customer has seen them. This is useful for keeping track of which notifications have been addressed and ensuring a clear customer communication experience.


Sample Request

{
  "notificationsIds": [          
    139944                       
  ]
}

Last updated