--- displayed_sidebar: jsClientSidebar slug: /references/js-client/RegionsResource --- import ParameterTypes from "@site/src/components/ParameterTypes" # RegionsResource This class is used to send requests to [Store Region API Routes](https://docs.medusajs.com/api/store#regions\_getregions). 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](https://docs.medusajs.com/modules/regions-and-currencies/storefront/use-regions) ## Methods ### list Retrieve a list of regions. This method is useful to show the customer all available regions to choose from. #### Example ```ts import Medusa from "@medusajs/medusa-js" const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) medusa.regions.list().then(({ regions, count, limit, offset }) => { console.log(regions.length) }) ``` #### Parameters `", "description": "Custom headers to attach to the request.", "optional": false, "defaultValue": "{}", "expandable": false, "children": [] } ]} /> #### Returns `", "description": "An optional key-value map with additional details", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "name", "type": "`string`", "description": "The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "payment_providers", "type": "[PaymentProvider](../internal/classes/internal.PaymentProvider.mdx)[]", "description": "The details of the payment providers that can be used to process payments in the region.", "optional": false, "defaultValue": "", "expandable": true, "children": [] }, { "name": "tax_code", "type": "`string`", "description": "The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "tax_provider", "type": "[TaxProvider](../internal/classes/internal.TaxProvider.mdx)", "description": "The details of the tax provider used in the region.", "optional": false, "defaultValue": "", "expandable": true, "children": [] }, { "name": "tax_provider_id", "type": "``null`` \\| `string`", "description": "The ID of the tax provider used in this region", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "tax_rate", "type": "`number`", "description": "The tax rate that should be charged on purchases in the Region.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "tax_rates", "type": "``null`` \\| [TaxRate](../internal/classes/internal.TaxRate.mdx)[]", "description": "The details of the tax rates used in the region, aside from the default rate.", "optional": false, "defaultValue": "", "expandable": true, "children": [] }, { "name": "updated_at", "type": "`Date`", "description": "The date with timezone at which the resource was updated.", "optional": false, "defaultValue": "", "expandable": false, "children": [] } ] } ] } ] } ]} /> ___ ### retrieve Retrieve a Region's details. #### Example ```ts import Medusa from "@medusajs/medusa-js" const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) medusa.regions.retrieve(regionId).then(({ region }) => { console.log(region.id) }) ``` #### Parameters `", "description": "Custom headers to attach to the request.", "optional": false, "defaultValue": "{}", "expandable": false, "children": [] } ]} /> #### Returns `", "description": "An optional key-value map with additional details", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "name", "type": "`string`", "description": "The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "payment_providers", "type": "[PaymentProvider](../internal/classes/internal.PaymentProvider.mdx)[]", "description": "The details of the payment providers that can be used to process payments in the region.", "optional": false, "defaultValue": "", "expandable": true, "children": [] }, { "name": "tax_code", "type": "`string`", "description": "The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "tax_provider", "type": "[TaxProvider](../internal/classes/internal.TaxProvider.mdx)", "description": "The details of the tax provider used in the region.", "optional": false, "defaultValue": "", "expandable": true, "children": [] }, { "name": "tax_provider_id", "type": "``null`` \\| `string`", "description": "The ID of the tax provider used in this region", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "tax_rate", "type": "`number`", "description": "The tax rate that should be charged on purchases in the Region.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "tax_rates", "type": "``null`` \\| [TaxRate](../internal/classes/internal.TaxRate.mdx)[]", "description": "The details of the tax rates used in the region, aside from the default rate.", "optional": false, "defaultValue": "", "expandable": true, "children": [] }, { "name": "updated_at", "type": "`Date`", "description": "The date with timezone at which the resource was updated.", "optional": false, "defaultValue": "", "expandable": false, "children": [] } ] } ] } ] } ]} />