addPriceListPrices - Pricing Module Reference
BetaThis documentation provides a reference to the addPriceListPrices
method. This belongs to the Pricing Module.
This method is used to add prices to price lists.
Example
import {
initialize as initializePricingModule,
} from "@medusajs/pricing"
async function addPriceListPrices (items: {
priceListId: string,
prices: {
currency_code: string,
amount: number,
price_set_id: string
}[]
}[]) {
const pricingService = await initializePricingModule()
const priceLists = await pricingService.addPriceListPrices(items)
// do something with the price lists or return them
}
Parameters
The prices to add for each price list.
sharedContext
ContextA context used to share resources, such as transaction manager, between the application and the module.
sharedContext
ContextReturns
The updated price lists.
Was this section helpful?