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.
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 with
parameters
Example response
Validity and calling the link
Open the link via a real browser navigation, i.e. viawindow.location.href, a normal link, or a server-side redirect. A call via fetch or XMLHttpRequest is not sufficient: the customer must land on the target page so that the shop can take over the session there.
Error codes
Multi-step target pages. If the target template is multi-step — for example an order flow with the steps address, payment, overview, and completion — it usually selects the step to be displayed via a URL parameter. This parameter must be stored in
storefrontApi.redirects so that the generated link contains it. If it is missing, the customer accesses the page without a step specification and the template shows its general notice text instead of the form. The call is answered normally with HTTP 200, no error message occurs. Which parameter your template expects should be clarified with your template contact.