Skip to main content
POST
Accept referral offer (POST)

Body

application/json

The referral token and the email address of the friend accepting the referral

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 offer accepted successfully

discountCode
string

The referred friend's own reward code, when the friend got a discount code on acceptance and Appstle support has turned on returning it for the store. Otherwise empty. Reward codes are emailed to the customers either way.

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