Shopify Create Discount Code

This action creates a new discount code under an existing Shopify price rule.


Inputs

NameTypeDescription
Shopify TokenCredentialsA token with permissions to manage price rules and discount codes.
Shopify DomainStringThe store’s myshopify.com subdomain (e.g., your-store).
Price Rule IDStringIdentifier of the price rule in which to create the discount code.
Discount Code NameStringThe code value to assign to the new discount (e.g., WELCOME10).

Outputs

NameTypeDescription
Success?Booleantrue if the discount code was successfully created.
Discount CodeObjectThe newly created discount code object returned by Shopify.

Notes

  • Uses Shopify Admin REST API version 2025-04 at /admin/api/2025-04/price_rules/{price_rule_id}/discount_codes.json.
  • Ensure the access token includes write_price_rules and write_discounts scopes.