Stock Location Module

The Stock Location Module provides stock-location-related features in your Medusa and Node.js applications.

How to Use Stock Location Module's Service#

You can use the Stock Location Module's main service by resolving from the Medusa container the resource Modules.STOCK_LOCATION imported from @medusajs/framework/utils.

For example:


Features#

Stock Location Management#

Store and manage stock locations. Stock locations are associated with data models of other modules that require a location, such as the Inventory Module's InventoryLevel.

Code
1const stockLocation = await stockLocationModuleService.createStockLocations({2  name: "Warehouse 1",3})

Address Management#

Manage the address of each stock location.

Code
1const stockLocation = await stockLocationModuleService.updateStockLocations({2  id: "sloc_123",3  address: {4    country_code: "us",5    city: "New York City",6    address_1: "52 Stone St",7    postal_code: "10004",8  },9})
Was this page helpful?
Edit this page