createPriceLists - Pricing Module Reference
BetaThis documentation provides a reference to the createPriceLists
method. This belongs to the Pricing Module.
This method is used to create price lists.
Example
import {
initialize as initializePricingModule,
} from "@medusajs/pricing"
async function createPriceList (items: {
title: string
description: string
starts_at?: string
ends_at?: string
}[]) {
const pricingService = await initializePricingModule()
const priceList = await pricingService.createPriceLists(items)
// do something with the price lists or return them
}
Parameters
The details of each price list to be created.
Returns
The created price lists.
Was this section helpful?