Users
User management
User registration by email
User registration by email
POST /registeruser
REQUEST
{
"PromotionId":"{Promotion id}",
"UserId":"{user email}",
"Trafficsource":"{traffic source or UTM value}",
"FullName":"{Optional - Name of user}",
"Nickname":"{Optional - Name to show in profile and rankings}",
"City":"{Optional - City from where the user participates}",
"DateOfBirth":"{Optional - user date of birth in format yyyy-mm-dd}"
}
RESPONSE
{
"status"=200,
"success"=true,
}
User registration by phone
User registration by phone
POST /registeruserbyphone
REQUEST
{
"PromotionId":"{Promotion id}",
"UserId":"{user phone number}",
"Trafficsource":"{traffic source or UTM value}",
"FullName":"{Optional - Name of user}",
"Nickname":"{Optional - Name to show in profile and rankings}",
"City":"{Optional - City from where the user participates}",
"DateOfBirth":"{Optional - user date of birth in format yyyy-mm-dd}",
"Email":"{user email}",
}
RESPONSE
{
"status"=200,
"success"=true,
}
User Participations Profile
Get information of user participations, credits and ranking position.
GET /consumerprofile/{promotion id}/{userid}
RESPONSE
{
"UserId": "{User identifier}"
"PromotionId": "{Promotion id}",
"TenantId": "{TenantId}",
"Name": "{Name provided by the user}",
"Nickname": "{User nickname}",
"City": "{Name of the city provided by the user}",
"Email": "{User Email}",
"PhoneNumber": "{User PhoneNumber}",
"CreditsEarned": "{Total credits earned in this promotion}",
"CreditsSended": "{Total credits sended throw transfers in this promotion}",
"CreditsReceived": "{Total credits received throw transfers in this promotion}",
"CreditsRedeemed": "{Total credits redeemed for rewards in this promotion}",
"CreditsAvailable": "{Total credits available in this promotion}",
"RankingPosition":"{If the promotion manages participation ranking, this field shows the user's current position}"
"Participations":[
{
"PromotionLocationUserId": "{Promotion location user participation Id}",
"DateCreated": "{Participation creation date}",
"Status": "{Participation status 1 => Pending, 2 => Approved, 3 => Invalid }",
"Credits": "{Credits earned for this participation}",
"Location":"{Location of the participation proof of purchase}"
},
...
],
"Transfers":[
{
"DateCreated": "{Transfer creation date}",
"UserId":"{User identifier}",
"TransferType":"{ 1 => Incoming, 2 => Outgoing}",
"Credits":"{transfer credits}",
}
]
"RewardRedemptions":[
{
"DateCreated": "{Redepmtion creation date}",
"PromotionId": "{Reward Id}",
"PromotionName": "{Reward Name}",
"RedemptionCode":"{QR url or alphanumeric code}"
"RedemptionUrl":"{Reference Url to go to redeem the reward code}"
"Credits": "{Used credits}",
"Status":"{redemption status of reward, Posible values =>PendingReview, Approved, Invalid}",
"Location":"{Location where the QR code wa redeemed}"
}
]
}
Promotion Ranking
Shows the list of the first N places in the promotion participation ranking and the current position of the user that is sent as a parameter
GET /ranking/{promotion id}/{userid}/{positions}
RESPONSE
{
"userRankingPosition": "{Current position of the user passed as parameter}",
"credits": "{Credits accumulated by the user}",
"ranking": [
{
"nickname": "{User nickname}",
"credits": "{Credits accumulated by the user}",
"userRankingPosition": "{Position}",
"city":"{User city}"
},
...
]
}