Skip to main content
Skip to main content

listServiceZones - Fulfillment Module Reference

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

This method retrieves a paginated list of service zones based on optional filters and configuration.

Example

To retrieve a list of service zones using their IDs:

const serviceZones =
await fulfillmentModuleService.listServiceZones({
id: ["serzo_123", "serzo_321"],
})

To specify relations that should be retrieved within the service zone:

const serviceZones =
await fulfillmentModuleService.listServiceZones(
{
id: ["serzo_123", "serzo_321"],
},
{
relations: ["shipping_options"],
}
)

By default, only the first 15 records are retrieved. You can control pagination by specifying the skip and take properties of the config parameter:

const serviceZones =
await fulfillmentModuleService.listServiceZones(
{
id: ["serzo_123", "serzo_321"],
},
{
relations: ["shipping_options"],
take: 20,
skip: 2,
}
)

Parameters

The filters to apply on the retrieved service zones.
The configurations determining how the service zone is retrieved. Its properties, such as select or relations, accept the attributes or relations associated with a service zone.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ServiceZoneDTO[]>Required
The list of service zones.
Was this section helpful?