/bff/voucher/bulk-create
Generates a batch of unique voucher codes in a single transaction. Two generation modes: "random" (length + charset + optional prefix/suffix) and "pattern" (template with # / 9 / A placeholders). All vouchers share the same type, value, validity, usage limit and note. Returns the list of generated codes.
Parameters
16 body
countnumberRequiredNumber of voucher codes to generate in this batch (1–1000).
generationModestring | stringRequired"random" = length + charset + optional prefix/suffix; "pattern" = template with # / 9 / A.
generationCharsetstringRequiredCharacter set: alphanumeric, alpha, numeric, or unambiguous (no O/0/I/1/L).
generationLengthnumberLength of the random portion when generationMode = random (4–32).
generationPrefixstringLiteral prefix prepended to every generated code (uppercased). Random mode only.
generationSuffixstringLiteral suffix appended to every generated code (uppercased). Random mode only.
generationPatternstringTemplate with placeholders: # / * = any char from charset, 9 = digit, A = letter. Other characters are literals. Pattern mode only.
typestringRequiredDiscount type applied to every generated voucher.
valuestringRequiredDiscount value applied to every generated voucher.
usageLimitnumberMaximum number of uses per voucher. Omit for unlimited.
notestringInternal note shared across the whole batch (useful for filtering later).
activebooleanWhether the vouchers are active immediately.
isOrderSingletonbooleanLimit each voucher to one use per order.
validFromstringISO date string for validity start.
validTostringISO date string for validity end.
costnumber | nullMoney the voucher cost when issued (organisation default currency). null = unknown ratio, 0 = explicitly gifted, positive number = real cash equivalent. Applied to every voucher in the batch.
Request
POST /bff/voucher/bulk-create
curl -X POST "https://api.bizkithub.com/bff/voucher/bulk-create" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"count": 10,
"generationMode": "random",
"generationCharset": "alphanumeric",
"generationLength": 8,
"generationPrefix": "XMAS-",
"generationSuffix": "example_generationSuffix",
"generationPattern": "XMAS-####",
"type": "fixed",
"value": "100",
"usageLimit": 1,
"note": "Vánoční kampaň 2026",
"active": false,
"isOrderSingleton": false,
"validFrom": "example_validFrom",
"validTo": "example_validTo"
}'Response
Bulk-create result.
{
"codes": [
"string"
]
}All response codes
1 status code documented
Need an API key?
All BizKitHub API endpoints require authentication via API key.