Hey to create a promotion with the Shopify API, you use the Discounts API. First, authenticate and get the necessary permissions. Then, create a discount rule by making a POST request to /admin/api/2024-01/price_rules.json
, where you can define the promotion’s conditions (e.g., percentage discount, minimum purchase, or free shipping). After that, link a discount code to the rule by making a POST request to /admin/api/2024-01/discount_codes.json
. Shopify also offers an easy-to-use admin panel for creating promotions without needing to use the API directly.