Reverse a redemption
POST /redemptions/{redemption_id}/reverse| Scope | redemptions:write |
| Customer session token | Not accepted: call from your server with an API key |
| Rate limit class | write_shopify (limits) |
| Idempotency key | Required (idempotency) |
| MCP tool | charm_reverse_redemption |
Deactivates the discount code and returns the points to the customer.
Parameters
Section titled “Parameters”| Name | In | Type | Description |
|---|---|---|---|
redemption_id | path | string | The id returned when the redemption was created. |
Response 200
Section titled “Response 200”Returns RedemptionReversal.
| Field | Type | Description |
|---|---|---|
changed | true | |
id | string | |
reversed | true | |
points_returned | number | |
balance_after | number or null | (nullable) |
{ "changed": true, "id": "id", "reversed": true, "points_returned": 120, "balance_after": 120}Example
Section titled “Example”curl -X POST "https://charm.appfleece.app/api/v1/redemptions/<redemption_id>/reverse" \ -H "Authorization: Bearer chrm_live_..." \ -H "Idempotency-Key: $(uuidgen)"Errors
Section titled “Errors”unauthorized · invalid_token · insufficient_scope · access_required · not_found · validation_error · rate_limited · idempotency_conflict · shopify_unavailable · insufficient_points
Every error body carries code, message, request_id and a doc_url pointing at the matching entry in the error catalog.