Skip to main content
Skip to main content

upsertServiceZones - Fulfillment Module Reference

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

upsertServiceZones(data, sharedContext?): Promise<ServiceZoneDTO>

This method updates or creates a service zone if it doesn't exist.

Example

const serviceZone =
await fulfillmentModuleService.upsertServiceZones({
id: "serzo_123",
name: "US",
})

Parameters

The attributes in the service zone to be created or updated.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ServiceZoneDTO>Required
The created or updated service zone.

upsertServiceZones(data, sharedContext?): Promise<ServiceZoneDTO[]>

This method updates or creates service zones if they don't exist.

Example

const serviceZones =
await fulfillmentModuleService.upsertServiceZones([
{
id: "serzo_123",
name: "US",
},
{
name: "US",
fulfillment_set_id: "fuset_123",
},
])

Parameters

dataUpsertServiceZoneDTO[]Required
The attributes in the service zones to be created or updated.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ServiceZoneDTO[]>Required
The created or updated service zones.
Was this section helpful?