upsertShippingOptions - Fulfillment Module Reference
This documentation provides a reference to the upsertShippingOptions
method. This belongs to the Fulfillment Module.
upsertShippingOptions(data, sharedContext?): Promise<ShippingOptionDTO>
This method updates or creates a shipping option if it doesn't exist.
Example
Parameters
The attributes in the shipping option to be created or updated.
Returns
The created or updated shipping option.
upsertShippingOptions(data, sharedContext?): Promise<ShippingOptionDTO[]>
This method updates or creates shipping options if they don't exist.
Example
const shippingOptions =
await fulfillmentModuleService.upsertShippingOptions([
{
id: "so_123",
name: "Express Shipping",
},
{
name: "Express Shipping",
price_type: "flat",
service_zone_id: "serzo_123",
shipping_profile_id: "sp_123",
provider_id: "webshipper",
type: {
label: "Express",
description: "express shipping",
code: "express",
},
},
])
Parameters
The attributes in the shipping options to be created or updated.
Returns
The created or updated shipping options.
Was this section helpful?