Skip to main content
API: Contest Admin Entries

Reward people for real-world activity, within LemonadeLXP

Alex Lemaire avatar
Written by Alex Lemaire
Updated over 3 years ago

LemonadeLXP's contest module gives you the platform's first bridge between the "real world" and the platform. On the surface level, this integration might be interpreted as a fantastic means to motivate learners - but consider that, in truth, you are adding vital data points to your LemonadeLXP. This is the first step to aggregating real-world outcomes and learning outcomes together in a singular database.

Triggering the API is very simple. We assume that you have already created a Contest entity and an API token within it. To make things a bit simpler, we will structure a contest for our imaginary "sales team." For every thousand dollars they earn in our year-long competition, they'll get 1 point in our contest. On the LemonadeLXP side, the skills for the courses we want them to take are already all set (out of this article's scope). We just need to feed the extra data in!

This connection between your platforms and LemonadeLXP is made via API. Note, if you don't have any developers to help with this, we might be able to help! Just reach out on Intercom, and we'll get the ball rolling!

Developer Notes

The API endpoint for this functionality is:

The API is triggered via POST, with these parameters:

  • auth_api_token: your API token as the developer, which spans all contests, generated from the contest API Area (e.g., ac334993-3372-4f77-ba04-a229040c5f7f)

  • auth_user_id: your LemonadeLXP user ID as the developer. You can get this from the enrollment tab (e.g., 24) by examining the URL. Edit your user, and note the numeric ID at the tail of the URL

  • user_email: the email associated to the user we are rewarding, e.g., [email protected]

  • contest_id: the ID of the contest into which the reward is being pushed

  • amount: total entries to be earned

  • type: the entry type you've defined in that contest's admin panel

  • description: something that the user can see, should describe why they earned these points

In our case, we're going to add an event listener to our CRM software. Anytime someone closes a deal, we're going to make this API call:

POST /api/v1/contest/reward HTTP/1.1

Content-Type: application/x-www-form-urlencoded; charset=utf-8

Host: fictitiouslemonadelxp.com

Connection: close

Content-Length: 206

auth_api_token=ac334993-3372-4f77-ba04-a229040c5f7f&auth_user_id=24&[email protected]&contest_id=8456548a-7918-47ef-a804-c189da808d01&amount=5&type=CLMR&description=Closed+deal+number+523

The amount value was derived by floor( dealValue / 1000 ). The description was populated by the deal ID.

Completing this call, will populate the user's Contest tab on your LemonadeLXP platform!


Did this answer your question?