Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Automatic discount through Rest API

Automatic discount through Rest API

Cauliflower
Shopify Partner
4 0 0

I'm trying to make an automatic discount using shopify-api-node, but when I create one it ends up being a discount using the shopify discount code method. It also appears in the api/2023-07/price_rules.json endpoint.

But I'd like it to be an automatic discount, so the customers don't have to do an extra step using a code to get the discounts. As I see, automatic discounts I created manually through the dashboard, don't even appear in the api/2023-07/price_rules.json endpoint.

Is it just not possible to create and access automatic discounts through the API?

Reply 1 (1)

Liam
Community Manager
3108 344 910

Hi Cauliflower,

 

Have you explored using Order Discount Function API to achieve automatic discount without requiring customers to manually enter a code? I believe this should be possible as a function - although this would be using GraphQL rather than REST. 

 

Hope this helps,

 

 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog