POST

Query Loyalty Coupon


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

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-coupons/v1/coupons/query

Body Params
queryQueryRequired

Query options.

Response Object
loyaltyCouponsArray <LoyaltyCoupon>

Retrieved loyalty coupons.


metadataMetadata

Metadata.

Query loyalty coupons
Request
cURL
curl -X POST \ 'https://www.wixapis.com/loyalty-coupons/v1/coupons/query' \ -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \ --data-raw '{ "query": { "filter": {"memberId": {"$eq": "e64eee9f-ec4e-4c8a-b015-eb3be0b2761b"}} } }'
Response
JSON
{ "loyaltyCoupons": [ { "id": "c90918b2-e9a5-4147-b4a4-953e235b9ddd", "accountId": "bf14421a-0ccb-4656-a91f-84119e8fc994", "memberId": "e64eee9f-ec4e-4c8a-b015-eb3be0b2761b", "transactionId": "aba2ef65-8f70-4113-b4bd-d44338a4e37d", "couponReference": { "couponId": "e48b4b92-3481-40bf-943d-c9324ae3cd6d", "code": "6Q1LC0K4KHSL", "name": "Free shipping", "specification": { "type": "FREE_SHIPPING", "freeShipping": true } }, "status": "ACTIVE", "rewardName": "Free shipping", "revision": "2", "createdDate": "2024-04-18T15:07:53.639Z", "updatedDate": "2024-04-18T15:07:55.426Z" } ], "metadata": { "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?