POST
/
v2
/
activities
curl --request POST \
  --url https://api.loyaltylion.com/v2/activities \
  --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.

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