Documentation
Important notice

This feature is currently in beta version. Integrate with this API only if recommended by Ingrid Support Team. 🚧


Reach out to Ingrid Support Team here to learn more about this feature.

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 Delivery Checkout.

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 Delivery Checkout 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 Delivery Checkout API. At this point, session must contain a customer delivery address.

Delivery groups in session

Session can contain delivery groups that are created based on some splitting condition defined for split shipment or marketplace features. If you are using a single cart setting, delivery groups will contain only one entry. To learn more about delivery groups, please see Delivery Groups section.

Last updated: Fri, Sep 30, 09:17 AM