--- displayed_sidebar: jsClientSidebar slug: /references/js-client/AdminCurrenciesResource --- import ParameterTypes from "@site/src/components/ParameterTypes" # AdminCurrenciesResource This class is used to send requests to [Admin Currency API Routes](https://docs.medusajs.com/api/admin#currencies). All its method are available in the JS Client under the `medusa.admin.currencies` property. All methods in this class require [user authentication](AdminAuthResource.mdx#createsession). A store can use unlimited currencies, and each region must be associated with at least one currency. Currencies are defined within the Medusa backend. The methods in this class allow admins to list and update currencies. Related Guide: [How to manage currencies](https://docs.medusajs.com/modules/regions-and-currencies/admin/manage-currencies). ## Methods ### list Retrieve a list of currencies. The currencies can be filtered by fields such as `code`. The currencies can also be sorted or paginated. #### Example To list currencies: ```ts import Medusa from "@medusajs/medusa-js" const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) // must be previously logged in or use api token medusa.admin.currencies.list().then(({ currencies, count, offset, limit }) => { console.log(currencies.length) }) ``` By default, only the first `20` records are retrieved. You can control pagination by specifying the `limit` and `offset` properties: ```ts import Medusa from "@medusajs/medusa-js" const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) // must be previously logged in or use api token medusa.admin.currencies .list({ limit, offset, }) .then(({ currencies, count, offset, limit }) => { console.log(currencies.length) }) ``` #### Parameters ", "description": "Custom headers to attach to the request.", "optional": false, "defaultValue": "{}", "expandable": false, "children": [] } ]} /> #### Returns ", "optional": false, "defaultValue": "", "description": "Resolves to the list of currencies with pagination fields.", "expandable": false, "children": [ { "name": "AdminCurrenciesListRes", "type": "[`PaginatedResponse`](../internal/interfaces/internal.PaginatedResponse.mdx) & { `currencies`: [`Currency`](../internal/classes/internal.Currency.mdx)[] }", "description": "List of currencies with pagination fields.", "optional": false, "defaultValue": "", "expandable": false, "children": [ { "name": "count", "type": "`number`", "description": "The total number of items available.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "limit", "type": "`number`", "description": "The maximum number of items that can be returned in the list.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "offset", "type": "`number`", "description": "The number of items skipped before the returned items in the list.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "currencies", "type": "[`Currency`](../internal/classes/internal.Currency.mdx)[]", "description": "An array of currency details.", "optional": false, "defaultValue": "", "expandable": false, "children": [ { "name": "code", "type": "`string`", "description": "The 3 character ISO code for the currency.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "includes_tax", "type": "`boolean`", "description": "Whether the currency prices include tax", "optional": true, "defaultValue": "false", "expandable": false, "featureFlag": "tax_inclusive_pricing", "children": [] }, { "name": "name", "type": "`string`", "description": "The written name of the currency", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "symbol", "type": "`string`", "description": "The symbol used to indicate the currency.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "symbol_native", "type": "`string`", "description": "The native symbol used to indicate the currency.", "optional": false, "defaultValue": "", "expandable": false, "children": [] } ] } ] } ] } ]} /> ___ ### update Update a Currency's details. #### Example ```ts import Medusa from "@medusajs/medusa-js" const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) // must be previously logged in or use api token medusa.admin.currencies .update(code, { includes_tax: true, }) .then(({ currency }) => { console.log(currency.code) }) ``` #### Parameters ", "description": "Custom headers to attach to the request.", "optional": false, "defaultValue": "{}", "expandable": false, "children": [] } ]} /> #### Returns ", "optional": false, "defaultValue": "", "description": "Resolves to the currency's details.", "expandable": false, "children": [ { "name": "AdminCurrenciesRes", "type": "`object`", "description": "A currency's details.", "optional": false, "defaultValue": "", "expandable": false, "children": [ { "name": "currency", "type": "[`Currency`](../internal/classes/internal.Currency.mdx)", "description": "Currency details.", "optional": false, "defaultValue": "", "expandable": false, "children": [ { "name": "code", "type": "`string`", "description": "The 3 character ISO code for the currency.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "includes_tax", "type": "`boolean`", "description": "Whether the currency prices include tax", "optional": true, "defaultValue": "false", "expandable": false, "featureFlag": "tax_inclusive_pricing", "children": [] }, { "name": "name", "type": "`string`", "description": "The written name of the currency", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "symbol", "type": "`string`", "description": "The symbol used to indicate the currency.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "symbol_native", "type": "`string`", "description": "The native symbol used to indicate the currency.", "optional": false, "defaultValue": "", "expandable": false, "children": [] } ] } ] } ] } ]} />