Skip to main content
Skip to main content

listFulfillments - Fulfillment Module Reference

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

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

Example

To retrieve a list of fulfillments using their IDs:

const fulfillments =
await fulfillmentModuleService.listFulfillments({
id: ["ful_123", "ful_321"],
})

To specify relations that should be retrieved within the fulfillment:

const fulfillments =
await fulfillmentModuleService.listFulfillments(
{
id: ["ful_123", "ful_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 fulfillments =
await fulfillmentModuleService.listFulfillments(
{
id: ["ful_123", "ful_321"],
},
{
relations: ["shipping_option"],
take: 20,
skip: 2,
}
)

Parameters

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

Returns

PromisePromise<FulfillmentDTO[]>Required
The list of fulfillments.
Was this section helpful?