BizKitHub
DocsAPI ReferenceVoucher/bff/voucher/bulk-create
postVoucherAdmin BFF

/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.

VoucherpostBffVoucherBulk-create

Parameters

JSON body

Request body

application/json
countnumberRequired

Number of voucher codes to generate in this batch (1–1000).

Range: 11000
Examples10100
generationMode"random" | "pattern"Required

"random" = length + charset + optional prefix/suffix; "pattern" = template with # / 9 / A.

Examplerandom
generationCharsetstringRequired

Character set: alphanumeric, alpha, numeric, or unambiguous (no O/0/I/1/L).

Examplealphanumeric
generationLengthnumberOptional

Length of the random portion when generationMode = random (4–32).

Range: 432
Examples812
generationPrefixstringOptional

Literal prefix prepended to every generated code (uppercased). Random mode only.

ExampleXMAS-
generationSuffixstringOptional

Literal suffix appended to every generated code (uppercased). Random mode only.

generationPatternstringOptional

Template with placeholders: # / * = any char from charset, 9 = digit, A = letter. Other characters are literals. Pattern mode only.

ExamplesXMAS-####GIFT-AA-9999
typestringRequired

Discount type applied to every generated voucher.

Examplefixed
valuestringRequired

Discount value applied to every generated voucher.

Example100
usageLimitnumberOptional

Maximum number of uses per voucher. Omit for unlimited.

Example1
notestringOptional

Internal note shared across the whole batch (useful for filtering later).

ExampleVánoční kampaň 2026
activebooleanOptional

Whether the vouchers are active immediately.

isOrderSingletonbooleanOptional

Limit each voucher to one use per order.

validFromstringOptional

ISO date string for validity start.

validTostringOptional

ISO date string for validity end.

costnumber | nullOptional

Money 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.

One of 2:
Variant 1
number
Variant 2
null

Response schema

1 status code documented

200SuccessBulk-create result.
codesstring[]Required

Generated voucher codes, in insertion order.

Response example

application/json
{
  "codes": [
    "string"
  ]
}

Request example

POST /bff/voucher/bulk-create

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

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key