> ## 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.

# Storefront API Options

> Read values of template options via the Storefront API — globally or per configuration node.

The Options API returns the values of [template options](/frontend/referenz/optionen) via the Storefront API, analogous to the template module [\$wsOptions](/frontend/referenz/module/ws-options-template-optionen). This makes option values that are defined in the template and maintained in the admin interface available to an external frontend as well.

<Note>
  Options still have to be **defined in the template** (see [Options](/frontend/referenz/optionen)). The Storefront API only reads the values and does not replace the definition.
</Note>

***

## Supported methods

List of all supported methods.

| **Command**                          | **Endpoints** | **GET**               | **PUT**                             | **POST**                            | **DELETE**                          |
| ------------------------------------ | ------------- | --------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| Query the value of a template option | `options/get` | <Icon icon="check" /> | <Icon icon="ban" color="#DC2626" /> | <Icon icon="ban" color="#DC2626" /> | <Icon icon="ban" color="#DC2626" /> |

## Methods for options

This method provides the value of a single template option — both for global options and for options that are bound to a configuration node via `attachTo`.

### GET options/get

Returns the value of a template option, analogous to [`$wsOptions.get(name, nodeId)`](/frontend/referenz/module/ws-options-template-optionen). The `nodeId` parameter is optional and is specified for options that are bound to a configuration node.

**Example call** that reads the value of an option bound to a payment method:

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
GET https://<your-shop>.de/api/v1/options/get?name=showPaymentIconInFooter&nodeId=payment.payment.bill
```

#### Parameter overview

| **Parameter** | **Type** | **Description**                                                                                                          |
| ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| `name`        | string   | Mandatory. Name of the option as defined in the template.                                                                |
| `nodeId`      | string   | Optional. ID of the configuration node for `attachTo` options. Without this specification, the global value is returned. |

Only the `name` and `nodeId` parameters are allowed. Any additional query parameter leads to `400 Bad Request` with `error: "invalidParameters"` and an entry in `paramErrors`.

#### Example response

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "name": "showPaymentIconInFooter",
  "nodeId": "payment.payment.bill",
  "value": true
}
```

If no `nodeId` was passed in the request, the `nodeId` field is omitted from the response. The type of `value` corresponds to the type of the option (for example `bool`, `string`, `int`).

#### Status codes

With valid parameters, the endpoint always responds with `200 OK`. If no option exists with the requested `name`, the response contains the `value` field without a value (`null`). Therefore, check for `value` in the frontend, not for the HTTP status. The endpoint only returns `404 Not Found` if a method other than `GET` is used.

***

## Related links

* [Options](/frontend/referenz/optionen): define template options.
* [\$wsOptions](/frontend/referenz/module/ws-options-template-optionen): read the same values in the template.


## Related topics

- [Storefront API](/en/schnittstellen/storefront-api.md)
- [Storefront API Optionen](/schnittstellen/storefront-api/storefront-api-optionen.md)
- [storefrontApi - Storefront API](/en/konfiguration/storefrontapi-storefront-api.md)
- [Storefront API Configurations](/en/schnittstellen/storefront-api/storefront-api-konfigurationen.md)
- [Storefront API URL Resolution](/en/schnittstellen/storefront-api/storefront-api-url-resolution.md)
