Create promotion
create_promotionCreate promotion codes with fixed or percentage discounts, set validity dates, usage limits, and restrict to specific products, price lists, or billing cycles.
Instructions
Create a promotion code. type: 1 = fixed amount (needs currency_id), 2 = percentage. Applies to all products unless restricted via "extra" (products, pricelists, billing_cycles).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The coupon code clients enter | |
| name | Yes | ||
| type | Yes | 1 = fixed amount, 2 = percentage | |
| extra | No | Additional raw fields (products, pricelists, …) | |
| amount | Yes | Discount amount (percent when type=2) | |
| to_date | Yes | End date YYYY-MM-DD | |
| brand_id | Yes | Brand UUID | |
| max_uses | No | 0 = unlimited (default) | |
| from_date | Yes | Start date YYYY-MM-DD | |
| currency_id | No | Required for fixed-amount promotions | |
| for_new_clients | No | Default true | |
| recurring_cycles | No | -1 unlimited, 0 first invoice only (default), N cycles | |
| max_uses_per_client | No | 0 = unlimited (default) | |
| for_existing_clients | No | Default true |