DocsAPI ReferenceVoucher/bff/voucher/update
postVoucherAdmin BFF

/bff/voucher/update

Updates an existing voucher. Only provided fields will be updated; omitted fields remain unchanged. Use null to explicitly remove optional values.

VoucherpostBffVoucherUpdate

Parameters

11 body

11 total
Body · 11
codestringRequired

Voucher code to update (identifier, cannot be changed).

typestring

New discount type.

valuestring

New discount value.

usageLimitnumber | null

New usage limit. Set to null to remove limit.

notestring

New internal note.

activeboolean

New active status.

isOrderSingletonboolean

New singleton flag.

hasValidityPeriodboolean

UI-only flag from the admin form: when false, validFrom/validTo are cleared regardless of their values.

validFromstring | null

New validity start. Set to null to remove.

validTostring | null

New validity end. Set to null to remove.

costnumber | null

New voucher cost (organisation default currency). null = ratio unknown (1:1 fallback on next credit application); 0 = explicitly gifted; positive number = real money equivalent.

Request

POST /bff/voucher/update

post
curl -X POST "https://api.bizkithub.com/bff/voucher/update" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "code": "SUMMER2024",
  "type": "percentage",
  "value": "15",
  "note": "example_note",
  "active": false,
  "isOrderSingleton": false,
  "hasValidityPeriod": false
}'

Response

Update result.

{
  "success": false,
  "code": "example_code"
}

All response codes

1 status code documented

Need an API key?

All BizKitHub API endpoints require authentication via API key.

Get API Key