Skip to main content
The Options API returns the values of template options via the Storefront API, analogous to the template module $wsOptions. This makes option values that are defined in the template and maintained in the admin interface available to an external frontend as well.
Options still have to be defined in the template (see Options). The Storefront API only reads the values and does not replace the definition.

Supported methods

List of all supported methods.

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). 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:

Parameter overview

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

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.
  • Options: define template options.
  • $wsOptions: read the same values in the template.