The loyalty program API allows a site owner to activate their site's loyalty program and manage its details, like the point name and point icon. The loyalty program must be ACTIVE
to start creating customer loyalty accounts and tracking their point balances.
With the loyalty program API, you can:
Note: In order to use the loyalty program API, the Wix site owner must first install the Wix Loyalty Program app to their site. A site owner can install the app through their dashboard or the Wix App Market.
A loyalty program allows sites to maintain customer reward accounts. Site owners can create a loyalty program to increase customer retention. Read more about the loyalty program in this overview.
Program name.
Details about the program's collectible unit.
Program status. Customers can only earn or redeem points while the program is ACTIVE
.
Default: "DRAFT"
Date and time the program was created.
Date and time the program was updated.
Configuration for the points expiration feature.
Information about the available program premium features.
{
"loyaltyProgram": {
"name": "Star Loyalty Program",
"pointDefinition": {
"customName": "Stars",
"icon": {
"id": "",
"url": "shapes/58819f398c36404f8017aa8faa2240b4.svg",
"height": 0,
"width": 0
}
},
"status": "ACTIVE",
"pointsExpiration": {
"status": "DISABLED",
"monthsOfInactivity": 3,
"expiringPointsPercentage": 100
},
"premiumFeatures": {
"loyaltyProgram": true,
"tiers": true,
"pointsExpiration": true
},
"createdDate": "2022-05-22T08:18:32.186Z",
"updatedDate": "2022-06-07T08:40:47.426Z"
}
}
Retrieves the loyalty program.
Retrieved loyalty program.
curl -X GET \
'https://www.wixapis.com/loyalty-programs/v1/program' \
-H 'Authorization: <AUTH>'
{
"loyaltyProgram": {
"name": "Star Loyalty Program",
"pointDefinition": {
"customName": "Stars",
"icon": {
"id": "",
"url": "shapes/39dce0a5d1ce498f95526b1390eaf585.svg",
"height": 0,
"width": 0
}
},
"status": "ACTIVE",
"pointsExpiration": {
"status": "DISABLED",
"monthsOfInactivity": 3,
"expiringPointsPercentage": 100
},
"premiumFeatures": {
"loyaltyProgram": true,
"tiers": true,
"pointsExpiration": true
},
"createdDate": "2022-05-22T08:18:32.186Z",
"updatedDate": "2022-05-25T10:36:32.430Z"
}
}
Updates the loyalty program.
You cannot activate the loyalty program using this endpoint. To do so, use the Activate Loyalty Program endpoint.
You can only call this method when authenticated as a Wix app or Wix user identity.
Loyalty program fields to update.
Updated loyalty program.
curl -X PATCH \
'https://www.wixapis.com/loyalty-programs/v1/program' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-raw '{
"loyaltyProgram": {
"name": "Northern Star Loyalty Program",
"points": {
"customName": "Northern Star"
}
}
}'
{
"loyaltyProgram": {
"name": "Northern Star Loyalty Program",
"pointDefinition": {
"customName": "Northern Star",
"icon": {
"id": "",
"url": "shapes/39dce0a5d1ce498f95526b1390eaf585.svg",
"height": 0,
"width": 0
}
},
"status": "ACTIVE",
"pointsExpiration": {
"status": "DISABLED",
"monthsOfInactivity": 3,
"expiringPointsPercentage": 100
},
"premiumFeatures": {
"loyaltyProgram": true,
"tiers": true,
"pointsExpiration": true
},
"createdDate": "2022-05-22T08:18:32.186Z",
"updatedDate": "2022-06-07T08:40:47.426Z"
}
}
Activates a loyalty program.
When a loyalty program is installed it starts in DRAFT
status. Customers cannot earn or redeem points while the program is not ACTIVE
.
You can only call this method when authenticated as a Wix app or Wix user identity.
Activated loyalty program.
curl -X POST \
'https://www.wixapis.com/loyalty-programs/v1/program/activate' \
-H 'Authorization: <AUTH>'
{
"loyaltyProgram": {
"name": "Star Loyalty Program",
"pointDefinition": {
"customName": "Stars",
"icon": {
"id": "",
"url": "shapes/39dce0a5d1ce498f95526b1390eaf585.svg",
"height": 0,
"width": 0
}
},
"status": "ACTIVE",
"pointsExpiration": {
"status": "DISABLED",
"monthsOfInactivity": 3,
"expiringPointsPercentage": 100
},
"premiumFeatures": {
"loyaltyProgram": true,
"tiers": true,
"pointsExpiration": true
},
"createdDate": "2022-05-22T08:18:32.186Z",
"updatedDate": "2022-05-25T10:36:32.430Z"
}
}
Changes the program status to PAUSED
.
You can only call this method when authenticated as a Wix app or Wix user identity.
Paused loyalty program.
curl -X POST \
'https://www.wixapis.com/loyalty-programs/v1/program/pause' \
-H 'Authorization: <AUTH>'
{
"loyaltyProgram": {
"name": "Star Loyalty Program",
"pointDefinition": {
"customName": "Stars",
"icon": {
"id": "",
"url": "shapes/39dce0a5d1ce498f95526b1390eaf585.svg",
"height": 0,
"width": 0
}
},
"status": "PAUSED",
"pointsExpiration": {
"status": "DISABLED",
"monthsOfInactivity": 3,
"expiringPointsPercentage": 100
},
"premiumFeatures": {
"loyaltyProgram": true,
"tiers": true,
"pointsExpiration": true
},
"createdDate": "2022-05-22T08:18:32.186Z",
"updatedDate": "2022-05-25T10:36:32.430Z"
}
}
Retrieves information about the available loyalty program premium features.
Whether there are any loyalty program premium features.
Whether there is a tiers premium feature.
Whether there is a points expiration premium feature.
curl -X GET \ 'https://www.wixapis.com/loyalty-programs/v1/program/premium-features' \
-H 'Authorization: <AUTH>'
{
"loyaltyProgram": true,
"tiers": true,
"pointsExpiration": true
}
Updates the pointsExpiration
status to ENABLED
.
You can only call this method when authenticated as a Wix app or Wix user identity.
Loyalty program with enabled points expiration feature.
curl -X POST \
'https://www.wixapis.com/loyalty-programs/v1/program/points-expiration/enable' \
-H 'Authorization: <AUTH>'
{
"loyaltyProgram": {
"name": "Star Loyalty Program",
"pointDefinition": {
"customName": "Stars",
"icon": {
"id": "",
"url": "shapes/39dce0a5d1ce498f95526b1390eaf585.svg",
"height": 0,
"width": 0
}
},
"status": "ACTIVE",
"pointsExpiration": {
"status": "ENABLED",
"monthsOfInactivity": 3,
"expiringPointsPercentage": 100
},
"premiumFeatures": {
"loyaltyProgram": true,
"tiers": true,
"pointsExpiration": true
},
"createdDate": "2022-05-22T08:18:32.186Z",
"updatedDate": "2022-05-25T10:36:32.430Z"
}
}
Updates the pointsExpiration
status to DISABLED
.
You can only call this method when authenticated as a Wix app or Wix user identity.
Loyalty program with disabled points expiration feature.
curl -X POST \
'https://www.wixapis.com/loyalty-programs/v1/program/points-expiration/disable' \
-H 'Authorization: <AUTH>'
{
"loyaltyProgram": {
"name": "Star Loyalty Program",
"pointDefinition": {
"customName": "Stars",
"icon": {
"id": "",
"url": "shapes/39dce0a5d1ce498f95526b1390eaf585.svg",
"height": 0,
"width": 0
}
},
"status": "ACTIVE",
"pointsExpiration": {
"status": "DISABLED",
"monthsOfInactivity": 3,
"expiringPointsPercentage": 100
},
"premiumFeatures": {
"loyaltyProgram": true,
"tiers": true,
"pointsExpiration": true
},
"createdDate": "2022-05-22T08:18:32.186Z",
"updatedDate": "2022-05-25T10:36:32.430Z"
}
}
Triggered when a loyalty program is updated.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.loyalty.v1.program
.
Event name. Expected updated
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.loyalty.v1.program_updated",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}