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

16 body

16 total
Body · 16
countnumberRequired

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

Range: 11000
generationModestring | stringRequired

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

generationCharsetstringRequired

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

generationLengthnumber

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

Range: 432
generationPrefixstring

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

generationSuffixstring

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

generationPatternstring

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

typestringRequired

Discount type applied to every generated voucher.

valuestringRequired

Discount value applied to every generated voucher.

usageLimitnumber

Maximum number of uses per voucher. Omit for unlimited.

notestring

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

activeboolean

Whether the vouchers are active immediately.

isOrderSingletonboolean

Limit each voucher to one use per order.

validFromstring

ISO date string for validity start.

validTostring

ISO date string for validity end.

costnumber | null

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.

Request

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

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.

Get API Key