hotmart_coupon_create
Creates a coupon for a Hotmart product. Specify product ID, coupon code, and discount fraction. Optionally set validity dates, affiliate ID, and applicable offer IDs.
Instructions
Create Coupon. Example: hotmart_coupon_create(product_id=12345).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product_id | Yes | Product ID | |
| code | Yes | Coupon code (máximo 25 caracteres) | |
| discount | Yes | Discount fraction (between 0 and 0.99 exclusive). **Fraction between 0 and 1** (NOT percent). Ex: `0.25` = 25% off. Pass `0.10` for 10%, NOT `10`. | |
| start_date | No | Validity start date. Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`. | |
| end_date | No | Data de fim de validade. Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`. | |
| affiliate | No | ID do afiliado | |
| offer_ids | No | IDs das ofertas aplicáveis. Pass a JSON array of integers, e.g. `[12345, 67890]`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |