Skip to content

Storefront APIs

Languages
Servers
https://loyalty-admin.appstle.com

Storefront APIs

Customer-facing loyalty program APIs for storefront operations. These endpoints allow customers to manage their loyalty account, earn and redeem points, submit reviews, handle referrals, and track their rewards. All endpoints require customer authentication via JWT token.

Operations

Claim social media reward points

Request

Allows a customer to claim loyalty points for social media engagement (Facebook like, Instagram follow, etc.) based on the specified earn rule. Each social media action can typically only be claimed once per customer. The system tracks which social media rewards have been claimed to prevent duplicate claims.

Bodyapplication/jsonrequired
earnRuleIdinteger(int64)
curl -i -X POST \
  https://loyalty-admin.appstle.com/loyalty/cp/api/claim-social-media-points \
  -H 'Content-Type: application/json' \
  -d '{
    "earnRuleId": 0
  }'

Responses

Social media points claimed successfully

Generate customer referral URL

Request

Creates and stores a short referral URL for the authenticated customer to share with potential referrals. The referral link is typically generated once and then can be shared via email, social media, or other channels. When new customers use this link, both the referrer and referee may receive rewards.

curl -i -X POST \
  https://loyalty-admin.appstle.com/loyalty/cp/api/add-customer-referral-url

Responses

Referral URL generated successfully

Accept referral offer (GET)

Request

Accepts a referral offer using the referral token and email address via query parameters. This is a convenience endpoint that provides the same functionality as the POST version but via GET request. Useful for simple referral link implementations where query parameters are easier to construct. Creates a new customer referral record and may generate a welcome discount code for the referee.

Query
tokenstringrequired

Referral token received from the referrer

Example: token=abc123referraltoken
emailstringrequired

Email address of the person accepting the referral

Example: email=newcustomer@example.com
curl -i -X GET \
  'https://loyalty-admin.appstle.com/loyalty/cp/api/referral-rules/accept-offer?token=abc123referraltoken&email=newcustomer%40example.com'

Responses

Referral offer accepted successfully

Bodyapplication/json
idinteger(int64)
messagestring
discountCodestring
statusstring
Enum"SUCCESS""FAILED"
Response
application/json
{ "id": 12345, "message": "Referral accepted successfully", "discountCode": "WELCOME20", "status": "SUCCESS" }