Shopify Create Discount Code
This action creates a new discount code under an existing Shopify price rule.
Inputs
| Name | Type | Description |
|---|---|---|
| Shopify Token | Credentials | A token with permissions to manage price rules and discount codes. |
| Shopify Domain | String | The store’s myshopify.com subdomain (e.g., your-store). |
| Price Rule ID | String | Identifier of the price rule in which to create the discount code. |
| Discount Code Name | String | The code value to assign to the new discount (e.g., WELCOME10). |
Outputs
| Name | Type | Description |
|---|---|---|
| Success? | Boolean | true if the discount code was successfully created. |
| Discount Code | Object | The newly created discount code object returned by Shopify. |
Notes
- Uses Shopify Admin REST API version
2025-04at/admin/api/2025-04/price_rules/{price_rule_id}/discount_codes.json. - Ensure the access token includes
write_price_rulesandwrite_discountsscopes.
Updated 4 months ago
