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

REST API - Get basket sub line item by type (until 7.8)

URI

/baskets/<basket-id>/items/<item-id>/sublineitems/<sublinetype>

Http Method

GET

Short Description

Get the sub-line type of a specific basket item.

Query Parameters

  • options
    Valid values:
      • warranty
      • giftmessage
      • giftwrap

Example Requests

/baskets/XkoKDACqjEkAAAFCHClCMC0h/items/zCYKDACqIpAAAAFCPH9OhDGN/sublineitems/warranty

or

/baskets/XkoKDACqjEkAAAFCHClCMC0h/items/zCYKDACqIpAAAAFCPH9OhDGN/sublineitems?options=warranty

HTTP Status Codes

200 OK
400 Bad Request
       Possible values for header ‘error-key’:

    • basket.basket_id_required.error
    • basket.lineitem.id_required.error
    • basket.item.sublinetype.missing_fields.error

404 Not Found
       Possible values for header ‘error-key’:

    • basket.basket_not_found.error
    • basket.item.unknown_sublinetype.error
    • basket.lineitem.not_found.error

Description

Get the sub-line type of a specific basket item. Valid types are warranty, gift wrap and gift message. If basket or basket item, or sub-line type is not found then a status code 404 is returned as a result.

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

n/a

Request Example

n/a

Response Data Format

application/json

Response related java object

com.intershop.sellside.rest.common.capi.resource.basket.BasketLineItemResource
com.intershop.sellside.rest.common.capi.resourceobject.DependentBasketLineItemRO

Response Example

Subline type: warranty

Uri: /baskets/XkoKDACqjEkAAAFCHClCMC0h/items/zCYKDACqIpAAAAFCPH9OhDGN/sublineitems/warranty

{
   "name": "dependentLineItem",
   "type": "DependentLineItem",
   "displayName": "2-year LED TV Support",
   "id": "_EwKDgAOFf0AAAFCZ5JMhFWH",
   "shortDesc": "Insurance against breakdown. Warranty period: 2 years.",
   "longDesc": "Insurance against breakdown. Warranty period: 2 years.",
   "sku": "2YLEDTVSUP",
   "subType": "WARRANTY",
   "price":
   {
       "type": "Money",
       "value": 0,
       "currencyMnemonic": "N/A"
   }
}

Subline type: gift wrap

Uri: /baskets/XkoKDACqjEkAAAFCHClCMC0h/items/zCYKDACqIpAAAAFCPH9OhDGN/sublineitems/giftwrap

{
   "name": "dependentLineItem",
   "type": "DependentLineItem",
   "displayName": "Ordinary Gift Wrap",
   "id": "MY0KDgAOi2wAAAFCL4xHoFXq",
   "shortDesc": "Ordinary wrapping paper.",
   "longDesc": "Ordinary wrapping paper suitable for almost all kinds of gifts.",
   "sku": "OrdinaryGiftWrap",
   "subType": "GIFTWRAP",
   "price":
   {
       "type": "Money",
       "value": 0,
       "currencyMnemonic": "N/A"
   }
}

Subline type: gift message

Uri: /baskets/XkoKDACqjEkAAAFCHClCMC0h/items/zCYKDACqIpAAAAFCPH9OhDGN/sublineitems/giftmessage

{
   "name": "dependentLineItem",
   "type": "DependentLineItem",
   "message": "'Hello World!'",
   "displayName": "Ordinary Gift Message",
   "id": "M8gKDgAOUEwAAAFCe.k.ZFX5",
   "from": "Patricia",
   "to": "Charles",
   "shortDesc": "An ordinary gift message card.",
   "longDesc": "An ordinary gift message card.",
   "sku": "OrdinaryGiftMessage",
   "subType": "GIFTMESSAGE",
   "price":
   {
       "type": "Money",
       "value": 0,
       "currencyMnemonic": "N/A"
   }
}

XML

XML Request Data Format

text/xml

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.resource.basket.BasketLineItemResource
com.intershop.sellside.rest.common.capi.resourceobject.DependentBasketLineItemRO

XML Response Example

Subline type: warranty

Uri: /baskets/XkoKDACqjEkAAAFCHClCMC0h/items/zCYKDACqIpAAAAFCPH9OhDGN/sublineitems/warranty

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DependentLineItem name="dependentLineItem" type="DependentLineItem">
    <displayName>2-year LED TV Support</displayName>
    <ID>_EwKDgAOFf0AAAFCZ5JMhFWH</ID>
    <longDesc>Insurance against breakdown. Warranty period: 2 years.</longDesc>
    <price type="Money">
        <currencyMnemonic>N/A</currencyMnemonic>
        <value>0.0</value>
    </price>
    <shortDesc>Insurance against breakdown. Warranty period: 2 years.</shortDesc>
    <sku>2YLEDTVSUP</sku>
    <subType>WARRANTY</subType>
</DependentLineItem>

Subline type: gift wrap

Uri: /baskets/XkoKDACqjEkAAAFCHClCMC0h/items/zCYKDACqIpAAAAFCPH9OhDGN/sublineitems/giftwrap

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DependentLineItem name="dependentLineItem" type="DependentLineItem">
    <displayName>Ordinary Gift Wrap</displayName>
    <ID>MY0KDgAOi2wAAAFCL4xHoFXq</ID>
    <longDesc>Ordinary wrapping paper suitable for almost all kinds of gifts.</longDesc>
    <price type="Money">
        <currencyMnemonic>N/A</currencyMnemonic>
        <value>0.0</value>
    </price>
    <shortDesc>Ordinary wrapping paper.</shortDesc>
    <sku>OrdinaryGiftWrap</sku>
    <subType>GIFTWRAP</subType>
</DependentLineItem>

Subline type: gift message

Uri: /baskets/XkoKDACqjEkAAAFCHClCMC0h/items/zCYKDACqIpAAAAFCPH9OhDGN/sublineitems/giftmessage

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DependentLineItem name="dependentLineItem" type="DependentLineItem">
    <displayName>Ordinary Gift Message</displayName>
    <from>Patricia</from>
    <ID>M8gKDgAOUEwAAAFCe.k.ZFX5</ID>
    <longDesc>An ordinary gift message card.</longDesc>
    <message>'Hello World!'</message>
    <price type="Money">
        <currencyMnemonic>N/A</currencyMnemonic>
        <value>0.0</value>
    </price>
    <shortDesc>An ordinary gift message card.</shortDesc>
    <sku>OrdinaryGiftMessage</sku>
    <subType>GIFTMESSAGE</subType>
    <to>Charles</to>
</DependentLineItem>

Reference - WebShop REST APIs

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