POST

Search Accounts


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

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/search

Body Params
searchSearch

Search options.

Response Object
accountsArray <LoyaltyAccount>

Found accounts.


pagingMetadataPagingMetadata

Paging metadata.


aggregationDataAggregationData

Aggregation data

Search accounts, given the provided filters
Request
cURL
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} } }'
Response
JSON
{ "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 }
Errors

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

Did this help?