Skip to main content
Skip to main content

addPriceListPrices - Pricing Module Reference

Beta

This 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

dataAddPriceListPricesDTO[]Required
The prices to add for each price list.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<PriceListDTO[]>Required
The updated price lists.
Was this section helpful?