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