Skip to main content
Skip to main content

createShippingOptions - Fulfillment Module Reference

This documentation provides a reference to the createShippingOptions method. This belongs to the Fulfillment Module.

createShippingOptions(data, sharedContext?): Promise<ShippingOptionDTO[]>

This method creates shipping options.

Example

const shippingOptions =
await fulfillmentModuleService.createShippingOptions([
{
name: "DHL Express Shipping",
price_type: "flat",
service_zone_id: "serzo_123",
shipping_profile_id: "sp_123",
provider_id: "dhl",
type: {
label: "Express",
description: "Ship in 24 hours",
code: "express",
},
},
{
name: "Webshipper Shipping",
price_type: "flat",
service_zone_id: "serzo_321",
shipping_profile_id: "sp_321",
provider_id: "webshipper",
type: {
label: "Express",
description: "Ship in 24 hours",
code: "express",
},
},
])

Parameters

The shipping options to be created.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ShippingOptionDTO[]>Required
The created shipping options.

createShippingOptions(data, sharedContext?): Promise<ShippingOptionDTO>

This method creates a shipping option.

Example

const shippingOption =
await fulfillmentModuleService.createShippingOptions({
name: "DHL Express Shipping",
price_type: "flat",
service_zone_id: "serzo_123",
shipping_profile_id: "sp_123",
provider_id: "dhl",
type: {
label: "Express",
description: "Ship in 24 hours",
code: "express",
},
})

Parameters

The shipping option to be created.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ShippingOptionDTO>Required
The created shipping option.
Was this section helpful?