BizKitHub
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

JSON body

Request body

application/json
codestringRequired

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

ExampleSUMMER2024
typestringOptional

New discount type.

Examplepercentage
valuestringOptional

New discount value.

Example15
usageLimitnumber | nullOptional

New usage limit. Set to null to remove limit.

One of 2:
Variant 1
number
Variant 2
null
notestringOptional

New internal note.

activebooleanOptional

New active status.

isOrderSingletonbooleanOptional

New singleton flag.

hasValidityPeriodbooleanOptional

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

validFromstring | nullOptional

New validity start. Set to null to remove.

One of 2:
Variant 1
string
Variant 2
null
validTostring | nullOptional

New validity end. Set to null to remove.

One of 2:
Variant 1
string
Variant 2
null
costnumber | nullOptional

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

One of 2:
Variant 1
number
Variant 2
null

Response schema

1 status code documented

200SuccessUpdate result.
successbooleanRequired

Whether the update was successful.

codestringRequired

The updated voucher code.

Response example

application/json
{
  "success": false,
  "code": "example_code"
}

Request example

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
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key