Skip to main content
Update voucher metadata and settings. To modify the balance, use the redeem or refund endpoints.
Authorization
string
required
Bearer token with marketing:write scope
id
string
required
The voucher ID

Request body

All fields are optional. Only provided fields will be updated.
status
string
Voucher status: pending, active, depleted, expired, cancelled, suspended
customer_id
string
Customer ID (or null to unassign)
expires_at
string
ISO 8601 expiry datetime (or null to remove)
is_transferable
boolean
Whether voucher can be used by different customers
metadata
object
Custom metadata (or null to remove)

Response

Returns the updated voucher object.
Request
curl -X PATCH "https://api.voyantcloud.com/v1/vouchers/voucher_abc123" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "cust_456",
    "is_transferable": false
  }'
Response
{
  "data": {
    "id": "voucher_abc123",
    "code": "GC1A2B3C4D",
    "customerId": "cust_456",
    "isTransferable": false,
    "updatedAt": "2024-07-20T14:00:00Z"
  }
}

Errors

StatusErrorDescription
400No fields to updateRequest body is empty
404Voucher not foundNo voucher exists with the given ID