Skip to main content
Skip to main content

listShippingOptionRules - Fulfillment Module Reference

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

This method retrieves a paginated list of shipping option rules based on optional filters and configuration.

Example

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

const shippingOptionRules =
await fulfillmentModuleService.listShippingOptionRules({
id: ["sorul_123", "sorul_321"],
})

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

const shippingOptionRules =
await fulfillmentModuleService.listShippingOptionRules(
{
id: ["sorul_123", "sorul_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 shippingOptionRules =
await fulfillmentModuleService.listShippingOptionRules(
{
id: ["sorul_123", "sorul_321"],
},
{
relations: ["shipping_option"],
take: 20,
skip: 2,
}
)

Parameters

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

Returns

PromisePromise<ShippingOptionRuleDTO[]>Required
The list of shipping option rules.
Was this section helpful?