Create a discount code
create_discount_codeCreate a discount code for a partner and associate it with a referral link; the partner's group must already have a discount and each link supports one code.
Instructions
Create a discount code for a partner. The partner's group must already have a discount assigned to it, and the discount code must be associated with a link that is not already linked with another discount code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | The discount code to create. If omitted, a unique code will be generated automatically from the partner's name. Stripe and Shopify codes can only contain letters, numbers, dashes, and underscores. Custom provider codes can contain any characters. | |
| linkId | No | The ID of the partner's referral link to associate this discount code with. Each link can only have one discount code. | |
| account | No | Exact configured private workspace profile label; not a tenant or provider account ID. | |
| confirm | No | Must be true for the requested mutation or exclusive private output file. | |
| payload | No | Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file. | |
| partnerId | No | The ID of the partner to create a discount code for. | |
| payload_file | No | Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. |