UI Based Programs

API Interaction

API Interaction Flow

Integration Flow

get
Register Device

https://sdk.customerglu.com/user/v2/user/sdk?token=true
Request
Response
Request
Headers
Content-Type
required
string
application/json
Body Parameters
referredBy
optional
string
Referred User's Id
firebaseToken
optional
string
Firebase token
writeKey
required
string
Write Key provided by
deviceType
optional
string
Accepted values ['android', 'ios']
deviceName
optional
string
Name of the device
deviceId
required
string
Device Id
userId
required
string
User Id
Response
200: OK
{
"success": true,
"data": {
"user": {
"userId": "testuser2",
"maraxId": "<maraxId>",
"client": "<clientId>",
"deviceId": "<deviceId>",
"deviceType": "<android>"
},
"token": "<token>"
}
}

get
Retrieve Campaign Data

https://sdk.customerglu.com/reward/v2/user
Request
Response
Request
Headers
Authorization
required
string
Bearer <token>
Content-Type
required
string
application/json
Response
200: OK
{
"success": true,
"defaultUrl": "<default-url>",
"campaigns": [
{
"campaignId": "<campaignId>",
"userId": "<userId>",
"url": "<campaign-url>",
"stepsCompleted": 0,
"totalSteps": 0,
"programTitle": "Spin The Wheel To win rewards",
"subTitle": "Rewards worth ₹10K ",
"activeUsers": 0,
"turnsRemaining": 0,
}
],
"referral": {
"image": "<image-asset-url>",
"text": "Refer a friend to earn a free spin",
"ctaText": "Refer Now",
"referralMessage": "<Referral Message>",
"referralLink": "<Referral Link>"
}
}

Sending Events

get
Sending Events from pubsub integration

https://events.customerglu.com/api/v1/pubsub/activity
Request
Response
Request
Body Parameters
message.data
optional
object
base encoded data
Response
200: OK

get
Sending Events from Backend Server

https://events.customerglu.com/api/v1/sdk/activity
Request
Response
Request
Headers
Content-Type
optional
string
application/json
Authorization
optional
string
Basic <base64-encoded key:secret>
Body Parameters
timestamp
required
string
userId
required
string
type
required
string
eventName
required
string
eventProperties
required
string
Response
200: OK