Skip to main content
Skip to main content

listAndCountShippingOptionTypes - Fulfillment Module Reference

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

This method retrieves a paginated list of shipping option types along with the total count of available shipping option types satisfying the provided filters.

Example

To retrieve a list of shipping option types using their IDs:

const [shippingOptionTypes, count] =
await fulfillmentModuleService.listAndCountShippingOptionTypes(
{
id: ["sotype_123", "sotype_321"],
}
)

To specify relations that should be retrieved within the shipping option type:

const [shippingOptionTypes, count] =
await fulfillmentModuleService.listAndCountShippingOptionTypes(
{
id: ["sotype_123", "sotype_321"],
},
{
relations: ["shipping_option"],
}
)

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 [shippingOptionTypes, count] =
await fulfillmentModuleService.listAndCountShippingOptionTypes(
{
id: ["sotype_123", "sotype_321"],
},
{
relations: ["shipping_option"],
take: 20,
skip: 2,
}
)

Parameters

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

Returns

PromisePromise<[ShippingOptionTypeDTO[], number]>Required
The list of shipping option types along with their total count.
Was this section helpful?