Skip to main content

Participations

Participations are the interaction of users with experiences. A Participation is created as soon as the consumer initiates the participation process.

To make a participation on the platform, 2 services must be consumed:

  • Begin participation process with or without proof of purchase
  • Complete participation process

Depending on the type of experience, participation may require proof of purchase and this condition will indicate which endpoint we should use to initiate a participation.

Begin participation process WITHOUT proof of purchase

This is the first step to create a participation(PromotionLocationUser). If the value is 200 the receipt has been successfully validated. Otherwise, the response will return a different status and an associated message.

POST /beginparticipation

REQUEST
{
"PromotionId":"{Promotion id}",
"UserId":"{user identifier}",
"Trafficsource":"{traffic source or UTM value}"
}
RESPONSE
success response
{
"StatusCode": 200,
"promotionLocationUserId": "{Promotion location user participation Id}"
}

Begin participation process WITH proof of purchase

This is the first step to create a participation(PromotionLocationUser) from a receipt evaluation. To validate the receipt, the "StatusCode" field of the response must be evaluated. If the value is 200 the receipt has been successfully validated. Otherwise, the response will return a different status and an associated message.

POST /validatepopformat (deprecated)
POST /beginparticipationwithpop

REQUEST
{
"PromotionId":"{Promotion id}",
"UserId":"{user identifier}",
"Trafficsource":"{traffic source or UTM value}",
"ImageExtension":"{Extension of image file}",
"ImageBase64":"{Receipt image encode to Base64}"
}
RESPONSE
success response
{
"StatusCode": 200,
"promotionLocationUserId": "{Promotion location user participation Id}"
}

error responses
{
"StatusCode" = 300,
"message" = "pop_duplicated"
}
{
"StatusCode" = 406,
"message" = "not_recognized"
}
{
"StatusCode" = 500,
"message" = "{Internal exception error}"
}
{
"StatusCode" = 451,
"message" = "{empty_invoice_field}"
}

Complete participation process

Confirm the completion of participation by sending the responses to the participation answers(The participation answers are optional).

"Answers": The promotion configuration is what will determine if it is required to send this attribute. The queried object of a promotion has an attribute called "form". If this attribute is different from null, we must send the "Answer" attribute to complete the participation.
The "form" attribute has a "FormItems" array that references each question configured in the promotion for participations. The "Answer" attribute is an array of objects that contains the user's responses:

- PromotionLocationUserId: PromotionLocationUserId returned by the begin participation endpoint
- Field: Refers to the FormItem field of the question that the user answered.
- Id: FieldId
- value: Value of consumer anwer
POST /saveparticipation/
REQUEST
{
"PromotionId":"{Promotion id}",
"UserId":"{user identifier}",
"Trafficsource":"{traffic source or UTM value}",
"PromotionLocationUserId":"{PromotionLocationUserId returned by the begin participation endpoint}",
"Answers":
[
{
"PromotionLocationUserId":"{PromotionLocationUserId returned by the begin participation endpoint}",
"Field": {
"Id": "{field indentifier}",
"value": "{Value of consumer anwer}"
}
},
...
]
}
RESPONSE
{
"StatusCode": 200,
"promotionLocationUserId": "{Promotion location user participation Id}"
}