Shopify API: Create a Promotion?

老子叫甜甜 提交于 2019-11-29 03:52:27

Unfortunately they don't allow it... I resorted to creating an interface to do so, though:

https://github.com/MartinAmps/Shopify-Private-APIs

Hope it helps

Edit

I also created a blog post about it.

There is no way to create discounts via the API.

If you want we have made an application that can be used to create discount codes.

Otherwise you can use a tool like Mechanize to automate coupon creation for you, but keep in mind theres a good chance that any time in the future it will break since we don't make any promises to keep our admin the same in the future. Any changes have a good chance of breaking whatever script you'd end up writing.

The Price Rules API is now public and allow any app to create price rules and discount codes.

https://help.shopify.com/api/price-rules

If you're familiar with Rails or you're already using ActiveResource for your Shopify API calls, then you can drop in this modified version of Discount < ActiveResource::Base https://gist.github.com/choonkeat/09a56da222f506e627c5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!