Documentation

Session

The main part of the Delivery Checkout data model, you will be interacting with, is the session.

Session holds information about the current customer transaction. Whenever customer selects a shipping option using the shipping selector widget or anything is changed in a cart, session is updated and stored.

Note

You can think of a session as a set of all actions that was made by customer or on the behalf of customer during a single transaction on the merchant site. If customer adds something to a cart or changes a shipping address, all the steps and information will be persisted in the session object.

Session can be created through API with our Super Intelligent Widget (abbreviated and mostly known as SIW).

Session lifecycle

Session lifecycle consists of two states - Active and Completed.

stateDiagram [*] --> Active: /session.create Active --> Completed: /session.complete Active --> Active: /session.update Completed --> [*]

Session is created by merchant most commonly when the user enters the checkout page. However, it might differ between some merchants, because it is the matter of the merchant integration with Ingrid services.

After the session is created, it can be modified with /session.update calls to SIW API. Most common use case is updating the cart items or search address. However, there is a possibility to update more fields, see Swagger documentation to learn more.

The final phase of the session lifecycle is the session completion. It is done via a /session.complete call to SIW API. At this point, session must contain a customer delivery address.

Last updated: Thu, Mar 28, 06:15 AM