Skip to main content
POST
cURL
Record that a customer shared their referral link, and on which channel. This is what populates the share counts in your referral analytics — without it, your dashboard shows referral visits and purchases but no shares, so call it whenever a shopper completes a share in your storefront or app (for example, after the native share sheet confirms, or when they copy their link). The channel must be one of the channels that appear in the customer’s referral_urls, and should match the link they actually shared — device_share for a native share sheet, direct for a copied link, and so on. Shares are categorized by channel in your referral analytics. The customer must be enrolled in the program; sharing is not available to guests or blocked customers. A successful request returns 204 with no body.

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

Path Parameters

site_id
number
required

Your LoyaltyLion Site ID

Body

application/json

Body

customer_merchant_id
string
required

The ID, in your platform or ecommerce store, of the customer who shared their referral link. For Shopify stores this can be either a GID or a regular numeric ID

This must be a customer whose state is enrolled — only enrolled customers have referral links to share

Minimum string length: 1
Example:

"100001"

channel
enum<string>
required

Which of the customer's referral_urls was shared. Pass the key you took the link from, not the link itself — we re-derive the referral code from the customer and the channel, so you never have to parse one out of a URL

Available options:
direct,
facebook,
twitter,
email,
whatsapp,
instagram,
device_share
Example:

"whatsapp"

Response

204