In Shopify, if you want to use Postman to create a Discount, firstly you need to create a Price rule. The price rule will allow you to know what value of the discount, when and how you can apply it to customers.
Price rules have 2 ingredients: Entitlements and prerequisites. You can understand as follows:
- Entitlements are the precise resources to which a discount applies, such as goods, variations, or collections.
- Prerequisites are the conditions that must be satisfied in order for the discount to apply to the resources that are eligible.
Example: Free Shipping for all customers buying over $50.
Now, I will show you how to create a price rule that gives the buyer $10 for an order.
Step 1: Generate API credentials from the Shopify admin
- Log in to your Shopify admin
- Go to Apps – Manage private apps

- Click Create a new private app
- In the App details section, enter a name for your app, and an emergency developer email
- In the Admin API section, select the areas of your store that you want the app to access

- Click Save
The Admin API section displays the app’s API key and password when you save the app’s details.
Step 2: Create A Price Rule Using Postman In Shopify
- Log in to your Postman and create a new workspace
- Create a new POST with this URL:
https://{username}:{password}@{shop}.myshopify.com/admin/api/{api-version}/{resource}.json
Code language: JavaScript (javascript)
- {username} – The API key that you generated.
- {password} – The API password that you generated.
- {shop} – The name of your development store.
- {api-version} – The supported API version that you want to use.
- {resource} – A resource endpoint from the REST Admin API.
Or you can copy this example in the Shopify Admin, remember change {resource} to {price_rules}:
https://33a72f01e02987636e1c1a9a4e95c840:[email protected]/admin/api/2021-10/price_rules.json
Code language: JavaScript (javascript)

- Paste the URL above.

In the body section, enter this code, then click Send.
{
"price_rule": {
"title": "SUMMERSALE10OFF",
"target_type": "line_item",
"target_selection": "all",
"allocation_method": "across",
"value_type": "fixed_amount",
"value": "-10.0",
"customer_selection": "all",
"starts_at": "2021-12-10T13:00:10Z"
}
}
Code language: JSON / JSON with Comments (json)
Explain of parameters in the payload:
- {Target_type} – There are 2 types: line_item and shipping_line
- {Target_selection} – There are 2 selections: all and entitled
- {allocation_method} – There are 2 methods (Each method: The discount is applied to each of the entitled items. Cross method: The calculated discount amount will be applied across the entitled items)
- {value_type} – It can be a percentage, a fixed amount, or free shipping
- {value} – The number of the discount value
- {customer_selection} – There are 2 selections: All and Prerequisite
- {starts_at} – The date and time when the price rule was created.
Response:
The API will return all information about the created price rule.

I have shown you all steps to create a price rule with Shopify API using Postman. If you have any questions please leave a comment below or refer to our Devdocs.
If you still do not understand the tutorial’s content, you can watch the video below for a more overview.
Hopefully, you can do it!