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 user 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
addCurrency
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_codestringRequiredcustomHeadersRecord<string, any>RequiredDefault: {}
Returns
ResponsePromiseResponsePromise<AdminStoresRes>RequiredResolves to the store's details.
ResponsePromiseResponsePromise<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_codestringRequiredcustomHeadersRecord<string, any>RequiredDefault: {}
Returns
ResponsePromiseResponsePromise<AdminStoresRes>RequiredResolves to the store's details.
ResponsePromiseResponsePromise<AdminStoresRes>RequiredlistPaymentProviders
Retrieve a list of available payment providers in a store.
Example
Parameters
customHeadersRecord<string, any>RequiredDefault: {}
Returns
ResponsePromiseResponsePromise<AdminPaymentProvidersList>RequiredResolves to the list of payment providers.
ResponsePromiseResponsePromise<AdminPaymentProvidersList>RequiredlistTaxProviders
Retrieve a list of available tax providers in a store.
Example
Parameters
customHeadersRecord<string, any>RequiredDefault: {}
Returns
ResponsePromiseResponsePromise<AdminTaxProvidersList>RequiredResolves to the list of tax providers.
ResponsePromiseResponsePromise<AdminTaxProvidersList>Requiredretrieve
Retrieve the store's details.
Example
Parameters
customHeadersRecord<string, any>RequiredDefault: {}
Returns
ResponsePromiseResponsePromise<AdminExtendedStoresRes>RequiredResolves to the store's details.
ResponsePromiseResponsePromise<AdminExtendedStoresRes>Requiredupdate
Update the store's details.
Example
Parameters
The attributes to update in the store.
customHeadersRecord<string, any>RequiredDefault: {}
Returns
ResponsePromiseResponsePromise<AdminStoresRes>RequiredResolves to the store's details.
ResponsePromiseResponsePromise<AdminStoresRes>Required