Document Properties
Kbid
29035X
Last Modified
21-Mar-2024
Added to KB
20-Feb-2019
Public Access
Everyone
Status
Online
Doc Type
Guidelines
Product
  • ICM 7.10
  • ICM 11
Business Guide - WebShop REST API - Basket and Checkout REST API (v1)

Introduction

This document describes the procedure of creating a basket, preparing the checkout and creating an order by using the IS7 RESTful API. Therefore the following questions should be answered:

  • How do I add an item to the cart and how do I manipulate (edit and delete) it?
  • How are the dependencies of each single checkout step?
  • How do I change shipping methods and how do I add further payment options?
  • How are the different payment process types working and are there differences between the single payment methods?
  • How can I create an order?

Difference Between WebShop Implementation and RESTful API

The difference between the web shop implementation and the RESTful API implementation is that the checkout does not have such a strict and dependent process sequence at the RESTful API implementation. This is due to the objective of each implementation technology. The web shop implementation of inSPIRED is focused on a UI application while the RESTful API is focused on a data application which is a base for a UI application (for instance a mobile web app). So, the basket and checkout process and handling of the RESTful API allow a higher flexibility of the process sequence and the order of each single process step and block.

For instance: At the web shop implementation, the completed shipping step is a mandatory precondition before the payment step can be started. In contrast to this, the payment step can be executed before the shipping information is added to the basket or before any line item is added to the basket. However, there are also some dependencies within the process steps of the RESTful API basket and checkout process. For example, editing the shipping options is only possible if some items have already been added to the basket.

RESTful API Basket and Checkout Flow

As mentioned at the beginning, the process steps of the RESTful API are more or less independent of each other. However, there are some restrictions which are also valid for a checkout via the RESTful API:

  • Creating a basket is always the first action before the checkout flow can begin, i. e., the first request is POST /basket/.
  • Creating the order is always the last step of the checkout, i. e., the last request is POST /orders/.
  • To get and to set shipping options via the RESTful API, the basket must contain at least one item.

Example for a Simple Checkout

Workflow

  • Customer is logged in
  • No line item edit
  • No basket edit
    • Default address for invoicing and shipping
    • Use pre-selected shipping method
  • Simple payment method without a redirection

Example for an Advanced Checkout - Redirect Before Checkout

Workflow

  • Customer is logged in
  • Line item edit
  • Add a warranty
  • Basket edit:
    • Select another shipping method
    • Edit an address
    • Add a promotion
  • Advanced payment method with a redirection before checkout flow

Checkout Request Overview

Arranged by a common checkout flow (as in the web shop)

Example for an Advanced Checkout - Redirect After Checkout

Workflow

  • Customer is logged in
  • Line item edit
  • Add a warranty
  • Basket edit:
    • Select another shipping method
    • Edit an address
    • Add a promotion
  • Advanced payment method with a redirection after checkout (after submit order) flow

Checkout Request Overview

Arranged by a common checkout flow (as in the web shop)

API Documentation

Fore more details please have a look at our API documentation.

Example Collection

The following Postman collection features all requests introduced in this guide. Feel free to use the enclosed environment and adapt the host variable according to your system. 

Info

You can find both, collection and environment, in the following zip file:

Disclaimer
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.