Shopify create discount code API tutorial (2026): build a real discounts manager inside your Shopify app with the GraphQL Admin API 2026-10 - create discount codes and automatic discounts (percentage off, buy X get Y, free shipping), list them, edit, deactivate and delete them, on a real development store. Shopify app development series, episode 6 - everything shown is real, nothing skipped.
What you'll learn
discountNodes: one list for codes AND automatic discounts (+ search: method, status)
discountCodeBasicCreate, discountCodeBxgyCreate, discountAutomaticFreeShippingCreate
Why context is now required ("Context can't be blank")
Why 20% is 0.2 (VALUE_OUTSIDE_RANGE)
Unique codes, edit, deactivate/activate, delete
Polaris web components
💻 Free source code for this episode: https://github.com/fayyaz315/shopify-app-development-2026/tree/ep06
3 quick fixes from this episode
Shopify Discount API: Why 20% Off Fails (Send 0.2)
Shopify discount API (GraphQL 2026-10): when you create a discount code, the…