Support and Docs

3 Topics
Last post 11 November 2014 By Nadja Kristiansen
1 Topics
Last post 20 March 2014 By Carsten E. Madsen
0 Topics
Last post N/A By N/A
0 Topics
Last post N/A By N/A
1 Topics
Last post 02 April 2014 By Carsten E. Madsen

Basket API

  • 2017-05-20

The basket API allows for a much smoother user experience, as products are swiftly added to the basket, without interrupting the users' browsing. Using the Basket API the does not reload the page, meaning that the experience will be much smoother, especially when adding to basket from scrollable lists, as the user is not directed to the top of the page after adding to basket.

Basket API allows for a much more flexible and customizable basket view – both “basket quick view” (“mini basket”) and full basket view, as all HTML, CSS and script is controlled entirely by the shop front-end.

The basket API accepts requests in JSON format, and responds in JSON format.

The service URL is /sessionservices/v2/basket/current/line and the API supports GET, POST, PUT and DELETE requests.

Read more about the basket API in the eSeller Cloud API reference documentation.

Request parameters

Basket API supports the parameter “include”. The purpose of this parameter is to allow the user to collect only the necessary information, improving performance.

Include: Currently the only supported value is “desc”. Includes the following additional fields in the response:

  • itemUrl: Relative URL of the item details page– e.g."/pi/retro-loafer-shoe _2479092_.aspx"
  • itemImageUrl: Relative URL of the item image – e.g. "/SL/PI/604/1/36ce72c3-4d6d-4c27-8831-5da2d0a806f9.png"
  • description1: String – usually item name
  • description2: String
  • description3: String

Example: GET /sessionservices/v2/basket/current/line?include=desc

Example requests

On POST/PUT requests “Content-Type” header must be set to “application/json”.

  • GET request:
    GET /sessionservices/v2/basket/current/line
  • POST request:
    POST /sessionservices/v2/basket/current/line
    Request body:
    [{
    "referencingId":1676284,
    "productType":"product",
    "quantity":3,
    }]
  • PUT request:
    PUT /sessionservices/v2/basket/current/line
    Request body:
    [{
    "basketLineId":18533410,
    "quantity":2
    }]
  • DELETE request:
    DELETE /sessionservices/v2/basket/current/line/18533824

Un-supported functionality

Basket API has limited compatibility with some features, which means that basket API does not support all functionality that the standard basket does. This means that for instance the following is not supported by basket API:

- Gift cards
- Coupon codes
- Offers
- Configured products.