Create discount code
documentedCreate a discount code under a price rule.
POST /admin/api/2026-01/price_rules/{price_rule_id}/discount_codes.jsonDiscountsno implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
npx -y keychains@latest curl "https://{{SHOP_DOMAIN}}.myshopify.com/admin/api/2026-01/price_rules/{{$price_rule_id}}/discount_codes.json" \
-X POST \
-H "X-Shopify-Access-Token: {{OAUTH2_ACCESS_TOKEN}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"discount_code":{"code":"{{$code}}"}}'