Redeem coupons
curl --request POST \
--url https://{host}/coupon/v2/customers/{customerId}/coupons/redeem \
--header 'Content-Type: application/json' \
--data '
{
"storeId": "<string>",
"coupons": [
{
"couponId": "<string>",
"value": 123
}
],
"basketValue": 123
}
'import requests
url = "https://{host}/coupon/v2/customers/{customerId}/coupons/redeem"
payload = {
"storeId": "<string>",
"coupons": [
{
"couponId": "<string>",
"value": 123
}
],
"basketValue": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
storeId: '<string>',
coupons: [{couponId: '<string>', value: 123}],
basketValue: 123
})
};
fetch('https://{host}/coupon/v2/customers/{customerId}/coupons/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/v2/customers/{customerId}/coupons/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([
'storeId' => '<string>',
'coupons' => [
[
'couponId' => '<string>',
'value' => 123
]
],
'basketValue' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/v2/customers/{customerId}/coupons/redeem"
payload := strings.NewReader("{\n \"storeId\": \"<string>\",\n \"coupons\": [\n {\n \"couponId\": \"<string>\",\n \"value\": 123\n }\n ],\n \"basketValue\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v2/customers/{customerId}/coupons/redeem")
.header("Content-Type", "application/json")
.body("{\n \"storeId\": \"<string>\",\n \"coupons\": [\n {\n \"couponId\": \"<string>\",\n \"value\": 123\n }\n ],\n \"basketValue\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/coupon/v2/customers/{customerId}/coupons/redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"storeId\": \"<string>\",\n \"coupons\": [\n {\n \"couponId\": \"<string>\",\n \"value\": 123\n }\n ],\n \"basketValue\": 123\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>"
}Redeem coupons
If any of the provided coupons is not found, the error will be returned, but existing coupons will still be redeemed. The error will contain coupons that were not found.
Purchase Id is recommended as idempotency key, and required if async redemption flow is used (using Purchase Load).
POST
/
v2
/
customers
/
{customerId}
/
coupons
/
redeem
Redeem coupons
curl --request POST \
--url https://{host}/coupon/v2/customers/{customerId}/coupons/redeem \
--header 'Content-Type: application/json' \
--data '
{
"storeId": "<string>",
"coupons": [
{
"couponId": "<string>",
"value": 123
}
],
"basketValue": 123
}
'import requests
url = "https://{host}/coupon/v2/customers/{customerId}/coupons/redeem"
payload = {
"storeId": "<string>",
"coupons": [
{
"couponId": "<string>",
"value": 123
}
],
"basketValue": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
storeId: '<string>',
coupons: [{couponId: '<string>', value: 123}],
basketValue: 123
})
};
fetch('https://{host}/coupon/v2/customers/{customerId}/coupons/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/v2/customers/{customerId}/coupons/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([
'storeId' => '<string>',
'coupons' => [
[
'couponId' => '<string>',
'value' => 123
]
],
'basketValue' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/v2/customers/{customerId}/coupons/redeem"
payload := strings.NewReader("{\n \"storeId\": \"<string>\",\n \"coupons\": [\n {\n \"couponId\": \"<string>\",\n \"value\": 123\n }\n ],\n \"basketValue\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v2/customers/{customerId}/coupons/redeem")
.header("Content-Type", "application/json")
.body("{\n \"storeId\": \"<string>\",\n \"coupons\": [\n {\n \"couponId\": \"<string>\",\n \"value\": 123\n }\n ],\n \"basketValue\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/coupon/v2/customers/{customerId}/coupons/redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"storeId\": \"<string>\",\n \"coupons\": [\n {\n \"couponId\": \"<string>\",\n \"value\": 123\n }\n ],\n \"basketValue\": 123\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 coupons redeem
Response
OK
Ids of Coupons that were successfully processed
Last modified on August 10, 2026
⌘I