Skip to main content
Skip to main content

update - Stock Location Module Reference

This documentation provides a reference to the update method. This belongs to the Stock Location Module.

This method is used to update a stock location.

Example

import { 
initialize as initializeStockLocationModule,
} from "@medusajs/stock-location"

async function updateStockLocation (id:string, name: string) {
const stockLocationModule = await initializeStockLocationModule({})

const stockLocation = await stockLocationModule.update(id, {
name
})

// do something with the stock location or return it
}

Parameters

idstringRequired
The ID of the stock location.
The attributes to update in the stock location.
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<StockLocationDTO>Required
The stock location's details.
Was this section helpful?