POST
/
v2
/
activities
cURL
curl --request POST \
  --url https://api.loyaltylion.com/v2/activities \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "customer_id": "<string>",
  "customer_email": "<string>",
  "merchant_id": "<string>",
  "properties": {
    "url": "<string>"
  },
  "ip_address": "<string>",
  "user_agent": "<string>",
  "date": "2025-01-01T12:00:00Z",
  "referral_id": "<string>",
  "tracking_id": "<string>",
  "guest": true
}'
This response does not have an example.

Use this endpoint to track an activity to LoyaltyLion. When tracking an activity, if an applicable rule exists, it will be triggered based on the name of the activity.

For the Clickthrough/Visit rule, you also need to specify the destination URL in the properties.

You shouldn’t use this API to track and reward purchases. Instead you should use the Orders API which allows you to send important information specific to orders, such as the order total and payment status.

Authorizations

Authorization
string
header
required

An API key linked to a Program in LoyaltyLion, with a set of permissions (scopes). API keys can be created manually, or acquired through an OAuth2 flow. The API key should be provided as a Bearer token in the Authorization header

Query Parameters

site_id
number

Create the activity in the specified site. This is only required for programs that have multiple sites. Programs with only a single site can omit this parameter, and the activity will be created in the program's only site

Body

application/json

Body

The body is of type object.

Response

201

201