About Loyalty Accounts

The loyalty accounts API allows a site owner to create and manage its customers' loyalty accounts. The loyalty accounts maintain a customer's balance of loyalty points.

With the loyalty accounts API, you can:

  • Create a new loyalty account.
  • Adjust the balance of a loyalty account.
  • Earn points to a loyalty account.
  • Retrieve loyalty accounts.
  • Handle webhooks when an account is updated or adjusted.

Note: Before loyalty accounts can be created, the site's loyalty program must be active. See the activate loyalty program endpoint to learn how to activate the loyalty program using the API.

Was this helpful?
Yes
No

Account Object

A loyalty account stores a customer's loyalty points balance. A site's customers can earn points to their account and redeem those points for rewards.

Properties
idstringRead-onlyformat GUID
Account ID.

contactIdstringRead-onlyformat GUID
Account owner's contact ID. See the Contacts API to learn more about a site's contacts.

memberIdstringRead-onlyformat GUID
Account owner's member ID. See the Members API to learn more about a site's members.

pointsobjectRead-only
Information about the account totals.

latestTransactionobjectRead-onlydeprecated - use loyaltyTransaction instead
Details of the account's latest transaction.

rewardAvailablebooleanRead-only
Whether the account has a reward available. true if the amount of points in points.balance are enough to redeem for a reward.

createdDatestringRead-onlyformat date-time
Date and time the account was created.

updatedDatestringRead-onlyformat date-time
Date and time the account was last updated.

lastActivityDatestringRead-onlyformat date-time
Account's last activity date and time.

revisionnumber
Revision number, which increments by 1 each time the loyalty account is updated. To prevent conflicting changes, the current revision must be passed when updating the loyalty account. Ignored when creating an account.

tierobjectRead-only
Tier information.

contactobjectRead-only
Contact information.

pointsExpirationobjectRead-only
Points expiration information
Was this helpful?
Yes
No

GetList Accounts

Retrieves a list of accounts, given the provided filters.

You can retrieve selected loyalty accounts with an array of contactIds or retrieve a list of all of a site's loyalty accounts with an empty request parameter. Use the cursorPaging parameters to limit how many items load at a time.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/loyalty-accounts/v1/accounts

Was this helpful?
Yes
No

PostCreate Account

Creates a loyalty account for one of a site's contacts.

To create a new loyalty account, the customer must first be a site contact with a contact ID. See the Contacts API to learn more about a site's contacts. The site must also have an active loyalty program before loyalty accounts can be created. See the activate loyalty program endpoint to activate a site's loyalty program.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Loyalty
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/loyalty-accounts/v1/accounts

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PostEarn Points

Adds points to a loyalty account.

Only a positive amount can be added using the earn points endpoint. To adjust an account's balance for a negative amount, use Adjust Points.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Loyalty
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/loyalty-accounts/v1/accounts/{accountId}/earn-points

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PostAdjust Points

Adjusts the point balance of a loyalty account.

You can adjust the balance in two ways:

  • balance allows you to set the total points balance to this new amount.
  • amount allows you to adjust the points balance by this amount. This amount can be a positive number to increase the points balance or a negative number to decrease the balance.

An account may not be adjusted to result in a negative balance. If you pass an integer in both the balance and the amount parameters then the balance adjustment takes effect and the amount adjustment is ignored.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Loyalty
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/loyalty-accounts/v1/accounts/{accountId}/adjust-points

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

GetGet Account

Retrieves an account using the loyalty account ID.

You can also retrieve an account using a secondary ID, such as a contact ID or a member ID by using the Get Account by Secondary ID endpoint.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/loyalty-accounts/v1/accounts/{id}

Was this helpful?
Yes
No

GetGet Program Totals

Retrieves the total amount of points earned, redeemed, and adjusted for the entire loyalty program.

The balance is the current total of points outstanding, while the earned, adjusted, and redeemed amounts are the historically accumulated amounts. The totals include the amounts for all loyalty accounts.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/loyalty-accounts/v1/accounts/program-totals

Was this helpful?
Yes
No

GetGet Current Member Account

Retrieves the currently logged-in member's account.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/loyalty-accounts/v1/accounts/my-account

Was this helpful?
Yes
No

GetGet Account By Secondary Id

Retrieves the account belonging to the specified contact or member.

This endpoint retrieves loyalty accounts using either a customer's contact ID or member ID. Your app can also retrieve an account using the loyalty account ID by using the Get Account endpoint.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/loyalty-accounts/v1/accounts/fetch-by

Was this helpful?
Yes
No

PostSearch Accounts

Retrieves a list of accounts, given the provided filters and search capabilities. Search is executed on the account's name and email values.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/loyalty-accounts/v1/accounts/search

Was this helpful?
Yes
No

PostCount Accounts

Retrieves the count of found accounts, given the provided filters and search capabilities.

This endpoint can help find the total count of accounts when used alongside Search Accounts.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/loyalty-accounts/v1/accounts/count

Was this helpful?
Yes
No

GetGet Transaction

Deprecated

This method has been replaced with loyalty_transaction, and will be removed on June 1, 2024.

Retrieves a transaction using the transaction ID.

A loyalty transaction includes any activity that changes a loyalty account point balance, such as adjusting, earning, or redeeming loyalty points. To retrieve all of the transactions for a specific loyalty account, use List Transactions.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/loyalty-accounts/v1/transactions/{id}

Was this helpful?
Yes
No

GetList Transactions

Deprecated

This method has been replaced with loyalty_transaction, and will be removed on June 1, 2024.

Retrieves a list of transactions, given the provided filters.

Loyalty transactions include any activities that change a loyalty account point balance, such as adjusting, earning, or redeeming loyalty points. To retrieve a specific transaction, use that transaction's ID and Get Transaction.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/loyalty-accounts/v1/accounts/{accountId}/transactions

Was this helpful?
Yes
No

Account Reward Availability Updated

Triggered when rewardAvailable field is changed on Account.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
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.account.

slugstring
Event name. Expected reward_availability_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.

actionEventobject
Event information.
Was this helpful?
Yes
No

Account Struct

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
fieldsMap <string, Value>format map
Was this helpful?
Yes
No

Loyalty Account Created

Triggered when a loyalty account is created.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
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.account.

slugstring
Event name. Expected created.

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.

createdEventobject
Event information.
Was this helpful?
Yes
No

Loyalty Account Updated

Triggered when a loyalty account is updated, including when points are adjusted, earned, or redeemed.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
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.account.

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.

updatedEventobject
Event information.
Was this helpful?
Yes
No

Points Updated

Triggered when the points of a loyalty account are adjusted, earned, or redeemed.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
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.account.

slugstring
Event name. Expected points_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.

actionEventobject
Event information.

Was this helpful?
Yes
No