AdminCurrenciesResource
This class is used to send requests to Admin Currency API Routes. All its method
are available in the JS Client under the medusa.admin.currencies
property.
All methods in this class require authentication.
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.
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:
By default, only the first 20
records are retrieved. You can control pagination by specifying the limit
and offset
properties:
Parameters
customHeaders
Record<string, any>RequiredDefault: {}
Filters and pagination configurations to apply on retrieved currencies.
Returns
ResponsePromise
ResponsePromise<AdminCurrenciesListRes>RequiredResolves to the list of currencies with pagination fields.
ResponsePromise
ResponsePromise<AdminCurrenciesListRes>Requiredupdate
Update a Currency's details.
Example
Parameters
code
stringRequiredThe attributes to update in the currency.
customHeaders
Record<string, any>RequiredDefault: {}
Returns
ResponsePromise
ResponsePromise<AdminCurrenciesRes>RequiredResolves to the currency's details.
ResponsePromise
ResponsePromise<AdminCurrenciesRes>Required