Related Documents
Reference - WebShop REST API 7.9
Document Properties
Kbid
28M311
Last Modified
31-May-2022
Added to KB
21-Jun-2017
Public Access
Everyone
Status
Online
Doc Type
References
Product
ICM 7.10
REST API - Create a new basket


Note

Starting with Intershop 7.10 our REST API is provided in the Open API 3.0 format, see Reference - Intershop Commerce Management 7.10 REST API.

URI

/baskets

Http Method

POST

Short Description

Creates a new basket

Query Parameters

no query parameters

Example Requests

/baskets

HTTP Status Codes

201 Created

Description

The request creates a new basket. The client gets a link to the new cart.

The server will return the following headers:

authentication-token: standard@PBEWithMD5AndTripleDES:TXsgqFJIsfw=|Q9k32fGR9EA2YULfnjvBS5oikCPyJ/9g9UxBvZzlepNTTzenk6NM5A==
Location: PrimeTech-PrimeTechSpecials-Site/-/baskets/vpcKDgBWT_IAAAFCsR82JE1u

The authentication token is required for anonymous users, who have not logged-in yet, by providing their credentials. In this case the token has to be sent with any subsequent request to the basket, because a basket can only be accessed by that user, who created it.

Registered users, that have been logged-in before basket creation are not required to sent the token with subsequent requests.

Cartridge

app_sf_rest

Application

B2C Web Shop, SMB Web Shop

Product Version

7.9

Product To Version

 

Status

JSON

Request Data Format

application/json

Request related java object

com.intershop.sellside.rest.common.capi.resource.basket.BasketResource

Request Example

no request data

Response Data Format

application/json

Response related java object

com.intershop.sellside.rest.common.capi.resource.basket.BasketResource
com.intershop.component.rest.capi.resourceobject.LinkRO

Response Example

{
    "type": "Link",
    "title": "EM4KDgBeUnwAAAFBGRBMbG48",
    "uri": "PrimeTech-PrimeTechSpecials-Site/-/baskets/EM4KDgBeUnwAAAFBGRBMbG48"
}

XML

XML Request Data Format

text/xml

XML Request Java Objects

com.intershop.sellside.rest.common.capi.resource.basket.BasketResource

XML Request Example

no request data

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.sellside.rest.common.capi.resource.basket.BasketResource
com.intershop.component.rest.capi.resourceobject.LinkRO

XML Response Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Link type="Link">
    <title>vqUKDgBeQwgAAAFBHjFMbG4z</title>
    <uri>PrimeTech-PrimeTechSpecials-Site/-/baskets/vqUKDgBeQwgAAAFBHjFMbG4z</uri>
</Link>
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.

Customer Support
Knowledge Base
Product Resources
Tickets