Issue voucher
POST /v1/public/vouchers
Issues one customer voucher from an active merchant voucher template. This operation requires an idempotency key.
Authorization
X-API-Key required with the vouchers:issue scope
Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | Yes | A unique key for this logical write operation. Keys are retained for 24 hours. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
voucherTemplateId | string | Yes | Active merchant voucher-template ID. |
customerId | string | No | Existing customer ID. Supply this or recipientEmail. |
recipientEmail | string (email) | No | Recipient email. Supply this or customerId. |
recipientName | string | No | |
value | number | No | Required for a monetary-value template; ignored for a fixed-value template. |
send | boolean | No | Attempt to email the voucher immediately. |
externalReference | string | No | Your reference for this issuance. |
Request example
curl -X POST "https://api.remyrewards.co.uk/v1/public/vouchers" \
-H "Accept: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Idempotency-Key: order-1042-redeem-1" \
-H "Content-Type: application/json" \
--data '{
"voucherTemplateId": "66c735e253f2836fbe941111",
"recipientEmail": "alex@example.com",
"recipientName": "Alex Morgan",
"send": true,
"externalReference": "CRM-ISSUE-1042"
}'Responses
| Status | Description |
|---|---|
201 | Voucher issued. |
400 | The request is missing a required value or contains invalid data. |
401 | The API key is missing or invalid. |
403 | The API key is valid but does not have the required scope. |
404 | The requested integration resource was not found. |
409 | The idempotency key is already processing or was used for a different request. |
429 | A rate or concurrency limit was exceeded. |