Related Documents
Document Properties
Kbid283K12
Last Modified23-Jun-2020
Added to KB21-Jun-2017
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.9
  • ICM 7.10

REST API - Get all line items of the basket


Note

Starting with 7.10 our REST API is documented using Redoc accessible at docs.intershop.com.

URI

/baskets/<basket-id>/items

Http Method

GET

Short Description

Gets all line items contained in the given basket

Query Parameters

none

Example Requests

/baskets/XkoKDACqjEkAAAFCHClCMC0h/items

HTTP Status Codes

200 OK

400 Bad Request
       Possible value for header 'error-key':

    • basket.basket_id_required.error

Description

Gets a collection of all line items contained in the basket. The line items are provided as simple list without any structuring according to shipping buckets the line items are assigned to.

If the basket is not found a status code 404 is returned, otherwise - status code 200.

Cartridge

app_sf_rest

Application

B2C Web Shop, SMB Web Shop

Access Restrictions

Requires authentication with user having assigned the following permissions:

  • Purchase (APP_B2B_PURCHASE, only in B2B applications)

Product Version

7.9

Product To Version

 
Status

final

JSON

Request Data Format

Request related java object

n/a

Request Example

n/a

Response Data Format

application/json

Response related java object

com.intershop.sellside.rest.common.capi.resourceobject.basket.BasketLineItemCollectionRO
com.intershop.sellside.rest.common.capi.resourceobject.basket.BasketLineItemRO

Response Example

{
   "elements":
   [
       {
           "name": "LG 32LE3300",
           "type": "BasketLineItem",
           "id": "KorAqAJmfzUAAAFDlyEq3B6U",
           "position": 1,
           "shippingMethod":
           {
               "name": "Standard Freight Delivery",
               "type": "ShippingMethodRO",
               "id": "TRUCK",
               "description": "Standard freight delivery for large items.",
               "shippingTimeMin": 5,
               "shippingTimeMax": 7
           },
           "shipToAddress":
           {
               "type": "Address",
               "id": "yWYKABvH_2MAAAFCBFUJoPk3",
               "country": "Germany",
               "city": "Potsdam",
               "postalCode": "14482",
               "street": "Berliner Str. 20",
               "phoneHome": "049364112677",
               "firstName": "Patricia",
               "lastName": "Miller",
               "title": "Mrs.",
               "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
               "countryCode": "DE"
           },
           "variationProduct": false,
           "salesTaxes":
           [
               {
                   "name": "name",
                   "type": "AppliedTax",
                   "amount":
                   {
                       "type": "Money",
                       "value": 23.6,
                       "currencyMnemonic": "USD"
                   },
                   "rate": 0.06
               }
           ],
           "singleBasePrice":
           {
               "type": "Money",
               "value": 416.85,
               "currencyMnemonic": "USD"
           },
           "product":
           {
               "type": "Link",
               "description": "LG 32LE3300",
               "title": "4555724",
               "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/4555724"
           },
           "price":
           {
               "type": "Money",
               "value": 416.85,
               "currencyMnemonic": "USD"
           },
           "quantity":
           {
               "type": "Quantity",
               "value": 1,
               "unit": ""
           },
           "totals":
           {
               "name": "basketLineItemTotals",
               "type": "BasketLineItemTotalsRO",
               "total":
               {
                   "type": "Money",
                   "value": 416.85,
                   "currencyMnemonic": "USD"
               },
               "shippingTaxTotal":
               {
                   "type": "Money",
                   "value": 0,
                   "currencyMnemonic": "USD"
               },
               "salesTaxTotal":
               {
                   "type": "Money",
                   "value": 23.6,
                   "currencyMnemonic": "USD"
               },
               "shippingTotal":
               {
                   "type": "Money",
                   "value": 106,
                   "currencyMnemonic": "USD"
               }
           },
           "isFreeGift": false,
           "availability": true,
           "isHiddenGift": false,
           "bundleProduct": false,
           "inStock": true
       },
       {
           "name": "Asus K72 series K72F-TY011V",
           "type": "BasketLineItem",
           "id": "D9LAqAJmmP0AAAFDbSwq3B6V",
           "position": 2,
           "shippingMethod":
           {
               "name": "Standard Ground",
               "type": "ShippingMethodRO",
               "id": "STD_GROUND",
               "description": "3-7 Day Ground - Delivered to you 3-7 business days after we process your order.",
               "shippingTimeMin": 3,
               "shippingTimeMax": 7
           },
           "shipToAddress":
           {
               "type": "Address",
               "id": "yWYKABvH_2MAAAFCBFUJoPk3",
               "country": "Germany",
               "city": "Potsdam",
               "postalCode": "14482",
               "street": "Berliner Str. 20",
               "phoneHome": "049364112677",
               "firstName": "Patricia",
               "lastName": "Miller",
               "title": "Mrs.",
               "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
               "countryCode": "DE"
           },
           "variationProduct": false,
           "salesTaxes":
           [
               {
                   "name": "name",
                   "type": "AppliedTax",
                   "amount":
                   {
                       "type": "Money",
                       "value": 124.37,
                       "currencyMnemonic": "USD"
                   },
                   "rate": 0.06
               }
           ],
           "singleBasePrice":
           {
               "type": "Money",
               "value": 732.41,
               "currencyMnemonic": "USD"
           },
           "product":
           {
               "type": "Link",
               "description": "Asus K72 series K72F-TY011V",
               "title": "4776790",
               "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/4776790"
           },
           "price":
           {
               "type": "Money",
               "value": 2197.22,
               "currencyMnemonic": "USD"
           },
           "quantity":
           {
               "type": "Quantity",
               "value": 3,
               "unit": ""
           },
           "totals":
           {
               "name": "basketLineItemTotals",
               "type": "BasketLineItemTotalsRO",
               "total":
               {
                   "type": "Money",
                   "value": 2197.22,
                   "currencyMnemonic": "USD"
               },
               "shippingTaxTotal":
               {
                   "type": "Money",
                   "value": 0,
                   "currencyMnemonic": "USD"
               },
               "salesTaxTotal":
               {
                   "type": "Money",
                   "value": 124.37,
                   "currencyMnemonic": "USD"
               },
               "shippingTotal":
               {
                   "type": "Money",
                   "value": 36.78,
                   "currencyMnemonic": "USD"
               }
           },
           "isFreeGift": false,
           "availability": true,
           "isHiddenGift": false,
           "bundleProduct": false,
           "inStock": true
       }
   ],
   "type": "BasketLineItems",
   "name": "basketLineItems"
}

