The Price Rules API

Posted on

Why the price rules API can help your business with sales, discounts and special pricing features

For most of the entrepreneurs we’ve met, a significant part of a good marketing plan includes some form of discount or sale. As you learned in Business Intro, giving a discount can incentivise people to try something new (your company), shop at a particular time or buy something specific. As you try to manage your inventory, introduce new collections or expand your reach into new audiences, the ability to be flexible with your pricing and offer different kinds of incentives is essential.

How essential? Well, last year, merchants with an active discount code were eight times more likely to make a sale. Plus, one in five sales made online involved a discount code.

What are the Rules?

Shopify has revamped what used to be the Discounts API and made the new Price Rules API, available to all Shopify store owners, that let you create basically any kind of flexible pricing. From your Shopify Admin, you can create a new discount with the following features:

  • Fixed percentage discount
  • Fixed dollar amount discount
  • Free shipping
  • Discount code creation

One of the great things about the Price Rules API is that you can set multiple conditions, so you can make discount offers only applicable with certain time periods, type of customer, number of uses, minimum spend, or location. That means you won’t be wasting a discount on people aren’t part of your strategy or who you can’t afford. You can create, edit and delete discounts using your merchant Dashboard on Shopify, and you can also generate reports that show how effective your discounts are.

What’s the difference between a price rule and a discount code?

Price rules are sets of conditions, while a discount code is a string of letters that activate those conditions. So, you can set a discount code, like SWEETASDISCOUNT5, that your customers enter. But, by setting price rules, that code will only be available if they, say, spend over $50 or purchase from a particular collection. The Price Rules API is an upgrade from previous versions like the Discounts API, because you can set more specific rules.

Types of special pricing

Discounts and Sale Codes

Gain new customers

Especially if you’re a new brand, getting new customers often takes intro offers. Use the new price rules to create introductory pricing or discounts to get people to try out your products and services. You can also use them as an incentive to generate leads and get contact information by requiring someone submit their email address in order to get a discount code.

Target specific groups

Make special discount codes that you use in conjunction with your audience targeting, like a discount code for people looking at your Instagram Stories, segmented lists from MailChimp, or new partnerships with organisations you work with.

Pack it up

You can use the Price Rules API to give discounts on flexible collections of products, so you can make holiday packages or intro packs.


The Price Rules API let you set a minimum spend to get a discount if you want. This is a great way to encourage your customers to add something extra to their cart and increase their overall order value.

Wholesale and B2B

The Price Rules API lets you set special rates for certain groups of people - if you want to expand your business into wholesale or selling to other businesses rather than consumers, you can set any kind of discount you want. Check out more you can do with wholesaling and Shopify Plus here.

Loyalty Programmes

We know that getting your customers to come back is a better investment than always searching for new ones. They spend more over the long term, and become your best referrals. How? Loyalty programmes, which give customers rewards for coming back, are one of the better ways to

Give me something else

If you’re not super enthused about the idea of giving discounts, like if you’re already running a very low margin business, consider a couple other tactics.

Subscription models

Subscription pricing means someone signs up for a month/quarter/year at a lower rate than buying outright, but is likely going to buy more over time. Find out why subscription models are so effective here and how to do it here.

Instalment plans

You can offer your customer the option to pay for something big in smaller chunks over time. There are lots of services these days that let you set up instalment plans or lines of credit with basically no risk to you. Check out how to offer instalment plans here and a more in-depth look at credit services here.

Ready to play by the rules?

Elkfox is a Shopify Expert and web developer. We can help you set up a marketing strategy and tactical price rules that help it succeed. Talk to us about using the Shopify Price Rules API with your business.