BizKitHub
DocsAPI ReferenceVoucher/bff/voucher/add
postVoucherAdmin BFF

/bff/voucher/add

Creates a new voucher with the specified parameters. The voucher code must be unique within the organisation and will be converted to uppercase.

VoucherpostBffVoucherAdd

Parameters

JSON body

Request body

application/json
codestringRequired

Unique voucher code (will be converted to uppercase).

ExampleSUMMER2024
typestringRequired

Discount type: fixed, percentage, free-credit, or free-product.

Examplepercentage
valuestringRequired

Discount value (e.g., "100" for fixed, "10" for 10% percentage).

Example10
usageLimitnumberOptional

Maximum number of uses. Omit for unlimited.

Example100
notestringOptional

Internal note for administrative purposes.

ExampleSummer campaign
activebooleanOptional

Whether voucher is active immediately (default: false).

isOrderSingletonbooleanOptional

Limit to one use per order (default: false).

validFromstringOptional

ISO date string for validity start.

Example2024-01-01T00:00:00Z
validTostringOptional

ISO date string for validity end.

Example2024-12-31T23:59:59Z
costnumber | nullOptional

Money the voucher cost when issued (organisation default currency). Use null to leave unset → resulting credits applied 1:1 to money. Use 0 to mark as gifted → resulting credits carry zero money value. Any positive number is the real cash equivalent of the voucher.

One of 2:
Variant 1
number
Variant 2
null

Response schema

1 status code documented

200SuccessCreated voucher confirmation.
codestringRequired

The created voucher code.

Response example

application/json
{
  "code": "example_code"
}

Request example

POST /bff/voucher/add

post
curl -X POST "https://api.bizkithub.com/bff/voucher/add" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "code": "SUMMER2024",
  "type": "percentage",
  "value": "10",
  "usageLimit": 100,
  "note": "Summer campaign",
  "active": false,
  "isOrderSingleton": false,
  "validFrom": "2024-01-01T00:00:00Z",
  "validTo": "2024-12-31T23:59:59Z",
  "cost": 0
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key