Notifications

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

Available Endpoints

GET - User Notifications

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

This API is used to to retrieve a specific user's list of notifications in Referd.

Request

Path Parameters

Query Parameters

Response

Returns an array of notification objects described as follows:

notification Object

Sample Response

{
    "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
}

Usage Example

curl -X GET -H 'apiKey: 807b041b7d35425988e354e1f6bce186' -v -i 
 'https://api.gameball.co/api/v3.0/integrations/notifications/player123?lang=en'

PUT - Mark Notification(s) as Read

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

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

Request

Header

Body

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'

Last updated