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

Get customer point transaction history

Request

Retrieves paginated list of point transactions for the authenticated customer, ordered by ID descending (most recent first). Each transaction includes details about points earned or spent, transaction type, status (PENDING, APPROVED, REJECTED), associated order information, and timestamps. Useful for displaying transaction history to customers.

Query
pageableobject(Pageable)required

Pagination parameters (page number, size, sort)

pageable.​pageinteger(int32)>= 0
pageable.​sizeinteger(int32)>= 1
pageable.​sortArray of strings
curl -i -X GET \
  'https://loyalty-admin.appstle.com/loyalty/cp/api/transaction-by-shop?page=0&size=1&sort=string'

Responses

Point transactions retrieved successfully with pagination headers (X-Total-Count, Link)

Bodyapplication/json
idinteger(int64)
shopstring
customerIdinteger(int64)required
pointsnumber(double)required
pointTypestringrequired
Enum"DEBIT""CREDIT"
notestring
statusstring
Enum"APPROVED""PENDING""REJECTED"
transactionRulestring
Enum"ADJUSTMENT""EARN_RULE""REDEEM_RULE""REFERRAL"
earnRuleIdinteger(int64)
earnRuleNamestring
redeemRuleRuleIdinteger(int64)
redeemRuleNamestring
autoApprovalDaysinteger(int32)
orderIdinteger(int64)
orderNamestring
createAtstring(date-time)
importedboolean
spentAmountnumber(double)
contractIdstring
orderFinancialStatusstring
orderFulfillmentStatusstring
orderLineItemIdinteger(int64)
rewardTypestring
Enum"STORE_CREDIT""DISCOUNT_CODE""POINTS"
displayNamestring
Response
application/json
[ { "id": 12345, "shop": "example-store.myshopify.com", "customerId": 67890, "points": 50, "pointType": "EARNED", "note": "Points earned for purchase", "status": "APPROVED", "transactionRule": "ORDER_PLACED", "createAt": "2025-01-15T10:30:00Z", "spentAmount": 99.99 } ]

Get logged-in customer ID

Request

Retrieves the customer ID of the currently authenticated user. This endpoint is useful for obtaining the customer ID after authentication to use in other API calls.

curl -i -X GET \
  https://loyalty-admin.appstle.com/loyalty/cp/api/logged-in-customer

Responses

Customer ID retrieved successfully

Bodyapplication/json
integer(int64)
Response
application/json
12345

Get customer referral history

Request

Retrieves paginated list of referrals made by the authenticated customer. Each entry includes the referred email, referral status (PENDING, COMPLETED, EXPIRED), associated points earned, and timestamps. Useful for displaying referral tracking dashboards.

Query
pageableobject(Pageable)required

Pagination parameters (page number, size, sort)

pageable.​pageinteger(int32)>= 0
pageable.​sizeinteger(int32)>= 1
pageable.​sortArray of strings
curl -i -X GET \
  'https://loyalty-admin.appstle.com/loyalty/cp/api/customer-referrals?page=0&size=1&sort=string'

Responses

Customer referrals retrieved successfully with pagination headers (X-Total-Count, Link)

Bodyapplication/json
idinteger(int64)
shopstringrequired
customerIdinteger(int64)required
referredEmailIdstringrequired
descriptionstring
referralRuleIdinteger(int64)
claimAtstring(date-time)
statusstringrequired
Enum"PENDING""CLAIMED""RECURRING"
createAtstring(date-time)required
referralRewardedboolean
referredRewardedboolean
referralNotestring
referredNotestring
pixelDatastring
Response
application/json
[ { "id": 12345, "shop": "example-store.myshopify.com", "customerId": 67890, "referredEmailId": "friend@example.com", "description": "Referred friend via email", "referralRuleId": 1, "status": "PENDING", "createAt": "2025-01-15T10:30:00Z" } ]