storeConfig query
The storeConfig
query defines information about a store's configuration. You can query a non-default store by changing the header in your GraphQL request.
Syntax
storeConfig: StoreConfig
Reference
The storeConfig
reference provides detailed information about the types and fields defined in this query.
Example usage
The Commerce API playground provides a sample storeConfig
query that you can run against a live instance of Adobe Commerce with Luma sample data. Note that the responses may vary, depending on the configuration of the Commerce instance.
Query a store's configuration
The storeConfig
query can return base
and extended
store configuration setting. The following call returns all base
details of a store's configuration.
Request:
Copied to your clipboard{storeConfig {store_codestore_nameis_default_storestore_group_codeis_default_store_grouplocalebase_currency_codedefault_display_currency_codetimezoneweight_unitbase_urlbase_link_urlbase_static_urlbase_media_urlsecure_base_urlsecure_base_link_urlsecure_base_static_urlsecure_base_media_url}}
Response:
Copied to your clipboard{"data": {"storeConfig": {"store_code": "default","store_name": "Default Store View","is_default_store": true,"store_group_code": "main_website_store","is_default_store_group": true,"locale": "en_US","base_currency_code": "USD","default_display_currency_code": "USD","timezone": "America/Chicago","weight_unit": "lbs","base_url": "http://example.com/","base_link_url": "http://example.com/","base_static_url": "http://example.com/pub/static/version1606976517/","base_media_url": "http://example.com/pub/media/","secure_base_url": "http://example.com/","secure_base_link_url": "http://example.com/","secure_base_static_url": "http://example.com/pub/static/version1606976517/","secure_base_media_url": "http://example.com/pub/media/"}}}
Query a store's theme
The following query returns information about the store's default title, keywords, and welcome text.
Request:
Copied to your clipboard{storeConfig {default_titledefault_keywordswelcome}}
Response:
Copied to your clipboard{"data": {"storeConfig": {"default_title": "Adobe Commerce","default_keywords": "Varien, E-commerce","welcome": "Default welcome msg!"}}}
Query a store's CMS configuration
The following query returns information about the store's content pages.
Request:
Copied to your clipboard{storeConfig {frontcms_home_pageno_routecms_no_routecms_no_cookiesshow_cms_breadcrumbs}}
Response:
Copied to your clipboard{"data": {"storeConfig": {"front": "cms","cms_home_page": "home","no_route": "cms/noroute/index","cms_no_route": "no-route","cms_no_cookies": "enable-cookies","show_cms_breadcrumbs": 1}}}
Query a store's Catalog configuration
The following query returns information about the store's catalog configuration.
Request:
Copied to your clipboard{storeConfig {product_url_suffixcategory_url_suffixtitle_separatorlist_modegrid_per_page_valueslist_per_page_valuesgrid_per_pagelist_per_pagecatalog_default_sort_by}}
Response:
Copied to your clipboard{"data": {"storeConfig": {"product_url_suffix": ".html","category_url_suffix": ".html","title_separator": "-","list_mode": "grid-list","grid_per_page_values": "9,15,30","list_per_page_values": "5,10,15,20,25","grid_per_page": 9,"list_per_page": 10,"catalog_default_sort_by": "position"}}}
Query a store's customer configuration
The following query returns information about the store's customer configuration.
Request:
Copied to your clipboard{storeConfig {autocomplete_on_storefrontminimum_password_lengthrequired_character_classes_numbercreate_account_confirmation}}
Response:
Copied to your clipboard{"data": {"storeConfig": {"autocomplete_on_storefront": true,"minimum_password_length": "6","required_character_classes_number": "2","create_account_confirmation": false}}}
Query a store's access token expiration configuration
The following query returns the value of the Stores > Settings > Configuration > Services > OAuth > Access Token Expiration > Customer Token Lifetime (hours) field.
Request:
Copied to your clipboard{storeConfig {customer_access_token_lifetime}}
Response:
Copied to your clipboard{"data": {"storeConfig": {"customer_access_token_lifetime": 1}}}
Query a store's fixed product tax configuration
The following query returns enumeration values that indicate the store's fixed product tax configuration.
Request:
Copied to your clipboard{storeConfig {category_fixed_product_tax_display_settingproduct_fixed_product_tax_display_settingsales_fixed_product_tax_display_setting}}
Response:
Copied to your clipboard{"data": {"storeConfig": {"category_fixed_product_tax_display_setting": "EXCLUDE_FPT_WITHOUT_DETAILS","product_fixed_product_tax_display_setting": "EXCLUDE_FPT_AND_INCLUDE_WITH_DETAILS","sales_fixed_product_tax_display_setting": "INCLUDE_FPT_WITHOUT_DETAILS"}}}
Query a store's order cancellation configuration
The following query returns the store's order cancellation settings, indicating if it is enabled and the available cancellation reasons.
Request:
Copied to your clipboard{storeConfig {order_cancellation_enabledorder_cancellation_reasons {description}}}
Response:
Copied to your clipboard{"data": {"storeConfig": {"order_cancellation_enabled": true,"order_cancellation_reasons": [{"description": "The item(s) are no longer needed"},{"description": "The order was placed by mistake"},{"description": "Item(s) not arriving within the expected timeframe"},{"description": "Found a better price elsewhere"},{"description": "Other"}]}}}