Skip to main content
PUT
Update discount code status (legacy endpoint)

Headers

X-API-Key
string
required

API key for authentication

Body

application/json

Request containing customer ID/email, discount code, and new status

discountCode
string
required

The reward's discount code. The lookup ignores case.

Example:

"LOYALTY15OFF"

status
enum<string>
required

The new status.

Available options:
USED,
UNUSED,
EXPIRED,
REFUNDED,
CANCELED,
SUBSCRIPTION_ACTIVE
Example:

"USED"

customerEmail
string

The customer's email, used when customerId isn't sent.

Example:

"customer@example.com"

customerId
integer<int64>

Shopify customer ID of the reward's owner. Send customerId or customerEmail.

Example:

67890

Response

Discount code status updated and customer loyalty details returned

achievableTierId
integer<int64>
availablePoints
number<double>
createAt
string<date-time>
creditedPoints
number<double>
currentVipTier
string
customerStatus
enum<string>
Available options:
ACTIVE,
INACTIVE,
EXCLUDED,
EXCLUDED_BY_CUSTOMER
dob
string<date>
dobYearProvided
boolean
expiringPointsAmount
number<double>
pendingPoints
number<double>
pointsExpireAt
string<date-time>

The customer's short referral link, on https://referral.appstle.com/ or the merchant's custom referral domain. Its last part is the customer's referral token, which Accept referral offer takes as token. The link redirects to the store's primary domain with appstle_referral=true and appstle_referral_code={token} in the query string.

Example:

"https://referral.appstle.com/abc123def456ghij"

referredCompleted
integer<int64>
rewardedForCreatingAccount
boolean
rewardedForFacebook
boolean
rewardedForInstagram
boolean
rewardedForNewsLetter
boolean
rewardedForPinterest
boolean
rewardedForSharingOnFacebook
boolean
rewardedForSharingOnX
boolean
rewardedForSms
boolean
rewardedForTiktok
boolean
rewardedForTwitter
boolean
rewardedForYoutube
boolean
rewards
object[]
spentAmount
number<double>
storeCreditBalance
number<double>
storeCreditCurrency
string
vipTierExpiredAt
string<date-time>
vipTierOrderCount
integer<int32>
vipTierSpentAmount
number<double>