---
displayed_sidebar: pricingReference
badge:
variant: orange
text: Beta
slug: /references/pricing/createPriceRules
sidebar_label: createPriceRules
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# createPriceRules - Pricing Module Reference
This documentation provides a reference to the `createPriceRules` method. This belongs to the Pricing Module.
This method is used to create new price rules based on the provided data.
## Example
```ts
import {
initialize as initializePricingModule,
} from "@medusajs/pricing"
async function createPriceRules (
id: string,
priceSetId: string,
ruleTypeId: string,
value: string,
priceSetMoneyAmountId: string,
priceListId: string
) {
const pricingService = await initializePricingModule()
const priceRules = await pricingService.createPriceRules([
{
id,
price_set_id: priceSetId,
rule_type_id: ruleTypeId,
value,
price_set_money_amount_id: priceSetMoneyAmountId,
price_list_id: priceListId
}
])
// do something with the price rules or return them
}
```
## Parameters
## Returns