Create Activity
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
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
A built-in or custom activity rule name. If you’re tracking a custom rule, this should be the rule identifier; if you’re tracking a built-in activity, the name must be prefixed with a $
, for example, $signup
A unique ID for the customer involved in the activity. This should be your internal ID (from your ecommerce platform) for this customer
The email address for the customer
A unique ID used to link this activity to an internal resource in your system. If provided, you can update the state of this activity later using the activity update endpoint
A set of properties for this rule. Some rules require certain properties to be set
The IP address of the customer involved in this activity. Used in combination with user_agent to track referrals
The full user agent string of the customer involved in this activity. Used in combination with ip_address to track referrals
The date this activity occurred, as an ISO 8601 timestamp. Defaults to now if not provided
A LoyaltyLion referral ID
A LoyaltyLion email tracking ID
A boolean value indicating if the customer is a guest. The default is true