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.
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
On POST/PUT requests “Content-Type” header must be set to “application/json”.
- GET request:
- POST request:
- PUT request:
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
- Configured products.