storefrontApi node bundles the configuration options for the storefront API.
storefrontApi* - Basic structure
The basic structure of the storefrontApi node is shown below:
storefrontApi.redirects - Template redirect
The storefrontApi.redirects node defines which name (identifier) points to which template in the shop.
Example configuration
| Parameter | Type | Description |
|---|---|---|
identifier | string | Free name of the redirect; used as viewIdentifier in the API call. More about this: Storefront API session handling |
targetTemplateName | string | Path / name of the target template file (e.g. checkout.htm). |
storefrontAPI.catalogApiSettings - Control of the catalogue endpoints
The storefrontApi.catalogApiSettings node controls which catalogue endpoints are available in the storefront API and which fields may be returned via them.
Example configuration
| Parameter | Type | Description |
|---|---|---|
enableProductDataEndpoint | bool | Enables / disables the product endpoint of the storefront API. |
enableCategoryDataEndpoint | bool | Enables / disables the category endpoint of the storefront API. |
enableProductWhitelist | bool | Activates an allowlist for product fields that may be returned. If true, only fields from productFieldWhitelist are returned. Default: false |
enableCategoryWhitelist | bool | Activates an allowlist for category fields that may be returned. If true, only fields from categoryFieldWhitelist are returned. Default: false |
productFieldWhitelist | multiAssoc | List of allowed product fields from content.productField and / or content.customProductField. Only takes effect if enableProductWhitelist = true. |
categoryFieldWhitelist | multiAssoc | List of allowed category fields from content.categoryField and / or content.customCategoryField. Only takes effect if enableCategoryWhitelist = true. |
