Skip to main content
PATCH
/
v1
/
admin
/
finance
/
vouchers
/
{id}
Update a voucher
curl --request PATCH \
  --url https://{operatorDomain}/v1/admin/finance/vouchers/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "vch_01HZX...",
  "code": "WELCOME50",
  "currency": "EUR",
  "valueCents": 5000,
  "status": "active",
  "remainingCents": 5000,
  "expiresAt": "2023-11-07T05:31:56Z"
}
'
{
  "data": {
    "id": "vch_01HZX...",
    "code": "WELCOME50",
    "currency": "EUR",
    "valueCents": 5000,
    "status": "active",
    "remainingCents": 5000,
    "expiresAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Staff session or API token issued by your Voyant app.

Path Parameters

id
string
required

Body

application/json
id
string
required
Example:

"vch_01HZX..."

code
string
required
Example:

"WELCOME50"

currency
string
required
Required string length: 3
Example:

"EUR"

valueCents
integer
required
Example:

5000

status
enum<string>
required
Available options:
active,
redeemed,
expired,
void
Example:

"active"

remainingCents
integer
Example:

5000

expiresAt
string<date-time> | null

Response

200 - application/json

Updated voucher

data
object