# Rewards

## GET /rest\_api/v1/rewards

> List customer rewards

```json
{"openapi":"3.0.0","info":{"title":"Joy Loyalty Program - API REST","version":"1.0.0"},"tags":[{"name":"Rewards"}],"servers":[{"url":"https://dev-api.joy.so"}],"paths":{"/rest_api/v1/rewards":{"get":{"tags":["Rewards"],"summary":"List customer rewards","parameters":[{"name":"X-Joy-Loyalty-App-Key","in":"header","schema":{"type":"string"},"description":"App ID of your shop which retrieved from the Settings page"},{"name":"X-Joy-Loyalty-Secret-Key","in":"header","schema":{"type":"string"},"description":"Secret Key of your shop which retrieved from the Settings page"},{"name":"customerId","in":"query","schema":{"type":"string"}},{"name":"before","in":"query","schema":{"type":"string"}},{"name":"after","in":"query","schema":{"type":"string"}},{"name":"shopifyCustomerId","in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"OK","headers":{"Connection":{"schema":{"type":"string"}},"Content-Length":{"schema":{"type":"integer"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Cache-Control":{"schema":{"type":"string"}},"Content-Type":{"schema":{"type":"string"}},"Function-Execution-Id":{"schema":{"type":"string"}},"Server":{"schema":{"type":"string"}},"Strict-Transport-Security":{"schema":{"type":"string"}},"X-Cloud-Trace-Context":{"schema":{"type":"string"}},"X-Country-Code":{"schema":{"type":"string"}},"Accept-Ranges":{"schema":{"type":"string"}},"Date":{"schema":{"type":"string"}},"X-Served-By":{"schema":{"type":"string"}},"X-Cache":{"schema":{"type":"string"}},"X-Cache-Hits":{"schema":{"type":"integer"}},"X-Timer":{"schema":{"type":"number"}},"Vary":{"schema":{"type":"string"}},"alt-svc":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## GET /rest\_api/v1/rewards/{customerRewardId}

> Get a reward details

```json
{"openapi":"3.0.0","info":{"title":"Joy Loyalty Program - API REST","version":"1.0.0"},"tags":[{"name":"Rewards"}],"servers":[{"url":"https://dev-api.joy.so"}],"paths":{"/rest_api/v1/rewards/{customerRewardId}":{"get":{"tags":["Rewards"],"summary":"Get a reward details","parameters":[{"name":"X-Joy-Loyalty-Secret-Key","in":"header","schema":{"type":"string"},"description":"App ID of your shop which retrieved from the Settings page"},{"name":"X-Joy-Loyalty-App-Key","in":"header","schema":{"type":"string"},"description":"Secret Key of your shop which retrieved from the Settings page"},{"name":"customerRewardId","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","headers":{"Connection":{"schema":{"type":"string"}},"Content-Length":{"schema":{"type":"integer"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Cache-Control":{"schema":{"type":"string"}},"Content-Type":{"schema":{"type":"string"}},"Function-Execution-Id":{"schema":{"type":"string"}},"Server":{"schema":{"type":"string"}},"Strict-Transport-Security":{"schema":{"type":"string"}},"X-Cloud-Trace-Context":{"schema":{"type":"string"}},"X-Country-Code":{"schema":{"type":"string"}},"Accept-Ranges":{"schema":{"type":"string"}},"Date":{"schema":{"type":"string"}},"X-Served-By":{"schema":{"type":"string"}},"X-Cache":{"schema":{"type":"string"}},"X-Cache-Hits":{"schema":{"type":"integer"}},"X-Timer":{"schema":{"type":"number"}},"Vary":{"schema":{"type":"string"}},"alt-svc":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## Refund coupon via Rest API

> Allows you to refund a coupon for a specific Shopify customer via Rest API.

```json
{"openapi":"3.0.0","info":{"title":"Joy Loyalty Program - API REST","version":"1.0.0"},"tags":[],"servers":[{"url":"https://dev-api.joy.so"}],"paths":{"/coupons/refund":{"post":{"tags":["Coupons"],"summary":"Refund coupon via Rest API","description":"Allows you to refund a coupon for a specific Shopify customer via Rest API.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"couponCode":{"type":"string"},"shopifyCustomerId":{"type":"integer"}}}}}},"parameters":[{"name":"X-Joy-Loyalty-App-Key","in":"header","schema":{"type":"string"},"description":"App ID of your shop which retrieved from the Settings page"},{"name":"X-Joy-Loyalty-Secret-Key","in":"header","schema":{"type":"string"},"description":"Secret Key of your shop which retrieved from the Settings page"}],"responses":{"200":{"description":"OK","headers":{"Connection":{"schema":{"type":"string"}},"Content-Length":{"schema":{"type":"integer"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Content-Type":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devdocs.joy.so/joy-rest-api-v1-deprecated/api-references/rewards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
