AdminStoresResource
This class is used to send requests to Admin Store API Routes. All its method
are available in the JS Client under the medusa.admin.store
property.
All methods in this class require authentication.
A store indicates the general configurations and details about the commerce store. By default, there's only one store in the Medusa backend. Admins can manage the store and its details or configurations.
Methods
update
Update the store's details.
Example
Parameters
The attributes to update in the store.
customHeaders
Record<string, any>RequiredDefault: {}
Returns
ResponsePromise
ResponsePromise<AdminStoresRes>RequiredResolves to the store's details.
ResponsePromise
ResponsePromise<AdminStoresRes>RequiredaddCurrency
Add a currency code to the available currencies in a store. This doesn't create new currencies, as currencies are defined within the Medusa backend. To create a currency, you can create a migration that inserts the currency into the database.
Example
Parameters
currency_code
stringRequiredcustomHeaders
Record<string, any>RequiredDefault: {}
Returns
ResponsePromise
ResponsePromise<AdminStoresRes>RequiredResolves to the store's details.
ResponsePromise
ResponsePromise<AdminStoresRes>RequireddeleteCurrency
Delete a currency code from the available currencies in a store. This doesn't completely delete the currency and it can be added again later to the store.
Example
Parameters
currency_code
stringRequiredcustomHeaders
Record<string, any>RequiredDefault: {}
Returns
ResponsePromise
ResponsePromise<AdminStoresRes>RequiredResolves to the store's details.
ResponsePromise
ResponsePromise<AdminStoresRes>Requiredretrieve
Retrieve the store's details.
Example
Parameters
customHeaders
Record<string, any>RequiredDefault: {}
Returns
ResponsePromise
ResponsePromise<AdminExtendedStoresRes>RequiredResolves to the store's details.
ResponsePromise
ResponsePromise<AdminExtendedStoresRes>RequiredlistPaymentProviders
Retrieve a list of available payment providers in a store.
Example
Parameters
customHeaders
Record<string, any>RequiredDefault: {}
Returns
ResponsePromise
ResponsePromise<AdminPaymentProvidersList>RequiredResolves to the list of payment providers.
ResponsePromise
ResponsePromise<AdminPaymentProvidersList>RequiredlistTaxProviders
Retrieve a list of available tax providers in a store.
Example
Parameters
customHeaders
Record<string, any>RequiredDefault: {}
Returns
ResponsePromise
ResponsePromise<AdminTaxProvidersList>RequiredResolves to the list of tax providers.
ResponsePromise
ResponsePromise<AdminTaxProvidersList>Required