I looked into this today, and from what it seems don't hold your breath on this coming any time soon. I've compiled a list of hacks to provide this functionality and a full list of all the threads I could find which are related.
Below is from the current Shopify CTO regarding the discount API request in 2008.
Our API is just being finished up, but it should support this type of behavior when launched.
Cody - Current Shopify CTO - 2008.
Reference:
https://ecommerce.shopify.com/c/shopify-discussion/t/api-for-creating-discounts-18929
Someone else asked 9 days ago.
Heyo! I don't know of any immediate plans on the horizon, but I'm curious as to what it would help you do (what kind of discounts would you want access to via API?).
Dylan Blanchard - Shopify Employee - 9 days ago
Reference:
https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/discount-api-196067
For developers not looking to wait, I've found two examples although have not tested them.
Full Explanation on how they work:
http://ma.rtin.so/reverse-engineering-shopify-private-apis
PHP Example:
https://github.com/MartinAmps/Shopify-Private-APIs
Python Example:
https://ecommerce.shopify.com/c/shopify-discussion/t/creating-discount-code-via-python-43899
Currently Open Threads (give them your +1):
- https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/auto-generate-discount-codes-for-mailchimp-autoresponder-187667
- https://ecommerce.shopify.com/c/shopify-discussion/t/once-per-customer-discount-codes-still-not-available-143367
- https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/discount-api-196067
- https://ecommerce.shopify.com/c/shopify-apps/t/generating-coupon-codes-from-within-app-206067
- https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/discounts-185485
Old closed threads people asking for this:
- https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/question-discounts-api-156467
- https://ecommerce.shopify.com/c/shopify-apps/t/discounts-api-35797
- https://ecommerce.shopify.com/c/shopify-discussion/t/api-for-creating-discounts-18929
- https://ecommerce.shopify.com/c/shopify-job-board/t/looking-for-developer-experienced-with-shopify-api-45408
- https://ecommerce.shopify.com/c/shopify-discussion/t/creating-discount-code-via-python-43899
- https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/user-specific-discounted-products-via-shopify-api-135901
- https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/promotion-code-and-rewards-via-the-api-132278
- https://ecommerce.shopify.com/c/shopify-apps/t/is-there-an-api-for-coupon-codes-47500