> ## Documentation Index
> Fetch the complete documentation index at: https://dokumentation.websale.de/llms.txt
> Use this file to discover all available pages before exploring further.

# storefrontApi - Storefront API

> The storefrontApi node bundles all configuration options for the WEBSALE storefront API used by external frontends to integrate with the shop system.

export const KonfigDeeplink = ({node}) => <>
    You can open this setting directly in the Admin Interface via the following link:{" "}
    <code>{`https://<shop-domain>/admin/config/${node}`}</code>{" "}
    (<a href="/en/admin-interface/konfigurations-deeplinks">Deeplink overview</a>)
  </>;

The `storefrontApi` node bundles the configuration options for the storefront API.

***

## `storefrontApi*` - Basic structure

The basic structure of the `storefrontApi` node is shown below:

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "storefrontApi": {
    "redirects": {},
    "catalogApiSettings": {}
  }
}
```

#### Parameter description

| **Parameter**        | **Description**                                                                                           |
| -------------------- | --------------------------------------------------------------------------------------------------------- |
| `redirects`          | Defines template redirects (`identifier` → target template).                                              |
| `catalogApiSettings` | Controls the catalogue endpoints of the storefront API and the fields that can be delivered through them. |

***

## `storefrontApi.redirects` - Template redirect

The `storefrontApi.redirects` node defines which name (`identifier`) points to which template in the shop.

<KonfigDeeplink node="storefrontApi.redirects" />

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "identifier": "checkout",
  "targetTemplateName": "checkout.htm"
}
```

#### Parameter description

| **Parameter**        | **Type** | **Description**                                                                                                                                                                                         |
| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `identifier`         | string   | Free name of the redirect; used as `viewIdentifier` in the API call.      <br />More about this:   [Storefront API session handling](/en/schnittstellen/storefront-api/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.

<KonfigDeeplink node="storefrontApi.catalogApiSettings" />

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "categoryFieldWhitelist": null,
  "enableCategoryDataEndpoint": true,
  "enableCategoryWhitelist": false,
  "enableProductDataEndpoint": true,
  "enableProductWhitelist": false,
  "productFieldWhitelist": null
}
```

#### Parameter description

| **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. <br />If `true`, only fields from `productFieldWhitelist` are returned.  <br />Default: `false`    |
| `enableCategoryWhitelist`    | bool       | Activates an allowlist for category fields that may be returned. <br />If `true`, only fields from `categoryFieldWhitelist` are returned.  <br />Default: `false`  |
| `productFieldWhitelist`      | multiAssoc | List of allowed product fields from `content.productField` and / or `content.customProductField`.  <br />Only takes effect if `enableProductWhitelist = true`.     |
| `categoryFieldWhitelist`     | multiAssoc | List of allowed category fields from `content.categoryField` and / or `content.customCategoryField`.  <br />Only takes effect if `enableCategoryWhitelist = true`. |
