create_promo_code
Add a unique promotional code to an existing rule, enabling customers to apply discounts at checkout.
Instructions
Create a redeemable code under an existing promo rule.
Customers type the code string at checkout to apply the rule's discount. Code matching
is case-insensitive on the Mailchimp side. Use list_promo_codes to discover existing codes
before creating duplicates.
Authenticated via API key. Max 10 concurrent requests. Respects read-only and dry-run modes. Returns 400 if promo_rule_id does not exist; returns 409 if promo_code_id already exists.
Args: store_id: E-commerce store ID. promo_rule_id: Rule ID to attach the code to. Obtain from list_promo_rules. promo_code_id: Client-supplied unique ID for the code. code: The actual code string customers type at checkout (e.g. 'SUMMER20'). redemption_url: URL where the code can be applied (your checkout page). enabled: Whether the code is active. Default true.
Returns: JSON with id, code, redemption_url, usage_count (0 at creation), enabled, created_at.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| store_id | Yes | ||
| promo_rule_id | Yes | ||
| promo_code_id | Yes | ||
| code | Yes | ||
| redemption_url | Yes | ||
| enabled | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |