Cancel coupon redemptions
curl --request POST \
--url https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '[
"<string>"
]'import requests
url = "https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem"
payload = ["<string>"]
headers = {
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'Content-Type': 'application/json'},
body: JSON.stringify(['<string>'])
};
fetch('https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem"
payload := strings.NewReader("[\n \"<string>\"\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("[\n \"<string>\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n \"<string>\"\n]"
response = http.request(request)
puts response.read_body{
"couponIds": [
"<string>"
]
}{
"name": "<string>",
"message": "<string>",
"details": null
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Cancel coupon redemptions
If any of the provided coupons or redemptions is not found, the error will be returned, but all found redemptions will be cancelled. The error will contain coupons that were not found.
Idempotency key is required, and should be the same as the one used during the initial redemption. It is not possible to cancel redemptions with different idempotency keys, send multiple requests instead.
POST
/
api
/
v1
/
customers
/
{customerId}
/
coupons
/
cancel-redeem
Cancel coupon redemptions
curl --request POST \
--url https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '[
"<string>"
]'import requests
url = "https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem"
payload = ["<string>"]
headers = {
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'Content-Type': 'application/json'},
body: JSON.stringify(['<string>'])
};
fetch('https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem"
payload := strings.NewReader("[\n \"<string>\"\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("[\n \"<string>\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/coupon/api/v1/customers/{customerId}/coupons/cancel-redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n \"<string>\"\n]"
response = http.request(request)
puts response.read_body{
"couponIds": [
"<string>"
]
}{
"name": "<string>",
"message": "<string>",
"details": null
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Headers
Identifier for request used to determine if it is a retry, or a new request
Path Parameters
Customer Id
Body
application/jsontext/jsonapplication/*+json
List of coupon ids to cancel redemptions
Response
OK
Ids of Coupons that were successfully processed
Last modified on August 10, 2026
⌘I