POST

Query Loyalty 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 loyalty accounts, given the provided paging, filtering, and sorting. Query Loyalty Accounts runs with these defaults, which you can override:

Authentication

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

Permissions
Manage Loyalty
Read Loyalty
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/loyalty-accounts/v1/accounts/query

Body Params
queryQueryRequired

Filter object. See API Query Language for more information.

Response Object
loyaltyAccountsArray <LoyaltyAccount>

Loyalty accounts.


pagingMetadataPagingMetadata

Paging metadata

Query Accounts by ID
Request
cURL
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" } } } }'
Response
JSON
{ "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 } } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?