Skip to main content
Skip to main content

create - Stock Location Next Module Reference

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

create(input, context?): Promise<StockLocationDTO>

This method creates a stock location.

Example

const stockLocation = await stockLocationModuleService.create(
{
name: "Warehouse",
address: {
address_1: "1855 Powder Mill Rd",
country_code: "us",
},
}
)

Parameters

The stock location to create.
contextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<StockLocationDTO>Required
The created stock location.

create(input, context?): Promise<StockLocationDTO[]>

This method creates stock locations.

Example

const stockLocations =
await stockLocationModuleService.create([
{
name: "Warehouse",
address: {
address_1: "1855 Powder Mill Rd",
country_code: "us",
},
},
{
name: "Warehouse 2",
address_id: "laddr_123",
},
])

Parameters

The stock locations to create.
contextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<StockLocationDTO[]>Required
The created stock locations.
Was this section helpful?