# Redeeming programs

## Get redeeming program list

> The list of redeeming program<br>

```json
{"openapi":"3.0.0","info":{"title":"Joy Loyalty Program - API REST","version":"1.0.0"},"tags":[{"name":"Redeeming programs"}],"servers":[{"url":"https://dev-api.joy.so"}],"paths":{"/rest_api/v1/spending":{"get":{"tags":["Redeeming programs"],"summary":"Get redeeming program list","description":"The list of redeeming program\n","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"}},"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":"string"}},"Vary":{"schema":{"type":"string"}},"alt-svc":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enableRefundPointRedeem":{"type":"boolean"},"redeemed":{"type":"integer"},"prefix":{"type":"string"},"isLimitIntervalCustomer":{"type":"boolean"},"combinedWith":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"title":{"type":"string"},"specificProductIds":{"type":"array","items":{"type":"number"}},"limitIntervalCustomer":{"type":"number"},"appliedDiscountToSaleChannel":{"type":"string"},"variantId":{"type":"string","nullable":true},"shopId":{"type":"string"},"event":{"type":"string"},"redeemIn":{"type":"string"},"spendPoint":{"type":"number"},"limitRedeem":{"type":"string"},"showLoyaltyPage":{"type":"boolean"},"isUsePrefixDiscountCode":{"type":"boolean"},"userAvailability":{"type":"string"},"totalLimitationRedeem":{"type":"number"},"earnAmount":{"type":"number"},"priority":{"type":"number"},"appliedCollectionIds":{"type":"array","items":{"type":"number"}},"variantIds":{"type":"array","items":{"type":"integer"}},"redeemType":{"type":"string"},"appliedTo":{"type":"string"},"specificProducts":{"type":"array","items":{"type":"object","properties":{"image":{"type":"object"},"images":{"type":"array"},"options":{"type":"array"},"handle":{"type":"string"},"id":{"type":"number"},"variants":{"type":"array"},"title":{"type":"string"}}}},"createdAt":{"type":"string","format":"date-time"},"expired":{"type":"boolean"},"isDraft":{"type":"boolean"},"giftStatus":{"type":"string"},"status":{"type":"boolean"},"listShopifyIdDiscount":{"type":"array","items":{"type":"string"}},"translateTitle":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"friendSpecificProducts":{"type":"array","items":{"type":"object"}},"customerSpecificProductIds":{"type":"array","items":{"type":"number"}},"customerSpecificProducts":{"type":"array","items":{"type":"object"}},"friendSpecificProductIds":{"type":"array","items":{"type":"number"}}}}}}}}}}}}}}}
```

## Get a redeeming program

> Get a specific redeeming program by its ID.<br>

```json
{"openapi":"3.0.0","info":{"title":"Joy Loyalty Program - API REST","version":"1.0.0"},"tags":[{"name":"Redeeming programs"}],"servers":[{"url":"https://dev-api.joy.so"}],"paths":{"/rest_api/v1/spending/{spendingProgramId}":{"get":{"tags":["Redeeming programs"],"summary":"Get a redeeming program","description":"Get a specific redeeming program by its ID.\n","parameters":[{"name":"X-Joy-Loyalty-App-Key","in":"header","schema":{"type":"string"}},{"name":"X-Joy-Loyalty-Secret-Key","in":"header","schema":{"type":"string"}},{"name":"spendingProgramId","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","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"enableRefundPointRedeem":{"type":"boolean"},"redeemed":{"type":"number"},"prefix":{"type":"string"},"isLimitIntervalCustomer":{"type":"boolean"},"combinedWith":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"title":{"type":"string"},"specificProductIds":{"type":"array","items":{"type":"number"}},"limitIntervalCustomer":{"type":"number"},"appliedDiscountToSaleChannel":{"type":"string"},"variantId":{"type":"string","nullable":true},"shopId":{"type":"string"},"event":{"type":"string"},"redeemIn":{"type":"string"},"spendPoint":{"type":"number"},"limitRedeem":{"type":"string"},"showLoyaltyPage":{"type":"boolean"},"isUsePrefixDiscountCode":{"type":"boolean"},"userAvailability":{"type":"string"},"totalLimitationRedeem":{"type":"number"},"earnAmount":{"type":"number"},"priority":{"type":"number"},"appliedCollectionIds":{"type":"array","items":{"type":"number"}},"variantIds":{"type":"array","items":{"type":"number"}},"redeemType":{"type":"string"},"appliedTo":{"type":"string"},"specificProducts":{"type":"array","items":{"type":"object","properties":{"image":{"type":"object"},"images":{"type":"array"},"options":{"type":"array"},"handle":{"type":"string"},"id":{"type":"number"},"variants":{"type":"array"},"title":{"type":"string"}}}},"createdAt":{"type":"string","format":"date-time"},"expired":{"type":"boolean"},"isDraft":{"type":"boolean"},"giftStatus":{"type":"string"},"status":{"type":"boolean"},"listShopifyIdDiscount":{"type":"array","items":{"type":"string"}},"translateTitle":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"friendSpecificProducts":{"type":"array","items":{"type":"object"}},"customerSpecificProductIds":{"type":"array","items":{"type":"number"}},"customerSpecificProducts":{"type":"array","items":{"type":"object"}},"friendSpecificProductIds":{"type":"array","items":{"type":"number"}}}}}}}}}}}}}}
```

## Redeem loyalty points

> Redeem customer loyalty points for discounts or rewards.

```json
{"openapi":"3.0.0","info":{"title":"Joy Loyalty Program - API REST","version":"1.0.0"},"tags":[{"name":"Redeeming programs"}],"servers":[{"url":"https://dev-api.joy.so"}],"paths":{"/rest_api/v1/redeem":{"post":{"tags":["Redeeming programs"],"summary":"Redeem loyalty points","description":"Redeem customer loyalty points for discounts or rewards.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","description":"The unique ID of the customer"},"programId":{"type":"string","description":"The ID of the loyalty program"},"locale":{"type":"string","description":"The locale of the customer"},"redeemPoint":{"type":"number","description":"Number of points the customer wants to redeem"},"shopifyCustomerId":{"type":"number","description":"The Shopify customer ID"},"source":{"type":"string","description":"The source of the redemption request"}}}}}},"parameters":[{"name":"X-Joy-Loyalty-App-Key","in":"header","schema":{"type":"string"},"description":"App ID of your shop which is retrieved from the Settings page"},{"name":"X-Joy-Loyalty-Secret-Key","in":"header","schema":{"type":"string"},"description":"Secret Key of your shop which is 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"}},"Cache-Control":{"schema":{"type":"string"}},"Content-Type":{"schema":{"type":"string"}},"Date":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"customer":{"type":"object","properties":{"id":{"type":"string"},"shopifyCustomerId":{"type":"number"},"totalSpent":{"type":"number"},"name":{"type":"string"},"state":{"type":"string"},"shopId":{"type":"string"},"type":{"type":"string"},"acceptsMarketing":{"type":"boolean"},"email":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"hasPoint":{"type":"boolean"},"urlReferral":{"type":"string"},"latestActivity":{"type":"string","format":"date-time"},"point":{"type":"number"},"updatedAt":{"type":"string","format":"date-time"},"appliedCollectionIds":{"type":"array","items":{"type":"number"}}}},"discount":{"type":"object","properties":{"id":{"type":"number"},"price_rule_id":{"type":"number"},"code":{"type":"string"},"usage_count":{"type":"number"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}}}}}}}}
```


---

# 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/redeeming-programs.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.
