Skip to main content
Skip to main content

updatePriceLists - Pricing Module Reference

Beta

This documentation provides a reference to the updatePriceLists method. This belongs to the Pricing Module.

This method is used to update price lists.

Example

import {
initialize as initializePricingModule,
} from "@medusajs/pricing"

async function updatePriceLists (items: {
id: string
title: string
description: string
starts_at?: string
ends_at?: string
}[]) {
const pricingService = await initializePricingModule()

const priceList = await pricingService.updatePriceLists(items)

// do something with the price lists or return them
}

Parameters

dataUpdatePriceListDTO[]Required
The attributes to update in 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?