Skip to main content
Storefront API Session Handling provides functions to create and manage sessions in the storefront. This makes it possible to use user states (e.g. anonymous visit or logged-in customer) as well as session-bound data such as shopping cart and wish list consistently across multiple requests. The session is a component of the shop and is mandatory. For more information, see here.

Supported methods

List of all supported methods.

Methods for session handling

These methods take care of session handling between API and storefront: First, new session IDs are generated as the technical basis for all further API calls. If needed, complete redirect links to template pages (e.g. checkout) are built up, including handover of the current session. Optional parameters can be used to specifically control target pages (e.g. a specific checkout step or highlights), while the actual session ID is securely embedded in the link.

POST session/create

The following call creates a session ID.
More info: Storefront API Basics

Example response

POST session/prepareRedirect

The following call generates a complete link to a template page (e.g. “checkout.htm”) and carries the current session over into the storefront. Optionally, additional parameters can be passed that the target template reads (e.g. to directly open a specific checkout step). Using this method makes sense if your shop is set up in a mixed way, i.e. if some parts have been created with the WEBSALE template theme and other parts with the Storefront API. The endpoint ensures that both parts use the same session. Example request that creates a complete link to the template page checkout and takes the current session along

Parameter overview

Example response

(complete URL to the target template page including session handover)

Error codes