Related Documents
Document Properties
Kbid25184E
Last Modified23-Jun-2020
Added to KB24-Sep-2013
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.6
  • ICM 7.7
  • ICM 7.8

REST API - Create a new basket (until 7.8)

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.4

Product To Version

7.8

Status

final

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