POST
/api/v2/admin/vouchers/rulesPOST /api/v2/admin/vouchers/rules
Authentication
Send your API key in the x-api-key header on every request.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| companyId (query) | unknown | No | |
| Idempotency-Key (header) | string | No |
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | |
| TriggerType | string | Yes | |
| CampaignMode | string | Yes | |
| VoucherGroupId | string (uuid) | No | |
| SharedVoucherId | string (uuid) | No | |
| ThresholdAmount | unknown | No | |
| ThresholdCurrency | string | No | |
| MaximumAssignments | unknown | No | |
| MaximumAssignedValue | unknown | No | |
| ValidFrom | string (date-time) | No | |
| ValidUntil | string (date-time) | No | |
| Criteria | unknown | No | |
| VoucherTemplate | unknown | No |
Responses
200 — OK
| Field | Type | Required | Description |
|---|---|---|---|
| Id | string (uuid) | Yes | |
| Name | string | Yes | |
| TriggerType | string | Yes | |
| CampaignMode | string | Yes | |
| Enabled | boolean | Yes | |
| AssignmentCount | unknown | Yes | |
| AssignedValue | unknown | Yes |
Example request
curl -X POST "https://{base_url}/api/v2/admin/vouchers/rules" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"Name":"…","TriggerType":"…","CampaignMode":"…"}'This page is generated from the live OpenAPI specification and always matches the current API.