For the complete documentation index, see llms.txt. This page is also available as Markdown.

Reporting your first event

Learn how to report your first private event to the WLL API in staging mode using your event type secret.

Overview

In this tutorial, you’ll report your first private event to the White Label Loyalty (WLL) API. You’ll practice authenticating with your event type secret and sending an event payload in staging (Test) mode.

By the end, you’ll be able to:

  • Report a private event to the /events endpoint.

  • Verify that the API accepted your event.


Prerequisites

Before starting, make sure you have:

  • Access to the Loyalty Console with your tenant and your tenant API key.

  • A user account created in the Test mode of your console (the event reported in this tutorial will be linked to this user).

  • A tool to make API requests (e.g. curl, Postman, or your preferred programming language).


Instructions

1

Create a private event type

Follow the instructions in Creating event types to create a private event type called VISITED_VENUE using the Loyalty Console.

Once the event type is created, keep the event secret handy for the next steps.

2

Set your base URL

Use https://api.rewards.wlloyalty.net/v1 as the base URL for both Test and Live. Your tenant API key selects the environment:

  • wlltest... targets Test.

  • wlllive... targets Live.

Legacy clients: If your organisation was onboarded before 10 Aug 2026, you may still use the legacy setup with separate environments. In that model, Test (staging) uses https://api.staging.rewards.wlloyalty.net/v1, Live (production) uses https://api.rewards.wlloyalty.net/v1, and staging and production may have different client credentials.

3

Prepare your authorization header

You’ll use the event type secret to authenticate.

Authorization: Bearer <event_type_secret>
4

Prepare the user ID

You need the user ID of the account you're reporting the event for.

  1. In the Loyalty Console, go to Users → Members.

  2. Select the intended user.

  3. Copy the UUID visible under ID (e.g. 0e647aed-d12d-4b1c-9521-4ee122424e12).

5

Send your first event

Here’s a minimal example using curl:

Here's an example in Node.js using axios:

6

Verify the response

  • A successful response returns 200 OK with the reported event payload.

  • In the Loyalty Console, check the Activity section to confirm the event appears for the intended user.

Recap

  • You authenticated using an event type secret.

  • You reported a private event to the WLL API.

  • You confirmed the event was accepted in staging mode for the intended user.


Assessment

Try the following:

  1. Change the subject from user ID to accountNumber or authIdentifier and send another event.

  2. Add a custom property (e.g., "venueId": "12345") to the event payload.

  3. What response do you get if you use an invalid secret?


Next steps


Last updated