About Loyalty Program

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:

  • Activate a loyalty program.
  • Update the name and icon for the program's points.
  • Retrieve a loyalty program.

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.

Did this help?

Program Object


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.

Properties
namestringminLength 2maxLength 50

Program name.


pointDefinitionPointDefinition

Details about the program's collectible unit.


statusstringRead-only

Program status. Customers can only earn or redeem points while the program is ACTIVE.

Default: "DRAFT"


createdDatestringRead-onlyformat date-time

Date and time the program was created.


updatedDatestringRead-onlyformat date-time

Date and time the program was updated.


pointsExpirationPointsExpiration

Configuration for the points expiration feature.


premiumFeaturesPremiumFeaturesRead-only

Information about the available program premium features.

LoyaltyProgram
JSON
{ "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" } }
Did this help?

GET

Get Loyalty Program


Retrieves the loyalty program.

Permissions
Manage Loyalty
Read Loyalty
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/loyalty-programs/v1/program

Request
This endpoint does not take any parameters.
Response Object
loyaltyProgramLoyaltyProgram

Retrieved loyalty program.

Get loyalty program
Request
cURL
curl -X GET \ 'https://www.wixapis.com/loyalty-programs/v1/program' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "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" } }
Did this help?

PATCH

Update Loyalty Program


Updates the loyalty program.

You cannot activate the loyalty program using this endpoint. To do so, use the Activate Loyalty Program endpoint.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Loyalty
Learn more about app permissions.
Endpoint
PATCH
https://www.wixapis.com/loyalty-programs/v1/program

Body Params
loyaltyProgramLoyaltyProgramRequired

Loyalty program fields to update.

Response Object
loyaltyProgramLoyaltyProgram

Updated loyalty program.

Update loyalty program
Request
cURL
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" } } }'
Response
JSON
{ "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" } }
Event TriggersThis method triggers the following events:
Did this help?

POST

Activate Loyalty Program


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.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Loyalty
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/loyalty-programs/v1/program/activate

Request
This endpoint does not take any parameters.
Response Object
loyaltyProgramLoyaltyProgram

Activated loyalty program.

Activate loyalty program
Request
cURL
curl -X POST \ 'https://www.wixapis.com/loyalty-programs/v1/program/activate' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "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" } }
Event TriggersThis method triggers the following events:
Did this help?

POST

Pause Loyalty Program


Changes the program status to PAUSED.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Loyalty
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/loyalty-programs/v1/program/pause

Request
This endpoint does not take any parameters.
Response Object
loyaltyProgramLoyaltyProgram

Paused loyalty program.

Pause loyalty program
Request
cURL
curl -X POST \ 'https://www.wixapis.com/loyalty-programs/v1/program/pause' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "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" } }
Did this help?

GET

Get Loyalty Program Premium Features


Retrieves information about the available loyalty program premium features.

Permissions
Manage Loyalty
Read Loyalty
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/loyalty-programs/v1/program/premium-features

Request
This endpoint does not take any parameters.
Response Object
loyaltyProgramboolean

Whether there are any loyalty program premium features.


tiersboolean

Whether there is a tiers premium feature.


pointsExpirationboolean

Whether there is a points expiration premium feature.

Get loyalty program premium features
Request
cURL
curl -X GET \ 'https://www.wixapis.com/loyalty-programs/v1/program/premium-features' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "loyaltyProgram": true, "tiers": true, "pointsExpiration": true }
Did this help?

POST

Enable Points Expiration


Updates the pointsExpiration status to ENABLED.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Loyalty
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/loyalty-programs/v1/program/points-expiration/enable

Request
This endpoint does not take any parameters.
Response Object
loyaltyProgramLoyaltyProgram

Loyalty program with enabled points expiration feature.

Enable points expiration
Request
cURL
curl -X POST \ 'https://www.wixapis.com/loyalty-programs/v1/program/points-expiration/enable' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "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" } }
Event TriggersThis method triggers the following events:
Did this help?

POST

Disable Points Expiration


Updates the pointsExpiration status to DISABLED.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Loyalty
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/loyalty-programs/v1/program/points-expiration/disable

Request
This endpoint does not take any parameters.
Response Object
loyaltyProgramLoyaltyProgram

Loyalty program with disabled points expiration feature.

Enable points expiration
Request
cURL
curl -X POST \ 'https://www.wixapis.com/loyalty-programs/v1/program/points-expiration/disable' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "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" } }
Event TriggersThis method triggers the following events:
Did this help?

Loyalty Program Updated


Triggered when a loyalty program is updated.

Permissions
Manage Loyalty
Read Loyalty
Learn more about app permissions.
Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.loyalty.v1.program.


slugstring

Event name. Expected updated.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


updatedEventUpdatedEvent

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "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 } } }
Did this help?