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:
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.
The following table shows field support for filters and sorting for the Account object:
Field | Query Filter Operators | Sortable |
---|---|---|
id | $eq , $ne , $hasSome , $startsWith , $in , $nin , $exists | Sortable |
contactId | $eq , $ne , $hasSome , $startsWith , $in , $nin , $exists | Sortable |
memberId | $eq , $ne , $hasSome , $startsWith , $in , $nin , $exists | Sortable |
tier.id | $eq , $ne , $hasSome , $startsWith , $in , $nin , $exists | Sortable |
points.balance | $eq , $ne , $hasSome , $in , $nin , $exists , $lt , $lte , $gt , $gte | Sortable |
points.earned | $eq , $ne , $hasSome , $in , $nin , $exists , $lt , $lte , $gt , $gte | Sortable |
points.adjusted | $eq , $ne , $hasSome , $in , $nin , $exists , $lt , $lte , $gt , $gte | Sortable |
points.redeemed | $eq , $ne , $hasSome , $in , $nin , $exists , $lt , $lte , $gt , $gte | Sortable |
points.expired | $eq , $ne , $hasSome , $in , $nin , $exists , $lt , $lte , $gt , $gte | Sortable |
createdDate | $eq , $ne , $hasSome , $in , $nin , $exists , $lt , $lte , $gt , $gte | Sortable |
lastActivityDate | $eq , $ne , $hasSome , $in , $nin , $exists , $lt , $lte , $gt , $gte | Sortable |
pointsExpiration.expirationDate | $eq , $ne , $hasSome , $in , $nin , $exists , $lt , $lte , $gt , $gte | Sortable |
pointsExpiration.expiringPointsAmount | $eq , $ne , $hasSome , $in , $nin , $exists , $lt , $lte , $gt , $gte | Sortable |
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.
Account ID.
Account owner's contact ID. See the Contacts API to learn more about a site's contacts.
Account owner's member ID. See the Members API to learn more about a site's members.
Information about the account totals.
Whether the account has a reward available. true
if the amount of points in points.balance
are enough to redeem for a reward.
Date and time the account was created.
Date and time the account was last updated.
Account's last activity date and time.
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.
Tier information.
Contact information.
Points expiration information
{
"account": {
"id": "e6f39a5b-a6d0-4556-b889-0cf09d8a84f7",
"contactId": "88615e02-3e8a-4297-8939-5d0a432b322a",
"memberId": "a517751b-a1ca-4423-8d91-aaf8f5b34215",
"points": {
"balance": 15,
"earned": 10,
"redeemed": 0,
"adjusted": 5
},
"rewardAvailable": true,
"createdDate": "2021-12-06T14:33:19.114Z",
"updatedDate": "2021-12-07T07:30:23.749Z",
"revision": "4",
"tier": {
"id": "1415f107-640c-4e04-870f-149cdd562093",
"updatedDate": "2021-12-07T07:30:23.749Z",
"recalculationDate": null,
"points": 15
},
"lastActivityDate": "2021-12-07T07:30:23.749Z",
"contact": {
"id": "7728152f-7deb-45f8-913f-7fdff4abbebe",
"name": "Johna Linskey",
"picture": null,
"email": "johna.linskey@yopmail.com",
"displayName": "Johna Linskey"
},
"points_expiration": {
"expiration_date": "2022-05-07T07:30:23.749Z",
"expiring_points_amount": 5
}
}
}
This method has been replaced with Query Loyalty Accounts, and will be removed on June 1, 2025.
Deprecation Notice
This method has been replaced with Query Loyalty Accounts and will be removed on June 30, 2025. If your app uses this method, we recommend updating your code as soon as possible.
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.
Deprecated endpoint, please use QueryLoyaltyAccounts
or SearchAccounts
instead.
You can only call this method when authenticated as a Wix app or Wix user identity.
List of contact IDs. See the Contacts API to learn more.
Maximum number of items to return in the results.
Pointer to the next or previous page in the list of results.
Pass the relevant cursor token from the pagingMetadata
object in the previous call's response.
Not relevant for the first request.
Loyalty accounts.
Details on the paged set of results returned.
curl -X GET \
'https://www.wixapis.com/loyalty-accounts/v1/accounts?contactIds[]=88615e02-3e8a-4297-8939-5d0a432b322a&contactIds[]=fb8f125e-bfc3-4d9a-80c2-215494f24731' \
-H 'Authorization: <AUTH>'
{
"accounts": [
{
"id": "e6f39a5b-a6d0-4556-b889-0cf09d8a84f7",
"contactId": "88615e02-3e8a-4297-8939-5d0a432b322a",
"memberId": "a517751b-a1ca-4423-8d91-aaf8f5b34215",
"points": {
"balance": 15,
"earned": 10,
"redeemed": 0,
"adjusted": 5
},
"rewardAvailable": true,
"createdDate": "2021-12-06T14:33:19.114Z",
"updatedDate": "2021-12-07T07:30:23.749Z",
"revision": "4",
"tier": {
"id": "1415f107-640c-4e04-870f-149cdd562093",
"updatedDate": "2021-12-07T07:30:23.749Z",
"recalculationDate": null,
"points": 15
},
"lastActivityDate": "2021-12-07T07:30:23.749Z",
"contact": {
"id": "7728152f-7deb-45f8-913f-7fdff4abbebe",
"name": "Johna Linskey",
"picture": null,
"email": "johna.linskey@yopmail.com",
"displayName": "Johna Linskey"
},
"points_expiration": {
"expiration_date": "2022-05-07T07:30:23.749Z",
"expiring_points_amount": 5
}
},
{
"id": "73618276-35cc-4d21-8380-bdd2fbebf781",
"contactId": "fb8f125e-bfc3-4d9a-80c2-215494f24731",
"memberId": "ddd5302e-23cf-4fd6-bf6b-461aaae3ab7d",
"points": {
"balance": 25,
"earned": 30,
"redeemed": 5,
"adjusted": 0
},
"rewardAvailable": true,
"createdDate": "2021-12-06T14:33:19.114Z",
"updatedDate": "2021-12-07T07:30:23.749Z",
"revision": "4",
"tier": {
"id": null,
"updatedDate": "2021-12-07T07:30:23.749Z",
"recalculationDate": null,
"points": 30
},
"lastActivityDate": "2021-12-07T07:30:23.749Z",
"contact": {
"id": "7728152f-7deb-45f8-913f-7fdff4abbebe",
"name": "Aigneis Johnsson",
"picture": null,
"email": "aigneis.johnsson@yopmail.com",
"displayName": "Aigneis Johnsson"
},
"points_expiration": {
"expiration_date": "2022-05-07T07:30:23.749Z",
"expiring_points_amount": 5
}
}
],
"pagingMetadata": {
"count": 2,
"offset": null,
"total": 2,
"tooManyToCount": null,
"cursors": {
"next": null,
"prev": null
}
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
Contact ID for a Wix site contact. See the Contacts API to learn more about a site's contacts.
Loyalty account.
curl -X POST \
'https://www.wixapis.com/loyalty-accounts/v1/accounts' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-raw '{
"contactId": "88615e02-3e8a-4297-8939-5d0a432b322a"
}'
{
"account": {
"id": "e6f39a5b-a6d0-4556-b889-0cf09d8a84f7",
"contactId": "88615e02-3e8a-4297-8939-5d0a432b322a",
"memberId": "3c7267de-204d-4f6c-b5a5-5d060bc3b21c",
"points": {
"balance": 0,
"earned": 0,
"redeemed": 0,
"adjusted": 0
},
"rewardAvailable": false,
"createdDate": "2021-12-06T14:33:19.114Z",
"updatedDate": "2021-12-06T14:33:19.114Z",
"revision": "1",
"tier": {
"id": "1415f107-640c-4e04-870f-149cdd562093",
"updatedDate": "2021-12-07T07:30:23.749Z",
"recalculationDate": null,
"points": 15
},
"lastActivityDate": "2021-12-07T07:30:23.749Z",
"contact": {
"id": "7728152f-7deb-45f8-913f-7fdff4abbebe",
"name": "Johna Linskey",
"picture": null,
"email": "johna.linskey@yopmail.com",
"displayName": "Johna Linskey"
},
"points_expiration": null
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
Loyalty account ID.
Amount of points to earn. Must be a positive, whole number.
Min: 1
Max: 9999999
Description of how the points were earned.
Max: 100 characters
ID of the app that initiated the transaction.
If points were earned manually, then the appId
is the Loyalty app's
wixAppId
of 553c79f3-5625-4f38-b14b-ef7c0d1e87df
. If points were earned in an automatic event,
then the appId
is from that automation's sourceAppId
.
Unique string identifier generated by the app. Wix uses this identifier to recognize subsequent retries of the same request.
Please use GUID
format.
Activity type.
If points were earned through automation it should be set to trigger key.
Order id which was source of this transaction.
Followed social media details.
Updated loyalty account.
Transaction ID associated with the points earned.
curl -X POST \
'https://www.wixapis.com/loyalty-accounts/v1/accounts/e6f39a5b-a6d0-4556-b889-0cf09d8a84f7/earn-points' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-raw '{
"accountId": "e6f39a5b-a6d0-4556-b889-0cf09d8a84f7",
"amount": 10,
"description": "For subscribing to the newsletter",
"appId": "db9c3016-ff93-4105-bdef-ff852f3c74c0",
"idempotencyKey": "baa05589-20d1-45db-ba29-99920bccf37e"
}'
{
"transactionId": "262c8eb0-123e-4117-9fe6-4973a3551688",
"account": {
"id": "e6f39a5b-a6d0-4556-b889-0cf09d8a84f7",
"contactId": "88615e02-3e8a-4297-8939-5d0a432b322a",
"memberId": "a517751b-a1ca-4423-8d91-aaf8f5b34215",
"points": {
"balance": 10,
"earned": 10,
"redeemed": 0,
"adjusted": 0
},
"rewardAvailable": false,
"createdDate": "2021-12-06T14:33:19.114Z",
"updatedDate": "2021-12-07T07:26:56.417Z",
"revision": "2",
"tier": {
"id": "1415f107-640c-4e04-870f-149cdd562093",
"updated_date": "2021-12-07T07:30:23.749Z",
"recalculationDate": null,
"points": 15
},
"lastActivityDate": "2021-12-07T07:30:23.749Z",
"contact": {
"id": "7728152f-7deb-45f8-913f-7fdff4abbebe",
"name": "Johna Linskey",
"picture": null,
"email": "johna.linskey@yopmail.com",
"displayName": "Johna Linskey"
},
"points_expiration": {
"expiration_date": "2022-05-07T07:30:23.749Z",
"expiring_points_amount": 5
}
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
Loyalty account ID.
Description to explain the reason for the points adjustment.
Each time the loyalty account is updated, revision
increments by 1.
The current revision
must be passed when adjusting points in the loyalty account. This
ensures you're working with the latest version of the loyalty account and prevents unintended overwrites.
Sets the account's point balance to this amount. Must be a positive, whole number or zero.
The net difference between this new balance and the previous balance will be reflected in the adjusted
field of the customer's account.
Min: 0
Max: 999999999
Adjusts the account's point balance by this amount. Must be a whole number with a maximum of 7 digits.
The amount can be negative, but cannot be 0
.
Min: -9999999
Max: 9999999
Loyalty account.
Transaction ID associated with the points adjustment.
curl -X POST \
'https://www.wixapis.com/loyalty-accounts/v1/accounts/e6f39a5b-a6d0-4556-b889-0cf09d8a84f7/adjust-points' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-raw '{
"accountId": "01e34b81-4e48-43e4-b178-c84f3b968574",
"description": "Sync from external program",
"balance": 15,
"revision": "3"
}'
{
"transactionId": "9d29cf95-fd2c-4db4-8f4d-2d65c52cacb9",
"account": {
"id": "e6f39a5b-a6d0-4556-b889-0cf09d8a84f7",
"contactId": "88615e02-3e8a-4297-8939-5d0a432b322a",
"memberId": "a517751b-a1ca-4423-8d91-aaf8f5b34215",
"points": {
"balance": 15,
"earned": 10,
"redeemed": 0,
"adjusted": 5
},
"rewardAvailable": true,
"createdDate": "2021-12-06T14:33:19.114Z",
"updatedDate": "2021-12-07T07:30:23.749Z",
"revision": "4",
"tier": {
"id": "1415f107-640c-4e04-870f-149cdd562093",
"updatedDate": "2021-12-07T07:30:23.749Z",
"recalculationDate": null,
"points": 15
},
"lastActivityDate": "2021-12-07T07:30:23.749Z",
"contact": {
"id": "7728152f-7deb-45f8-913f-7fdff4abbebe",
"name": "Johna Linskey",
"picture": null,
"email": "johna.linskey@yopmail.com",
"displayName": "Johna Linskey"
},
"points_expiration": {
"expiration_date": "2022-05-07T07:30:23.749Z",
"expiring_points_amount": 5
}
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the account to retrieve.
Loyalty account.
curl -X GET \
'https://www.wixapis.com/loyalty-accounts/v1/accounts/e6f39a5b-a6d0-4556-b889-0cf09d8a84f7' \
-H 'Authorization: <AUTH>'
{
"account": {
"id": "e6f39a5b-a6d0-4556-b889-0cf09d8a84f7",
"contactId": "88615e02-3e8a-4297-8939-5d0a432b322a",
"memberId": "a517751b-a1ca-4423-8d91-aaf8f5b34215",
"points": {
"balance": 15,
"earned": 10,
"redeemed": 0,
"adjusted": 5
},
"rewardAvailable": true,
"createdDate": "2021-12-06T14:33:19.114Z",
"updatedDate": "2021-12-07T07:30:23.749Z",
"revision": "4",
"tier": {
"id": "1415f107-640c-4e04-870f-149cdd562093",
"updatedDate": "2021-12-07T07:30:23.749Z",
"recalculationDate": null,
"points": 15
},
"lastActivityDate": "2021-12-07T07:30:23.749Z",
"contact": {
"id": "7728152f-7deb-45f8-913f-7fdff4abbebe",
"name": "Johna Linskey",
"picture": null,
"email": "johna.linskey@yopmail.com",
"displayName": "Johna Linskey"
},
"points_expiration": {
"expiration_date": "2022-05-07T07:30:23.749Z",
"expiring_points_amount": 5
}
}
}
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 loyalty accounts, given the provided paging, filtering, and sorting. Query Loyalty Accounts runs with these defaults, which you can override:
createdDate
is sorted in ASC
orderpaging.limit
is 100
paging.offset
is 0
For field support for filters and sorting, see Loyalty Accounts: Supported Filters and Sorting.
To learn about working with Query endpoints, see API Query Language.You can only call this method when authenticated as a Wix app or Wix user identity.
Filter object. See API Query Language for more information.
Loyalty accounts.
Paging metadata
curl -X POST \
'https://www.wixapis.com/loyalty-accounts/v1/accounts/query' \
-H 'Authorization: <AUTH>'
-H 'Content-Type: application/json' \
-d '{
"query": {
"filter": {
"id": {
"$eq": "e6f39a5b-a6d0-4556-b889-0cf09d8a84f7"
}
}
}
}'
{
"accounts": [
{
"id": "e6f39a5b-a6d0-4556-b889-0cf09d8a84f7",
"contactId": "88615e02-3e8a-4297-8939-5d0a432b322a",
"memberId": "a517751b-a1ca-4423-8d91-aaf8f5b34215",
"points": {
"balance": 15,
"earned": 10,
"redeemed": 0,
"adjusted": 5
},
"rewardAvailable": true,
"createdDate": "2021-12-06T14:33:19.114Z",
"updatedDate": "2021-12-07T07:30:23.749Z",
"revision": "4",
"tier": {
"id": "1415f107-640c-4e04-870f-149cdd562093",
"updatedDate": "2021-12-07T07:30:23.749Z",
"recalculationDate": null,
"points": 15
},
"lastActivityDate": "2021-12-07T07:30:23.749Z",
"contact": {
"id": "7728152f-7deb-45f8-913f-7fdff4abbebe",
"name": "Johna Linskey",
"picture": null,
"email": "johna.linskey@yopmail.com",
"displayName": "Johna Linskey"
},
"pointsExpiration": {
"expirationDate": "2022-05-07T07:30:23.749Z",
"expiringPointsAmount": 5
}
}
],
"pagingMetadata": {
"count": 2,
"offset": null,
"total": 6,
"tooManyToCount": null,
"cursors": {
"next": "Gh0KDnBvaW50cy5iYWxhbmMlEAEaCREAAAAJJIBhQBorCgxfdXBkYXRlZERhdGUaGyoZChcKCiR0aW1lc3RhbXASCREA4GzcPdl3QiIkYjRkYzAyMzUtMjg2OS00MThjLWJjODQtNDMwNjUxMmMzYjhl",
"prev": null
}
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
Point totals for the entire program.
Tier total for the entire program.
curl -X GET \
'https://www.wixapis.com/loyalty-accounts/v1/accounts/program-totals' \
-H 'Authorization: <AUTH>'
{
"points": {
"balance": 165,
"earned": 136,
"redeemed": 0,
"adjusted": 29,
"expired": 0
},
"tierTotals": [
{
"numberOfAccounts": 5
},
{
"id": "acddc0e0-5e27-4a1b-a52d-b3785ac258cb",
"numberOfAccounts": 3
}
]
}
Retrieves the currently logged-in member's account.
Loyalty account.
curl -X GET \
'https://www.wixapis.com/loyalty-accounts/v1/accounts/my-account' \
-H 'Authorization: <AUTH>'
{
"account": {
"id": "e6f39a5b-a6d0-4556-b889-0cf09d8a84f7",
"contactId": "88615e02-3e8a-4297-8939-5d0a432b322a",
"memberId": "a517751b-a1ca-4423-8d91-aaf8f5b34215",
"points": {
"balance": 15,
"earned": 10,
"redeemed": 0,
"adjusted": 5
},
"rewardAvailable": true,
"createdDate": "2021-12-06T14:33:19.114Z",
"updatedDate": "2021-12-07T07:30:23.749Z",
"revision": "4",
"tier": {
"id": "1415f107-640c-4e04-870f-149cdd562093",
"updatedDate": "2021-12-07T07:30:23.749Z",
"recalculationDate": null,
"points": 15
},
"lastActivityDate": "2021-12-07T07:30:23.749Z",
"contact": {
"id": "7728152f-7deb-45f8-913f-7fdff4abbebe",
"name": "Johna Linskey",
"picture": null,
"email": "johna.linskey@yopmail.com",
"displayName": "Johna Linskey"
},
"points_expiration": {
"expiration_date": "2022-05-07T07:30:23.749Z",
"expiring_points_amount": 5
}
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
Loyalty account.
curl -X GET \
'https://www.wixapis.com/loyalty-accounts/v1/accounts/fetch-by?contactId=88615e02-3e8a-4297-8939-5d0a432b322a' \
-H 'Authorization: <AUTH>'
{
"account": {
"id": "e6f39a5b-a6d0-4556-b889-0cf09d8a84f7",
"contactId": "88615e02-3e8a-4297-8939-5d0a432b322a",
"memberId": "a517751b-a1ca-4423-8d91-aaf8f5b34215",
"points": {
"balance": 15,
"earned": 10,
"redeemed": 0,
"adjusted": 5
},
"rewardAvailable": true,
"createdDate": "2021-12-06T14:33:19.114Z",
"updatedDate": "2021-12-07T07:30:23.749Z",
"revision": "4",
"tier": {
"id": "1415f107-640c-4e04-870f-149cdd562093",
"updatedDate": "2021-12-07T07:30:23.749Z",
"recalculationDate": null,
"points": 15
},
"lastActivityDate": "2021-12-07T07:30:23.749Z",
"contact": {
"id": "7728152f-7deb-45f8-913f-7fdff4abbebe",
"name": "Johna Linskey",
"picture": null,
"email": "johna.linskey@yopmail.com",
"displayName": "Johna Linskey"
},
"points_expiration": {
"expiration_date": "2022-05-07T07:30:23.749Z",
"expiring_points_amount": 5
}
}
}
Retrieves a list of accounts, given the provided filters and search capabilities. Search is executed on the account's name and email values.
You can only call this method when authenticated as a Wix app or Wix user identity.
Search options.
Found accounts.
Paging metadata.
Aggregation data
curl -X POST \
'https://www.wixapis.com/loyalty-accounts/v1/accounts/search' \
-H 'Authorization: <AUTH>' \
--data-raw '{
"search": {
"search": {"expression": "John"},
"cursor_paging": {"limit": 2}
}
}'
{
"accounts": [
{
"id": "0d1ce314-084a-4edd-a0c7-8a885c6248ba",
"contactId": "f96d2d30-a267-41e8-832c-615fae1bfee3",
"memberId": null,
"points": {
"balance": 573,
"earned": 0,
"redeemed": 0,
"adjusted": 0
},
"rewardAvailable": true,
"createdDate": "2023-10-06T11:09:01.443Z",
"updatedDate": "2023-10-19T22:07:15.618Z",
"revision": "14",
"tier": {
"id": "1415f107-640c-4e04-870f-149cdd562093",
"updatedDate": "2021-12-07T07:30:23.749Z",
"recalculationDate": null,
"points": 15
},
"lastActivityDate": "2023-10-10T15:34:44.864Z",
"contact": {
"id": "f96d2d30-a267-41e8-832c-615fae1bfee3",
"name": "Johna Linskey",
"picture": null,
"email": "johna.linskey@yopmail.com",
"displayName": "Johna Linskey"
},
"points_expiration": {
"expiration_date": "2024-05-07T07:30:23.749Z",
"expiring_points_amount": 5
}
},
{
"id": "19b378db-896d-480d-a75e-cb4e5b77bf26",
"contactId": "63f477d4-a278-4a1d-8d4c-2a2786970f90",
"memberId": null,
"points": {
"balance": 474,
"earned": 0,
"redeemed": 0,
"adjusted": 0
},
"rewardAvailable": true,
"createdDate": "2023-10-05T14:08:44.221Z",
"updatedDate": "2023-10-19T22:06:23.608Z",
"revision": "20",
"tier": {
"id": null,
"updatedDate": "2021-12-07T07:30:23.749Z",
"recalculationDate": null,
"points": 30
},
"lastActivityDate": "2023-10-10T15:33:34.088Z",
"contact": {
"id": "63f477d4-a278-4a1d-8d4c-2a2786970f90",
"name": "Aigneis Johnsson",
"picture": null,
"email": "aigneis.johnsson@yopmail.com",
"displayName": "Aigneis Johnsson"
},
"points_expiration": {
"expiration_date": "2024-05-07T07:30:23.749Z",
"expiring_points_amount": 5
}
}
],
"pagingMetadata": {
"count": 2,
"cursors": {
"next": "19b378db-896d-480d-a75e-cb4e5b77bf26,1.0",
"prev": null
},
"hasNext": true
},
"aggregationData": null
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
Filter object.
Free text to match in searchable fields.
curl -X POST \
'https://www.wixapis.com/loyalty-accounts/v1/accounts/count' \
-H 'Authorization: <AUTH>' \
--data-raw '{
"search": {"expression": "John"},
"filter": {"points.balance": {"$gte": 50}}
}'
{
"count": 2
}
Updates points balance of multiple accounts. Depending on the BulkAdjustPointsRequest.type: amount - provided amount of points is appended to the accounts balance balance - accounts balance is set to the provided amount
Returns id of the asyncInfra job that takes care of the points adjustment.
You can only call this method when authenticated as a Wix app or Wix user identity.
Triggered when a loyalty account is created.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.loyalty.v1.account
.
Event name. Expected created
.
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.account_created",
"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
}
}
}
Triggered when the points of a loyalty account are adjusted, earned, or redeemed.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.loyalty.v1.account
.
Event name. Expected points_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.account_points_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
}
}
}
{
"id": "48b171b8-e2c1-46da-92ff-5ce4b173c751",
"entityFqdn": "wix.loyalty.v1.account",
"slug": "points_updated",
"entityId": "2bdbac7d-b121-4191-84bf-a359b20bc8c6",
"actionEvent": {
"body": {
"account": {
"rewardAvailable": false,
"revision": "3",
"points": {
"balance": 1,
"earned": 0,
"adjusted": 1,
"redeemed": 0
},
"id": "fe0ca230-61a6-4ebf-9199-9c0d238619aa",
"contactId": "87bbd811-f753-4de4-994d-69b24d22cb56",
"memberId": "87bbd811-f753-4de4-994d-69b24d22cb56",
"updatedDate": "2021-12-29T14:06:50.092Z",
"createdDate": "2021-12-29T13:55:32.505Z",
"tier": {
"id": "1415f107-640c-4e04-870f-149cdd562093",
"updatedDate": "2021-12-07T07:30:23.749Z",
"recalculationDate": null,
"points": 15
},
"lastActivityDate": "2021-12-07T07:30:23.749Z",
"contact": {
"id": "7728152f-7deb-45f8-913f-7fdff4abbebe",
"name": "Johna Linskey",
"picture": null,
"email": "johna.linskey@yopmail.com",
"displayName": "Johna Linskey"
}
}
}
},
"eventTime": "2021-12-29T14:06:50.106622Z",
"triggeredByAnonymizeRequest": false
}
Triggered when rewardAvailable field is changed on Account.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.loyalty.v1.account
.
Event name. Expected reward_availability_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.account_reward_availability_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
}
}
}
Triggered when a loyalty account is updated, including when points are adjusted, earned, or redeemed.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.loyalty.v1.account
.
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.account_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
}
}
}