v1

latestOpenAPI 3.1.12026-07-222968170.1 KB
activities

post/v2/activities

Query parameters

site_idnumber

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

Request body

namestring required

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

customer_emailstring required

The email address for the customer

merchant_idstring nullable

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

ip_addressstring nullable

The IP address of the customer involved in this activity. Used in combination with user_agent to track referrals

user_agentstring nullable

The full user agent string of the customer involved in this activity. Used in combination with ip_address to track referrals

datestring nullable

The date this activity occurred, as an ISO 8601 timestamp. Defaults to now if not provided

referral_idstring nullable

A LoyaltyLion referral ID

tracking_idstring nullable

A LoyaltyLion email tracking ID

guestboolean nullable

A boolean value indicating if the customer is a guest. The default is true

statestring nullable

This field is no longer supported and will be ignored. Tracked activities will have an initial state according to the matching rule, which can be configured in your LoyaltyLion admin

Example request

{
  "date": "2025-01-01T12:00:00Z"
}

Response

201