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
customHeadersRecord<string, any>RequiredCustom headers to attach to the request.
Default: {}
Returns
ResponsePromiseResponsePromise<StoreRegionsListRes>RequiredResolves to the list of regions with pagination fields.
ResponsePromiseResponsePromise<StoreRegionsListRes>Requiredretrieve
Retrieve a Region's details.
Example
Parameters
idstringRequiredThe region's ID.
customHeadersRecord<string, any>RequiredCustom headers to attach to the request.
Default: {}
Returns
ResponsePromiseResponsePromise<StoreRegionsRes>RequiredResolves to the region's details.
ResponsePromiseResponsePromise<StoreRegionsRes>RequiredWas this section helpful?