Skip to main content
POST
Accept a referral invite

Headers

X-API-Key
string
required

API key for authentication

Body

application/json

The referral token from the link (appstle_referral_code) and the friend's email

email
string
required

Email address of the friend accepting the referral

Example:

"friend@example.com"

token
string
required

Referral token: the last part of the referrer's referralLink

Example:

"abc123def456ghij"

Response

Referral accepted

discountCode
string

Always empty. Reward codes are emailed to the customers instead.

errorKey
string

Stable code for some failures: SELF_REFERRAL or ALREADY_REFERRED. Empty on success and on other failures.

existingCustomer
boolean

On success, true when the email already belonged to a customer of the store

id
integer<int64>

Always empty. The referral record ID isn't returned.

message
string

Result message in English, such as "Referral accepted successfully."

status
enum<string>

SUCCESS when the referral was accepted, FAILED when it was refused

Available options:
SUCCESS,
FAILED