XML

XML Request Data Format

XML Request Java Objects

n/a

XML Request Example

n/a

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.sellside.rest.common.capi.resourceobject.basket.BasketLineItemCollectionRO
com.intershop.sellside.rest.common.capi.resourceobject.basket.BasketLineItemRO

XML Response Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<BasketLineItems name="basketLineItems" type="BasketLineItems">
  <elements>
    <BasketLineItem name="LG 32LE3300" type="BasketLineItem">
      <availability>true</availability>
      <bundleProduct>false</bundleProduct>
      <id>KorAqAJmfzUAAAFDlyEq3B6U</id>
      <inStock>true</inStock>
      <isFreeGift>false</isFreeGift>
      <isHiddenGift>false</isHiddenGift>
      <position>1</position>
      <price type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>416.85</value>
      </price>
      <product type="Link">
        <description>LG 32LE3300</description>
        <title>4555724</title>
        <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/4555724</uri>
      </product>
      <quantity type="Quantity">
        <unit>
        </unit>
        <value>1</value>
      </quantity>
      <salesTaxes>
        <AppliedTax name="name" type="AppliedTax">
          <amount type="Money">
            <currencyMnemonic>USD</currencyMnemonic>
            <value>23.60</value>
          </amount>
          <rate>0.06</rate>
        </AppliedTax>
      </salesTaxes>
      <shipToAddress type="Address">
        <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
        <city>Potsdam</city>
        <country>Germany</country>
        <countryCode>DE</countryCode>
        <firstName>Patricia</firstName>
        <id>yWYKABvH_2MAAAFCBFUJoPk3</id>
        <lastName>Miller</lastName>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <street>Berliner Str. 20</street>
        <title>Mrs.</title>
      </shipToAddress>
      <shippingMethod name="Standard Freight Delivery" type="ShippingMethodRO">
        <description>Standard freight delivery for large items.</description>
        <id>TRUCK</id>
        <name>Standard Freight Delivery</name>
        <shippingTimeMax>7</shippingTimeMax>
        <shippingTimeMin>5</shippingTimeMin>
      </shippingMethod>
      <singleBasePrice type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>416.85</value>
      </singleBasePrice>
      <totals name="basketLineItemTotals" type="BasketLineItemTotalsRO">
        <salesTaxTotal type="Money">
          <currencyMnemonic>USD</currencyMnemonic>
          <value>23.60</value>
        </salesTaxTotal>
        <shippingTaxTotal type="Money">
          <currencyMnemonic>USD</currencyMnemonic>
          <value>0.00</value>
        </shippingTaxTotal>
        <shippingTotal type="Money">
          <currencyMnemonic>USD</currencyMnemonic>
          <value>106.00</value>
        </shippingTotal>
        <total type="Money">
          <currencyMnemonic>USD</currencyMnemonic>
          <value>416.85</value>
        </total>
      </totals>
      <variationProduct>false</variationProduct>
    </BasketLineItem>
    <BasketLineItem name="Asus K72 series K72F-TY011V" type="BasketLineItem">
      <availability>true</availability>
      <bundleProduct>false</bundleProduct>
      <id>D9LAqAJmmP0AAAFDbSwq3B6V</id>
      <inStock>true</inStock>
      <isFreeGift>false</isFreeGift>
      <isHiddenGift>false</isHiddenGift>
      <position>2</position>
      <price type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>2197.22</value>
      </price>
      <product type="Link">
        <description>Asus K72 series K72F-TY011V</description>
        <title>4776790</title>
        <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/4776790</uri>
      </product>
      <quantity type="Quantity">
        <unit>
        </unit>
        <value>3</value>
      </quantity>
      <salesTaxes>
        <AppliedTax name="name" type="AppliedTax">
          <amount type="Money">
            <currencyMnemonic>USD</currencyMnemonic>
            <value>124.37</value>
          </amount>
          <rate>0.06</rate>
        </AppliedTax>
      </salesTaxes>
      <shipToAddress type="Address">
        <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
        <city>Potsdam</city>
        <country>Germany</country>
        <countryCode>DE</countryCode>
        <firstName>Patricia</firstName>
        <id>yWYKABvH_2MAAAFCBFUJoPk3</id>
        <lastName>Miller</lastName>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <street>Berliner Str. 20</street>
        <title>Mrs.</title>
      </shipToAddress>
      <shippingMethod name="Standard Ground" type="ShippingMethodRO">
        <description>3-7 Day Ground - Delivered to you 3-7 business days after we process your order.</description>
        <id>STD_GROUND</id>
        <name>Standard Ground</name>
        <shippingTimeMax>7</shippingTimeMax>
        <shippingTimeMin>3</shippingTimeMin>
      </shippingMethod>
      <singleBasePrice type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>732.41</value>
      </singleBasePrice>
      <totals name="basketLineItemTotals" type="BasketLineItemTotalsRO">
        <salesTaxTotal type="Money">
          <currencyMnemonic>USD</currencyMnemonic>
          <value>124.37</value>
        </salesTaxTotal>
        <shippingTaxTotal type="Money">
          <currencyMnemonic>USD</currencyMnemonic>
          <value>0.00</value>
        </shippingTaxTotal>
        <shippingTotal type="Money">
          <currencyMnemonic>USD</currencyMnemonic>
          <value>36.78</value>
        </shippingTotal>
        <total type="Money">
          <currencyMnemonic>USD</currencyMnemonic>
          <value>2197.22</value>
        </total>
      </totals>
      <variationProduct>false</variationProduct>
    </BasketLineItem>
  </elements>
</BasketLineItems>

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
Support Tickets