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 and transactions related to those 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.

Attributes
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.

pointsobject
Information about the account totals.

latestTransactionobject
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.

tierobject
Tier information. The Loyalty Tiers API is currently unavailable, but the program may be activated and managed from a site's loyalty dashboard.

contactobject
Was this helpful?
Yes
No

GetList Accounts

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
GET
https://www.wixapis.com/loyalty-accounts/v1/accounts

Was this helpful?
Yes
No

PostCreate Account

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/loyalty-accounts/v1/accounts

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

PostEarn Points

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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.Authorization header required - pass the OAuth Access Token
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

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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.Authorization header required - pass the OAuth Access Token
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

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
GET
https://www.wixapis.com/loyalty-accounts/v1/accounts/{id}

Was this helpful?
Yes
No

GetGet Program Totals

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
GET
https://www.wixapis.com/loyalty-accounts/v1/accounts/program-totals

Was this helpful?
Yes
No

GetGet Account By Secondary Id

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
GET
https://www.wixapis.com/loyalty-accounts/v1/accounts/fetch-by

Was this helpful?
Yes
No

PostSearch Accounts

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/loyalty-accounts/v1/accounts/search

Was this helpful?
Yes
No

GetGet Transaction

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
GET
https://www.wixapis.com/loyalty-accounts/v1/transactions/{id}

Was this helpful?
Yes
No

GetList Transactions

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
GET
https://www.wixapis.com/loyalty-accounts/v1/accounts/{accountId}/transactions

Was this helpful?
Yes
No

Loyalty Account Created

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a loyalty account is created.

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

Points Updated

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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

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

Loyalty Account Updated

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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

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