RegionsResource
This class is used to send requests to Store Region API Routes. All its method
are available in the JS Client under the medusa.regions
property.
Regions are different countries or geographical regions that the commerce store serves customers in. Customers can choose what region they're in, which can be used to change the prices shown based on the region and its currency.
Related Guide: How to use regions in a storefront.
Methods
list
Retrieve a list of regions. This method is useful to show the customer all available regions to choose from.
Example
Parameters
customHeaders
Record<string, any>RequiredCustom headers to attach to the request.
Default: {}
Returns
ResponsePromise
ResponsePromise<StoreRegionsListRes>RequiredResolves to the list of regions with pagination fields.
ResponsePromise
ResponsePromise<StoreRegionsListRes>Requiredretrieve
Retrieve a Region's details.
Example
Parameters
id
stringRequiredThe region's ID.
customHeaders
Record<string, any>RequiredCustom headers to attach to the request.
Default: {}
Returns
ResponsePromise
ResponsePromise<StoreRegionsRes>RequiredResolves to the region's details.
ResponsePromise
ResponsePromise<StoreRegionsRes>RequiredWas this section helpful?