thepaliaDevelopers
Activation Codes · Legacy

Create an activation code

Legacy integration

Use activation codes only when thepalia explicitly instructs you to. For new integrations, follow Create a course enrollment.

Deprecated

POST
/v1/activation-codes

Legacy integration. Create an activation code and registration URL for the supplied participant and offer. Use this integration only if thepalia explicitly tells you to; normally create a course enrollment instead. The offer must belong to your partner account and match the API environment. Each request generates a new code, so do not blindly repeat an uncertain request.

Authorization

OAuth2
headerAuthorizationBearer <token>

Obtain a token at /v1/oauth/token, then send Authorization: Bearer <access_token>.

Request Body

application/json
  1. body
eMail*Email

Participant's email address. Existing users are matched by email.

firstName*Firstname

Participant's first name.

lastName*Lastname

Participant's last name.

offerId*Offerid

Offer ID supplied by thepalia for this course and API environment.

Formatuuid

Response Body

Activation code created.

application/json
  1. response
code*Code

Activation code to give to the participant for the agreed integration.

registrationUrl*Registrationurl

Registration URL containing the activation code.

Example Request
curl -X POST 'https://api.staging.thepalia.de/v1/activation-codes' \  -H 'Content-Type: application/json' \  -d '{  "eMail": "alex@example.com",  "firstName": "Alex",  "lastName": "Example",  "offerId": "11111111-1111-4111-8111-111111111111"}'
Example Response
{  "code": "EXAMPLE-CODE",  "registrationUrl": "https://thepalia.app/courses/register?activationCode=EXAMPLE-CODE&email=alex%40example.com&firstName=Alex&lastName=Example"}