Skip to main content
Skip to main content

listAddresses - Cart Module Reference

This documentation provides a reference to the listAddresses method. This belongs to the Cart Module.

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

Example

To retrieve a list of addresses using their IDs:

const addresses = await cartModuleService.listAddresses({
id: ["caaddr_123", "caaddr_321"],
})

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 addresses = await cartModuleService.listAddresses(
{
id: ["caaddr_123", "caaddr_321"],
},
{
take: 20,
skip: 2,
}
)

Parameters

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

Returns

PromisePromise<CartAddressDTO[]>Required
The list of addresses.
Was this section helpful?