POST

Query Rewards


Retrieves a list of rewards, given the provided paging, filtering, and sorting.

Query Rewards runs with these defaults, which you can override: cursorPaging.limit is 50.

To learn about working with Query endpoints, see API Query Language,Sorting and Paging,and Field Projection.

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

Body Params
queryQueryRequired

Query parameters.

Response Object
rewardsArray <Reward>

Retrieved loyalty rewards.


pagingMetadataPagingMetadata

Details on the paged set of results returned.

Query rewards
Request
cURL
curl -X POST \ 'https://www.wixapis.com/loyalty-rewards/v1/rewards/query' \ -H 'Authorization: <AUTH>' \ -H 'Content-Type: application/json' \ --data-raw '{ "query": { "filter": {"name": {"$startsWith": "Free"}} } }'
Response
JSON
{ "rewards": [ { "id": "46d7bbce-6bb4-4174-ae5a-7f44c19f95ce", "name": "Free shipping", "requiredPoints": 20, "active": true, "type": "COUPON_REWARD", "couponReward": { "freeShipping": { "configsByTier": [ { "costInPoints": 20 } ] } }, "revision": "1", "createdDate": "2024-04-18T10:35:41.071Z", "updatedDate": "2024-04-18T10:35:41.071Z" } ], "pagingMetadata": { "count": 1, "cursors": {}, "hasNext": false } }
Errors

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

Did this help?