Skip to main content
Skip to main content

listTaxRegions - Tax Module Reference

This documentation provides a reference to the listTaxRegions method. This belongs to the Tax Module.

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

Example

To retrieve a list of tax regions using their IDs:

const taxRegions = await taxModuleService.listTaxRegions({
id: ["txreg_123", "txreg_321"],
})

To specify relations that should be retrieved within the tax region:

const taxRegions = await taxModuleService.listTaxRegions(
{
id: ["txreg_123", "txreg_321"],
},
{
relations: ["tax_rates"],
}
)

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 taxRegions = await taxModuleService.listTaxRegions(
{
id: ["txreg_123", "txreg_321"],
},
{
relations: ["tax_rates"],
take: 20,
skip: 2,
}
)

Parameters

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

Returns

PromisePromise<TaxRegionDTO[]>Required
The list of tax regions.
Was this section helpful?