REST API - Set basket related information (until 7.7)

URI

/baskets/<basket-id>

Http Method

PUT

Short Description

Sets/updates basket related data.

Query Parameters

none

Example Requests

/baskets/XkoKDACqjEkAAAFCHClCMC0h

HTTP Status Codes

200 OK

400 Bad Request
       Possible values for header error-key:

    • basket.address_not_found.error
    • basket.basket_id_required.error
    • basket.invalid_address.error
    • basket.store_addresses_not_allowed.error
    • customer.address.missing_fields.error

401 Unauthorized

403 Forbidden
       Possible values for header error-key:

    • basket.login_required.error
    • basket.wrong_basket_id.error

404 Not found
       Possible values for header error-key:

    • basket.basket_not_found.error

Description

Sets following basket related data:

Common ship-to address

Sets the ship-to address for all line items of the basket.
If a complete address is specified, this address is set after validation successfully finished. If the user is logged in and the ID of an address of the user's profile is specified, the address with this ID is set. If pickup in store is enabled for the channel, the UUID of a store can also be specified to select the store as ship-to address.

Invoice-to address

Sets the invoice-to address for all line items of the basket.
If a complete address is specified, this address is set after validation successfully finished. If the user is logged in and the ID of an address of the user's profile is specified, the address with this ID is set.

Promotion code

Adds one ore more promotion code(s) to the basket. If the specified promotion code is valid, it is applied to the basket. If the promotion code is not valid, no promotion is applied. There is no validation result yet.

DepartmentOption to set the buyer's department at the basket in case of unregistered checkout.
Taxation IDOption to set buyer's taxation ID at the basket in case of unregistered checkout.
External order reference IDOption to set a buyer specific order reference ID at the basket.
Owning user

Assigns the basket to another user. It is intended to be used to transfer the basket of an anonymous user to a registered user, when the anonymous user logs-in during the checkout. In order to change the owner a valid authentication token of the new user has to be applied.

After changing the owner, the current user has no access to this basket anymore!

isMultipleShippmentSupported

Depending on the flag isMultipleShippmentSupported the shipping method can be set at the basket level:

  • isMultipleShippmentSupported = true: the shipping methods cannot be set on basket level (only at line item level)
  • isMultipleShippmentSupported = false: the shipping methods can be set on basket level (not at line item level)

Cartridge

app_sf_rest

Application

B2C Web Shop, SMB Web Shop

Product Version

7.6

Product To Version

7.7

Status

final

JSON

Request Data Format

application/json

Request related java object

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

Request Example

Set shipping address
As anonymous user:

{ 
	"commonShipToAddress" : { 
		"title" : "Mrs.", 
		"firstName" : "Patricia", 
		"lastName" : "Miller", 
		"postalCode" : "14482", 
		"email" : "patricia@test.intershop.de", 
		"street" : "Berliner Str. 20", 
		"state" : "Brandenburg", 
		"country" : "Germany", 
		"countryCode" : "DE", 
		"city" : "Potsdam" 
	} 
}

For registered users if the address has already been entered:

{ 
	"commonShipToAddress" : { 
		"id":"Xf7AqMgoyuMAAAEs2sx0Uei" 
	} 
}

The request body above can also be used to set a store as ship-to address in case pickup in store is enabled. For this to work, the UUID of the store has to be passed which can be retrieved via the REST API - Store locator (until 7.5) request.

Set invoice address:
As anonymous user:

{
    "invoiceToAddress": {
        "type": "Address",
        "state": "",
        "country": "Germany",
        "city": "Potsdam",
        "street": "Berliner Str. 20",
        "street2": "",
        "street3": "",
        "mobile": "",
        "phoneHome": "049364112677",
        "firstName": "Patricia",
        "lastName": "Miller",
        "title": "Mrs.",
        "countryCode": "DE",
        "postalCode": "14482",
        "phoneBusiness": "",
        "email": "patricia@test.intershop.de",
        "addressName": "Patricia Miller, Berliner Str. 20, Potsdam"
    }
}

For registered users if the address has already been entered:

{
    "invoiceToAddress": {
        "id": "5DIKDACqvgwAAAFCptVTzDKI"
    }
}

Set shipping method (only if isMultipleShippmentSupported = false => single shipment where shipping methods on basket level)

{
    "type":"Basket",
    "commonShippingMethod":
        {
            "type":"ShippingMethodRO",
            "name":"5-Business Day",
            "id":"STD_5DAY"
        }
}

Set promotion code

{
	"promotions" : 
	[
		{ "code" : "INTERSHOP" }
	]
}

Set department

{
	"department" : "Sales"
}

Set external order reference ID

{
	"externalOrderReferenceID" : "30000008899"
}

Set taxation ID

{
	"taxationID" : "0123456789"
}

Set new owner

{
	"newOwnerAuthenticationToken" : "standard@PBEWithMD5AndTripleDES:TCgGG/e9XL0=|Peb5Ipb5W/R+nq0Yk7GiKpf6FiKeC7yAAx9eCd6UP8N3VyGfKs/6XA=="
}

Response Data Format

application/json

Response related java object

com.intershop.sellside.rest.common.capi.resourceobject.basket.BasketRO

Response Example

isMultipleShippmentSupported = true => multiple shipment where shipping methods on line item level

{
    "name": "basket",
    "type": "Basket",
    "invoiceToAddress":
    {
        "type": "Address",
        "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
        "city": "Potsdam",
        "countryCode": "DE",
        "postalCode": "14482",
        "street": "Berliner Str. 20",
        "phoneHome": "049364112677",
        "firstName": "Patricia",
        "lastName": "Miller",
        "title": "Mrs.",
        "id": "vagKAB17gg4AAAFGSkFqQASI",
        "country": "Germany"
    },
    "purchaseCurrency": "USD",
    "salesTaxTotalsByTaxRate":
    [
        {
            "name": "name",
            "type": "AppliedTax",
            "amount":
            {
                "type": "Money",
                "currencyMnemonic": "USD",
                "value": 193.08
            },
            "rate": 19
        }
    ],
    "shippingBuckets":
    [
        {
            "name": "basketShippingBucket",
            "type": "BasketShippingBucket",
            "shippingMethod":
            {
                "name": "Standard Ground",
                "type": "BasketShippingMethod",
                "shippingTimeMin": 3,
                "shippingTimeMax": 7,
                "id": "STD_GROUND"
            },
            "shipToAddress":
            {
                "type": "Address",
                "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
                "city": "Potsdam",
                "countryCode": "DE",
                "postalCode": "14482",
                "street": "Berliner Str. 20",
                "phoneHome": "049364112677",
                "firstName": "Patricia",
                "lastName": "Miller",
                "title": "Mrs.",
                "id": "vagKAB17gg4AAAFGSkFqQASI",
                "country": "Germany"
            },
            "lineItems":
            [
                {
                    "type": "Link",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/zP8KAB17ceUAAAFGntJqQASH/items/CyQKAB17qQgAAAFG6_BqQASH",
                    "title": "Benq MD300",
                    "attributes":
                    [
                        {
                            "name": "position",
                            "type": "Integer",
                            "value": 2
                        },
                        {
                            "name": "sku",
                            "type": "String",
                            "value": "1612143"
                        }
                    ]
                },
                {
                    "type": "Link",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/zP8KAB17ceUAAAFGntJqQASH/items/OsMKAB17Fs8AAAFG1tVqQASH",
                    "title": "HP ProBook 6550b Notebook PC",
                    "attributes":
                    [
                        {
                            "name": "position",
                            "type": "Integer",
                            "value": 1
                        },
                        {
                            "name": "sku",
                            "type": "String",
                            "value": "5079807"
                        }
                    ]
                }
            ]
        }
    ],
    "shippingTaxTotalsByTaxRate":
    [
        {
            "name": "name",
            "type": "AppliedTax",
            "amount":
            {
                "type": "Money",
                "currencyMnemonic": "USD",
                "value": 2.7
            },
            "rate": 19
        }
    ],
    "totals":
    {
        "name": "basketTotals",
        "type": "BasketTotals",
        "basketTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 1226.22
        },
        "itemTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 1209.28
        },
        "basketValueRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "itemShippingRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "bucketShippingRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "dutiesAndSurchargesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "shippingTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 16.94
        },
        "taxTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 195.78
        },
        "basketShippingRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        }
    },
    "multipleShippmentsSupported": true,
    "id": "zP8KAB17ceUAAAFGntJqQASH"
}

isMultipleShippmentSupported = false => single shipment where shipping methods on basket level

{
    "name": "basket",
    "type": "Basket",
    "invoiceToAddress":
    {
        "type": "Address",
        "city": "Potsdam",
        "countryCode": "DE",
        "postalCode": "14482",
        "street": "Berliner Str. 20",
        "phoneHome": "049364112677",
        "firstName": "Patricia",
        "lastName": "Miller",
        "title": "Mrs.",
        "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
        "id": "a28KAB3RrIkAAAFGfwFjRgSD",
        "country": "Germany"
    },
    "commonShipToAddress":
    {
        "type": "Address",
        "city": "Potsdam",
        "countryCode": "DE",
        "postalCode": "14482",
        "street": "Berliner Str. 20",
        "phoneHome": "049364112677",
        "firstName": "Patricia",
        "lastName": "Miller",
        "title": "Mrs.",
        "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
        "id": "a28KAB3RrIkAAAFGfwFjRgSD",
        "country": "Germany"
    },
    "commonShippingMethod":
    {
        "name": "Standard Ground",
        "type": "ShippingMethodRO",
        "description": "3-7 Day Ground - Delivered to you 3-7 business days after we process your order.",
        "shippingTimeMax": 7,
        "shippingTimeMin": 3,
        "id": "STD_GROUND"
    },
    "purchaseCurrency": "USD",
    "multipleShippmentsSupported": false,
    "salesTaxTotalsByTaxRate":
    [
        {
            "name": "name",
            "type": "AppliedTax",
            "amount":
            {
                "type": "Money",
                "currencyMnemonic": "USD",
                "value": 193.08
            },
            "rate": 19
        }
    ],
    "shippingTaxTotalsByTaxRate":
    [
        {
            "name": "name",
            "type": "AppliedTax",
            "amount":
            {
                "type": "Money",
                "currencyMnemonic": "USD",
                "value": 2.7
            },
            "rate": 19
        }
    ],
    "shippingBuckets":
    [
        {
            "name": "basketShippingBucket",
            "type": "BasketShippingBucket",
            "shippingMethod":
            {
                "name": "Standard Ground",
                "type": "BasketShippingMethod",
                "shippingTimeMax": 7,
                "shippingTimeMin": 3,
                "id": "STD_GROUND"
            },
            "shipToAddress":
            {
                "type": "Address",
                "city": "Potsdam",
                "countryCode": "DE",
                "postalCode": "14482",
                "street": "Berliner Str. 20",
                "phoneHome": "049364112677",
                "firstName": "Patricia",
                "lastName": "Miller",
                "title": "Mrs.",
                "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
                "id": "a28KAB3RrIkAAAFGfwFjRgSD",
                "country": "Germany"
            },
            "lineItems":
            [
                {
                    "type": "Link",
                    "title": "HP ProBook 6550b Notebook PC",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/L2IKAB3Rr6YAAAFGbuhjRgSB/items/KG4KAB3RjdAAAAFGwuljRgSB",
                    "attributes":
                    [
                        {
                            "name": "position",
                            "type": "Integer",
                            "value": 1
                        },
                        {
                            "name": "sku",
                            "type": "String",
                            "value": "5079807"
                        }
                    ]
                },
                {
                    "type": "Link",
                    "title": "Benq MD300",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/L2IKAB3Rr6YAAAFGbuhjRgSB/items/yN4KAB3RUBcAAAFGZw5jRgSC",
                    "attributes":
                    [
                        {
                            "name": "position",
                            "type": "Integer",
                            "value": 2
                        },
                        {
                            "name": "sku",
                            "type": "String",
                            "value": "1612143"
                        }
                    ]
                }
            ]
        }
    ],
    "totals":
    {
        "name": "basketTotals",
        "type": "BasketTotals",
        "basketShippingRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "basketValueRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "itemTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 1209.28
        },
        "basketTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 1226.22
        },
        "itemShippingRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "bucketShippingRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "dutiesAndSurchargesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "shippingTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 16.94
        },
        "taxTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 195.78
        }
    },
    "id": "L2IKAB3Rr6YAAAFGbuhjRgSB"
}

XML

XML Request Data Format

text/xml

XML Request Java Objects

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

XML Request Example

Set shipping address
As anonymous user:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <commonShipToAddress type="Address">
        <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
        <city>Potsdam</city>
        <country>Germany</country>
        <countryCode>DE</countryCode>
        <email>patricia@test.intershop.de</email>
        <firstName>Patricia</firstName>
        <ID>kS4KABvHkwcAAAFCdL4J6CtB</ID>
        <lastName>Miller</lastName>
        <mobile>004917623412341</mobile>
        <phoneBusiness>004915163412341</phoneBusiness>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <state>BER</state>
        <street>Berliner Str.</street>
        <street2>20</street2>
        <street3>Downtown</street3>
        <title>Mrs.</title>
    </commonShipToAddress >   
</Basket> 

For registered users if the address has already been entered:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <commonShipToAddress type="Address">      
        <ID>5DIKDACqvgwAAAFCptVTzDKI</ID>
    </commonShipToAddress>   
</Basket> 

The request body above can also be used to set a store as ship-to address in case pickup in store is enabled. For this to work, the UUID of the store has to be passed which can be retrieved via the REST API - Store locator (until 7.5) request.

Set invoice address
As anonymous user:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <invoiceToAddress type="Address">
        <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
        <city>Potsdam</city>
        <country>Germany</country>
        <countryCode>DE</countryCode>
        <email>patricia@test.intershop.de</email>
        <firstName>Patricia</firstName>
        <ID>kS4KABvHkwcAAAFCdL4J6CtB</ID>
        <lastName>Miller</lastName>
        <mobile>004917623412341</mobile>
        <phoneBusiness></phoneBusiness>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <state>BER</state>
        <street>Berliner Str. 20</street>
        <street2>20</street2>
        <street3>Downtown</street3>
        <title>Mrs.</title>
    </invoiceToAddress>   
</Basket>

For registered users if the address has already been entered:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <invoiceToAddresstype="Address">      
        <ID>5DIKDACqvgwAAAFCptVTzDKI</ID>
    </invoiceToAddress>   
</Basket> 

Set shipping method (only if isMultipleShippmentSupported = false => single shipment where shipping methods on basket level)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <commonShippingMethod type ="ShippingMethodRO">
        <name>5-Business Day</name>
        <id>STD_5DAY</id>
    </commonShippingMethod>
</Basket>

Set promotion code

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <promotions>
        <PromotionLink type="PromotionLink">
            <code>INTERSHOP</code>
        </PromotionLink>
    </promotions>    
</Basket>

Set department

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <department>Sales</department>
</Basket>

Set external order reference ID

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <externalOrderReferenceID>30000008899</externalOrderReferenceID>
</Basket>

Set taxation ID

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <taxationID>9181081508155</taxationID>
</Basket>

Set new owner

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
	<newOwnerAuthenticationToken>standard@PBEWithMD5AndTripleDES:TCgGG/e9XL0=|Peb5Ipb5W/R+nq0Yk7GiKpf6FiKeC7yAAx9eCd6UP8N3VyGfKs/6XA==</newOwnerAuthenticationToken>
</Basket>

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.sellside.rest.common.capi.resourceobject.basket.BasketRO

XML Response Example

isMultipleShippmentSupported = true => multiple shipment where shipping methods on line item level

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
  <id>zP8KAB17ceUAAAFGntJqQASH</id>
  <invoiceToAddress type="Address">
    <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
    <city>Potsdam</city>
    <country>Germany</country>
    <countryCode>DE</countryCode>
    <firstName>Patricia</firstName>
    <id>vagKAB17gg4AAAFGSkFqQASI</id>
    <lastName>Miller</lastName>
    <phoneHome>049364112677</phoneHome>
    <postalCode>14482</postalCode>
    <street>Berliner Str. 20</street>
    <title>Mrs.</title>
  </invoiceToAddress>
  <multipleShippmentsSupported>true</multipleShippmentsSupported>
  <purchaseCurrency>USD</purchaseCurrency>
  <salesTaxTotalsByTaxRate>
    <AppliedTax name="name" type="AppliedTax">
      <amount type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>193.08</value>
      </amount>
      <rate>19.0</rate>
    </AppliedTax>
  </salesTaxTotalsByTaxRate>
  <shippingBuckets>
    <BasketShippingBucket name="basketShippingBucket" type="BasketShippingBucket">
      <lineItems>
        <Link type="Link">
          <attributes>
            <ResourceAttribute name="position" type="Integer">
              <value>2</value>
            </ResourceAttribute>
            <ResourceAttribute name="sku" type="String">
              <value>1612143</value>
            </ResourceAttribute>
          </attributes>
          <title>Benq MD300</title>
          <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/zP8KAB17ceUAAAFGntJqQASH/items/CyQKAB17qQgAAAFG6_BqQASH</uri>
        </Link>
        <Link type="Link">
          <attributes>
            <ResourceAttribute name="position" type="Integer">
              <value>1</value>
            </ResourceAttribute>
            <ResourceAttribute name="sku" type="String">
              <value>5079807</value>
            </ResourceAttribute>
          </attributes>
          <title>HP ProBook 6550b Notebook PC</title>
          <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/zP8KAB17ceUAAAFGntJqQASH/items/OsMKAB17Fs8AAAFG1tVqQASH</uri>
        </Link>
      </lineItems>
      <shipToAddress type="Address">
        <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
        <city>Potsdam</city>
        <country>Germany</country>
        <countryCode>DE</countryCode>
        <firstName>Patricia</firstName>
        <id>vagKAB17gg4AAAFGSkFqQASI</id>
        <lastName>Miller</lastName>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <street>Berliner Str. 20</street>
        <title>Mrs.</title>
      </shipToAddress>
      <shippingMethod name="Standard Ground" type="BasketShippingMethod">
        <id>STD_GROUND</id>
        <shippingTimeMax>7</shippingTimeMax>
        <shippingTimeMin>3</shippingTimeMin>
      </shippingMethod>
    </BasketShippingBucket>
  </shippingBuckets>
  <shippingTaxTotalsByTaxRate>
    <AppliedTax name="name" type="AppliedTax">
      <amount type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>2.70</value>
      </amount>
      <rate>19.0</rate>
    </AppliedTax>
  </shippingTaxTotalsByTaxRate>
  <totals name="basketTotals" type="BasketTotals">
    <basketShippingRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </basketShippingRebatesTotal>
    <basketTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>1226.22</value>
    </basketTotal>
    <basketValueRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.00</value>
    </basketValueRebatesTotal>
    <bucketShippingRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </bucketShippingRebatesTotal>
    <dutiesAndSurchargesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </dutiesAndSurchargesTotal>
    <itemShippingRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </itemShippingRebatesTotal>
    <itemTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>1209.28</value>
    </itemTotal>
    <shippingTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>16.94</value>
    </shippingTotal>
    <taxTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>195.78</value>
    </taxTotal>
  </totals>
</Basket>

isMultipleShippmentSupported = false => single shipment where shipping methods on basket level

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
  <commonShipToAddress type="Address">
    <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
    <city>Potsdam</city>
    <country>Germany</country>
    <countryCode>DE</countryCode>
    <firstName>Patricia</firstName>
    <id>a28KAB3RrIkAAAFGfwFjRgSD</id>
    <lastName>Miller</lastName>
    <phoneHome>049364112677</phoneHome>
    <postalCode>14482</postalCode>
    <street>Berliner Str. 20</street>
    <title>Mrs.</title>
  </commonShipToAddress>
  <commonShippingMethod 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>
  </commonShippingMethod>
  <id>L2IKAB3Rr6YAAAFGbuhjRgSB</id>
  <invoiceToAddress type="Address">
    <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
    <city>Potsdam</city>
    <country>Germany</country>
    <countryCode>DE</countryCode>
    <firstName>Patricia</firstName>
    <id>a28KAB3RrIkAAAFGfwFjRgSD</id>
    <lastName>Miller</lastName>
    <phoneHome>049364112677</phoneHome>
    <postalCode>14482</postalCode>
    <street>Berliner Str. 20</street>
    <title>Mrs.</title>
  </invoiceToAddress>
  <multipleShippmentsSupported>false</multipleShippmentsSupported>
  <purchaseCurrency>USD</purchaseCurrency>
  <salesTaxTotalsByTaxRate>
    <AppliedTax name="name" type="AppliedTax">
      <amount type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>193.08</value>
      </amount>
      <rate>19.0</rate>
    </AppliedTax>
  </salesTaxTotalsByTaxRate>
  <shippingBuckets>
    <BasketShippingBucket name="basketShippingBucket" type="BasketShippingBucket">
      <lineItems>
        <Link type="Link">
          <attributes>
            <ResourceAttribute name="position" type="Integer">
              <value>1</value>
            </ResourceAttribute>
            <ResourceAttribute name="sku" type="String">
              <value>5079807</value>
            </ResourceAttribute>
          </attributes>
          <title>HP ProBook 6550b Notebook PC</title>
          <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/L2IKAB3Rr6YAAAFGbuhjRgSB/items/KG4KAB3RjdAAAAFGwuljRgSB</uri>
        </Link>
        <Link type="Link">
          <attributes>
            <ResourceAttribute name="position" type="Integer">
              <value>2</value>
            </ResourceAttribute>
            <ResourceAttribute name="sku" type="String">
              <value>1612143</value>
            </ResourceAttribute>
          </attributes>
          <title>Benq MD300</title>
          <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/L2IKAB3Rr6YAAAFGbuhjRgSB/items/yN4KAB3RUBcAAAFGZw5jRgSC</uri>
        </Link>
      </lineItems>
      <shipToAddress type="Address">
        <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
        <city>Potsdam</city>
        <country>Germany</country>
        <countryCode>DE</countryCode>
        <firstName>Patricia</firstName>
        <id>a28KAB3RrIkAAAFGfwFjRgSD</id>
        <lastName>Miller</lastName>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <street>Berliner Str. 20</street>
        <title>Mrs.</title>
      </shipToAddress>
      <shippingMethod name="Standard Ground" type="BasketShippingMethod">
        <id>STD_GROUND</id>
        <shippingTimeMax>7</shippingTimeMax>
        <shippingTimeMin>3</shippingTimeMin>
      </shippingMethod>
    </BasketShippingBucket>
  </shippingBuckets>
  <shippingTaxTotalsByTaxRate>
    <AppliedTax name="name" type="AppliedTax">
      <amount type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>2.70</value>
      </amount>
      <rate>19.0</rate>
    </AppliedTax>
  </shippingTaxTotalsByTaxRate>
  <totals name="basketTotals" type="BasketTotals">
    <basketShippingRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </basketShippingRebatesTotal>
    <basketTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>1226.22</value>
    </basketTotal>
    <basketValueRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.00</value>
    </basketValueRebatesTotal>
    <bucketShippingRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </bucketShippingRebatesTotal>
    <dutiesAndSurchargesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </dutiesAndSurchargesTotal>
    <itemShippingRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </itemShippingRebatesTotal>
    <itemTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>1209.28</value>
    </itemTotal>
    <shippingTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>16.94</value>
    </shippingTotal>
    <taxTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>195.78</value>
    </taxTotal>
  </totals>
</Basket>

Reference - WebShop REST APIs

URI

/baskets/<basket-id>

Http Method

PUT

Short Description

Sets/updates basket related data.

Query Parameters

none

Example Requests

/baskets/XkoKDACqjEkAAAFCHClCMC0h

HTTP Status Codes

200 OK

400 Bad Request
       Possible values for header error-key:

    • basket.address_not_found.error
    • basket.basket_id_required.error
    • basket.invalid_address.error
    • basket.store_addresses_not_allowed.error
    • customer.address.missing_fields.error

401 Unauthorized

403 Forbidden
       Possible values for header error-key:

    • basket.login_required.error
    • basket.wrong_basket_id.error

404 Not found
       Possible values for header error-key:

    • basket.basket_not_found.error

Description

Sets following basket related data:

Common ship-to address

Sets the ship-to address for all line items of the basket.
If a complete address is specified, this address is set after validation successfully finished. If the user is logged in and the ID of an address of the user's profile is specified, the address with this ID is set. If pickup in store is enabled for the channel, the UUID of a store can also be specified to select the store as ship-to address.

Invoice-to address

Sets the invoice-to address for all line items of the basket.
If a complete address is specified, this address is set after validation successfully finished. If the user is logged in and the ID of an address of the user's profile is specified, the address with this ID is set.

Promotion code

Adds one ore more promotion code(s) to the basket. If the specified promotion code is valid, it is applied to the basket. If the promotion code is not valid, no promotion is applied. There is no validation result yet.

DepartmentOption to set the buyer's department at the basket in case of unregistered checkout.
Taxation IDOption to set buyer's taxation ID at the basket in case of unregistered checkout.
External order reference IDOption to set a buyer specific order reference ID at the basket.
Owning user

Assigns the basket to another user. It is intended to be used to transfer the basket of an anonymous user to a registered user, when the anonymous user logs-in during the checkout. In order to change the owner a valid authentication token of the new user has to be applied.

After changing the owner, the current user has no access to this basket anymore!

isMultipleShippmentSupported

Depending on the flag isMultipleShippmentSupported the shipping method can be set at the basket level:

  • isMultipleShippmentSupported = true: the shipping methods cannot be set on basket level (only at line item level)
  • isMultipleShippmentSupported = false: the shipping methods can be set on basket level (not at line item level)

Cartridge

app_sf_rest

Application

B2C Web Shop, SMB Web Shop

JSON

Request Data Format

application/json

Request related java object

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

Request Example

Set shipping address
As anonymous user:

{ 
	"commonShipToAddress" : { 
		"title" : "Mrs.", 
		"firstName" : "Patricia", 
		"lastName" : "Miller", 
		"postalCode" : "14482", 
		"email" : "patricia@test.intershop.de", 
		"street" : "Berliner Str. 20", 
		"state" : "Brandenburg", 
		"country" : "Germany", 
		"countryCode" : "DE", 
		"city" : "Potsdam" 
	} 
}

For registered users if the address has already been entered:

{ 
	"commonShipToAddress" : { 
		"id":"Xf7AqMgoyuMAAAEs2sx0Uei" 
	} 
}

The request body above can also be used to set a store as ship-to address in case pickup in store is enabled. For this to work, the UUID of the store has to be passed which can be retrieved via the REST API - Store locator (until 7.5) request.

Set invoice address:
As anonymous user:

{
    "invoiceToAddress": {
        "type": "Address",
        "state": "",
        "country": "Germany",
        "city": "Potsdam",
        "street": "Berliner Str. 20",
        "street2": "",
        "street3": "",
        "mobile": "",
        "phoneHome": "049364112677",
        "firstName": "Patricia",
        "lastName": "Miller",
        "title": "Mrs.",
        "countryCode": "DE",
        "postalCode": "14482",
        "phoneBusiness": "",
        "email": "patricia@test.intershop.de",
        "addressName": "Patricia Miller, Berliner Str. 20, Potsdam"
    }
}

For registered users if the address has already been entered:

{
    "invoiceToAddress": {
        "id": "5DIKDACqvgwAAAFCptVTzDKI"
    }
}

Set shipping method (only if isMultipleShippmentSupported = false => single shipment where shipping methods on basket level)

{
    "type":"Basket",
    "commonShippingMethod":
        {
            "type":"ShippingMethodRO",
            "name":"5-Business Day",
            "id":"STD_5DAY"
        }
}

Set promotion code

{
	"promotions" : 
	[
		{ "code" : "INTERSHOP" }
	]
}

Set department

{
	"department" : "Sales"
}

Set external order reference ID

{
	"externalOrderReferenceID" : "30000008899"
}

Set taxation ID

{
	"taxationID" : "0123456789"
}

Set new owner

{
	"newOwnerAuthenticationToken" : "standard@PBEWithMD5AndTripleDES:TCgGG/e9XL0=|Peb5Ipb5W/R+nq0Yk7GiKpf6FiKeC7yAAx9eCd6UP8N3VyGfKs/6XA=="
}

Response Data Format

application/json

Response related java object

com.intershop.sellside.rest.common.capi.resourceobject.basket.BasketRO

Response Example

isMultipleShippmentSupported = true => multiple shipment where shipping methods on line item level

{
    "name": "basket",
    "type": "Basket",
    "invoiceToAddress":
    {
        "type": "Address",
        "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
        "city": "Potsdam",
        "countryCode": "DE",
        "postalCode": "14482",
        "street": "Berliner Str. 20",
        "phoneHome": "049364112677",
        "firstName": "Patricia",
        "lastName": "Miller",
        "title": "Mrs.",
        "id": "vagKAB17gg4AAAFGSkFqQASI",
        "country": "Germany"
    },
    "purchaseCurrency": "USD",
    "salesTaxTotalsByTaxRate":
    [
        {
            "name": "name",
            "type": "AppliedTax",
            "amount":
            {
                "type": "Money",
                "currencyMnemonic": "USD",
                "value": 193.08
            },
            "rate": 19
        }
    ],
    "shippingBuckets":
    [
        {
            "name": "basketShippingBucket",
            "type": "BasketShippingBucket",
            "shippingMethod":
            {
                "name": "Standard Ground",
                "type": "BasketShippingMethod",
                "shippingTimeMin": 3,
                "shippingTimeMax": 7,
                "id": "STD_GROUND"
            },
            "shipToAddress":
            {
                "type": "Address",
                "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
                "city": "Potsdam",
                "countryCode": "DE",
                "postalCode": "14482",
                "street": "Berliner Str. 20",
                "phoneHome": "049364112677",
                "firstName": "Patricia",
                "lastName": "Miller",
                "title": "Mrs.",
                "id": "vagKAB17gg4AAAFGSkFqQASI",
                "country": "Germany"
            },
            "lineItems":
            [
                {
                    "type": "Link",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/zP8KAB17ceUAAAFGntJqQASH/items/CyQKAB17qQgAAAFG6_BqQASH",
                    "title": "Benq MD300",
                    "attributes":
                    [
                        {
                            "name": "position",
                            "type": "Integer",
                            "value": 2
                        },
                        {
                            "name": "sku",
                            "type": "String",
                            "value": "1612143"
                        }
                    ]
                },
                {
                    "type": "Link",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/zP8KAB17ceUAAAFGntJqQASH/items/OsMKAB17Fs8AAAFG1tVqQASH",
                    "title": "HP ProBook 6550b Notebook PC",
                    "attributes":
                    [
                        {
                            "name": "position",
                            "type": "Integer",
                            "value": 1
                        },
                        {
                            "name": "sku",
                            "type": "String",
                            "value": "5079807"
                        }
                    ]
                }
            ]
        }
    ],
    "shippingTaxTotalsByTaxRate":
    [
        {
            "name": "name",
            "type": "AppliedTax",
            "amount":
            {
                "type": "Money",
                "currencyMnemonic": "USD",
                "value": 2.7
            },
            "rate": 19
        }
    ],
    "totals":
    {
        "name": "basketTotals",
        "type": "BasketTotals",
        "basketTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 1226.22
        },
        "itemTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 1209.28
        },
        "basketValueRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "itemShippingRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "bucketShippingRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "dutiesAndSurchargesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "shippingTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 16.94
        },
        "taxTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 195.78
        },
        "basketShippingRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        }
    },
    "multipleShippmentsSupported": true,
    "id": "zP8KAB17ceUAAAFGntJqQASH"
}

isMultipleShippmentSupported = false => single shipment where shipping methods on basket level

{
    "name": "basket",
    "type": "Basket",
    "invoiceToAddress":
    {
        "type": "Address",
        "city": "Potsdam",
        "countryCode": "DE",
        "postalCode": "14482",
        "street": "Berliner Str. 20",
        "phoneHome": "049364112677",
        "firstName": "Patricia",
        "lastName": "Miller",
        "title": "Mrs.",
        "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
        "id": "a28KAB3RrIkAAAFGfwFjRgSD",
        "country": "Germany"
    },
    "commonShipToAddress":
    {
        "type": "Address",
        "city": "Potsdam",
        "countryCode": "DE",
        "postalCode": "14482",
        "street": "Berliner Str. 20",
        "phoneHome": "049364112677",
        "firstName": "Patricia",
        "lastName": "Miller",
        "title": "Mrs.",
        "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
        "id": "a28KAB3RrIkAAAFGfwFjRgSD",
        "country": "Germany"
    },
    "commonShippingMethod":
    {
        "name": "Standard Ground",
        "type": "ShippingMethodRO",
        "description": "3-7 Day Ground - Delivered to you 3-7 business days after we process your order.",
        "shippingTimeMax": 7,
        "shippingTimeMin": 3,
        "id": "STD_GROUND"
    },
    "purchaseCurrency": "USD",
    "multipleShippmentsSupported": false,
    "salesTaxTotalsByTaxRate":
    [
        {
            "name": "name",
            "type": "AppliedTax",
            "amount":
            {
                "type": "Money",
                "currencyMnemonic": "USD",
                "value": 193.08
            },
            "rate": 19
        }
    ],
    "shippingTaxTotalsByTaxRate":
    [
        {
            "name": "name",
            "type": "AppliedTax",
            "amount":
            {
                "type": "Money",
                "currencyMnemonic": "USD",
                "value": 2.7
            },
            "rate": 19
        }
    ],
    "shippingBuckets":
    [
        {
            "name": "basketShippingBucket",
            "type": "BasketShippingBucket",
            "shippingMethod":
            {
                "name": "Standard Ground",
                "type": "BasketShippingMethod",
                "shippingTimeMax": 7,
                "shippingTimeMin": 3,
                "id": "STD_GROUND"
            },
            "shipToAddress":
            {
                "type": "Address",
                "city": "Potsdam",
                "countryCode": "DE",
                "postalCode": "14482",
                "street": "Berliner Str. 20",
                "phoneHome": "049364112677",
                "firstName": "Patricia",
                "lastName": "Miller",
                "title": "Mrs.",
                "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
                "id": "a28KAB3RrIkAAAFGfwFjRgSD",
                "country": "Germany"
            },
            "lineItems":
            [
                {
                    "type": "Link",
                    "title": "HP ProBook 6550b Notebook PC",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/L2IKAB3Rr6YAAAFGbuhjRgSB/items/KG4KAB3RjdAAAAFGwuljRgSB",
                    "attributes":
                    [
                        {
                            "name": "position",
                            "type": "Integer",
                            "value": 1
                        },
                        {
                            "name": "sku",
                            "type": "String",
                            "value": "5079807"
                        }
                    ]
                },
                {
                    "type": "Link",
                    "title": "Benq MD300",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/L2IKAB3Rr6YAAAFGbuhjRgSB/items/yN4KAB3RUBcAAAFGZw5jRgSC",
                    "attributes":
                    [
                        {
                            "name": "position",
                            "type": "Integer",
                            "value": 2
                        },
                        {
                            "name": "sku",
                            "type": "String",
                            "value": "1612143"
                        }
                    ]
                }
            ]
        }
    ],
    "totals":
    {
        "name": "basketTotals",
        "type": "BasketTotals",
        "basketShippingRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "basketValueRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "itemTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 1209.28
        },
        "basketTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 1226.22
        },
        "itemShippingRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "bucketShippingRebatesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "dutiesAndSurchargesTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 0
        },
        "shippingTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 16.94
        },
        "taxTotal":
        {
            "type": "Money",
            "currencyMnemonic": "USD",
            "value": 195.78
        }
    },
    "id": "L2IKAB3Rr6YAAAFGbuhjRgSB"
}

XML

XML Request Data Format

text/xml

XML Request Java Objects

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

XML Request Example

Set shipping address
As anonymous user:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <commonShipToAddress type="Address">
        <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
        <city>Potsdam</city>
        <country>Germany</country>
        <countryCode>DE</countryCode>
        <email>patricia@test.intershop.de</email>
        <firstName>Patricia</firstName>
        <ID>kS4KABvHkwcAAAFCdL4J6CtB</ID>
        <lastName>Miller</lastName>
        <mobile>004917623412341</mobile>
        <phoneBusiness>004915163412341</phoneBusiness>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <state>BER</state>
        <street>Berliner Str.</street>
        <street2>20</street2>
        <street3>Downtown</street3>
        <title>Mrs.</title>
    </commonShipToAddress >   
</Basket> 

For registered users if the address has already been entered:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <commonShipToAddress type="Address">      
        <ID>5DIKDACqvgwAAAFCptVTzDKI</ID>
    </commonShipToAddress>   
</Basket> 

The request body above can also be used to set a store as ship-to address in case pickup in store is enabled. For this to work, the UUID of the store has to be passed which can be retrieved via the REST API - Store locator (until 7.5) request.

Set invoice address
As anonymous user:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <invoiceToAddress type="Address">
        <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
        <city>Potsdam</city>
        <country>Germany</country>
        <countryCode>DE</countryCode>
        <email>patricia@test.intershop.de</email>
        <firstName>Patricia</firstName>
        <ID>kS4KABvHkwcAAAFCdL4J6CtB</ID>
        <lastName>Miller</lastName>
        <mobile>004917623412341</mobile>
        <phoneBusiness></phoneBusiness>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <state>BER</state>
        <street>Berliner Str. 20</street>
        <street2>20</street2>
        <street3>Downtown</street3>
        <title>Mrs.</title>
    </invoiceToAddress>   
</Basket>

For registered users if the address has already been entered:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <invoiceToAddresstype="Address">      
        <ID>5DIKDACqvgwAAAFCptVTzDKI</ID>
    </invoiceToAddress>   
</Basket> 

Set shipping method (only if isMultipleShippmentSupported = false => single shipment where shipping methods on basket level)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <commonShippingMethod type ="ShippingMethodRO">
        <name>5-Business Day</name>
        <id>STD_5DAY</id>
    </commonShippingMethod>
</Basket>

Set promotion code

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <promotions>
        <PromotionLink type="PromotionLink">
            <code>INTERSHOP</code>
        </PromotionLink>
    </promotions>    
</Basket>

Set department

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <department>Sales</department>
</Basket>

Set external order reference ID

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <externalOrderReferenceID>30000008899</externalOrderReferenceID>
</Basket>

Set taxation ID

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <taxationID>9181081508155</taxationID>
</Basket>

Set new owner

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
	<newOwnerAuthenticationToken>standard@PBEWithMD5AndTripleDES:TCgGG/e9XL0=|Peb5Ipb5W/R+nq0Yk7GiKpf6FiKeC7yAAx9eCd6UP8N3VyGfKs/6XA==</newOwnerAuthenticationToken>
</Basket>

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.sellside.rest.common.capi.resourceobject.basket.BasketRO

XML Response Example

isMultipleShippmentSupported = true => multiple shipment where shipping methods on line item level

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
  <id>zP8KAB17ceUAAAFGntJqQASH</id>
  <invoiceToAddress type="Address">
    <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
    <city>Potsdam</city>
    <country>Germany</country>
    <countryCode>DE</countryCode>
    <firstName>Patricia</firstName>
    <id>vagKAB17gg4AAAFGSkFqQASI</id>
    <lastName>Miller</lastName>
    <phoneHome>049364112677</phoneHome>
    <postalCode>14482</postalCode>
    <street>Berliner Str. 20</street>
    <title>Mrs.</title>
  </invoiceToAddress>
  <multipleShippmentsSupported>true</multipleShippmentsSupported>
  <purchaseCurrency>USD</purchaseCurrency>
  <salesTaxTotalsByTaxRate>
    <AppliedTax name="name" type="AppliedTax">
      <amount type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>193.08</value>
      </amount>
      <rate>19.0</rate>
    </AppliedTax>
  </salesTaxTotalsByTaxRate>
  <shippingBuckets>
    <BasketShippingBucket name="basketShippingBucket" type="BasketShippingBucket">
      <lineItems>
        <Link type="Link">
          <attributes>
            <ResourceAttribute name="position" type="Integer">
              <value>2</value>
            </ResourceAttribute>
            <ResourceAttribute name="sku" type="String">
              <value>1612143</value>
            </ResourceAttribute>
          </attributes>
          <title>Benq MD300</title>
          <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/zP8KAB17ceUAAAFGntJqQASH/items/CyQKAB17qQgAAAFG6_BqQASH</uri>
        </Link>
        <Link type="Link">
          <attributes>
            <ResourceAttribute name="position" type="Integer">
              <value>1</value>
            </ResourceAttribute>
            <ResourceAttribute name="sku" type="String">
              <value>5079807</value>
            </ResourceAttribute>
          </attributes>
          <title>HP ProBook 6550b Notebook PC</title>
          <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/zP8KAB17ceUAAAFGntJqQASH/items/OsMKAB17Fs8AAAFG1tVqQASH</uri>
        </Link>
      </lineItems>
      <shipToAddress type="Address">
        <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
        <city>Potsdam</city>
        <country>Germany</country>
        <countryCode>DE</countryCode>
        <firstName>Patricia</firstName>
        <id>vagKAB17gg4AAAFGSkFqQASI</id>
        <lastName>Miller</lastName>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <street>Berliner Str. 20</street>
        <title>Mrs.</title>
      </shipToAddress>
      <shippingMethod name="Standard Ground" type="BasketShippingMethod">
        <id>STD_GROUND</id>
        <shippingTimeMax>7</shippingTimeMax>
        <shippingTimeMin>3</shippingTimeMin>
      </shippingMethod>
    </BasketShippingBucket>
  </shippingBuckets>
  <shippingTaxTotalsByTaxRate>
    <AppliedTax name="name" type="AppliedTax">
      <amount type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>2.70</value>
      </amount>
      <rate>19.0</rate>
    </AppliedTax>
  </shippingTaxTotalsByTaxRate>
  <totals name="basketTotals" type="BasketTotals">
    <basketShippingRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </basketShippingRebatesTotal>
    <basketTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>1226.22</value>
    </basketTotal>
    <basketValueRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.00</value>
    </basketValueRebatesTotal>
    <bucketShippingRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </bucketShippingRebatesTotal>
    <dutiesAndSurchargesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </dutiesAndSurchargesTotal>
    <itemShippingRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </itemShippingRebatesTotal>
    <itemTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>1209.28</value>
    </itemTotal>
    <shippingTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>16.94</value>
    </shippingTotal>
    <taxTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>195.78</value>
    </taxTotal>
  </totals>
</Basket>

isMultipleShippmentSupported = false => single shipment where shipping methods on basket level

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
  <commonShipToAddress type="Address">
    <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
    <city>Potsdam</city>
    <country>Germany</country>
    <countryCode>DE</countryCode>
    <firstName>Patricia</firstName>
    <id>a28KAB3RrIkAAAFGfwFjRgSD</id>
    <lastName>Miller</lastName>
    <phoneHome>049364112677</phoneHome>
    <postalCode>14482</postalCode>
    <street>Berliner Str. 20</street>
    <title>Mrs.</title>
  </commonShipToAddress>
  <commonShippingMethod 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>
  </commonShippingMethod>
  <id>L2IKAB3Rr6YAAAFGbuhjRgSB</id>
  <invoiceToAddress type="Address">
    <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
    <city>Potsdam</city>
    <country>Germany</country>
    <countryCode>DE</countryCode>
    <firstName>Patricia</firstName>
    <id>a28KAB3RrIkAAAFGfwFjRgSD</id>
    <lastName>Miller</lastName>
    <phoneHome>049364112677</phoneHome>
    <postalCode>14482</postalCode>
    <street>Berliner Str. 20</street>
    <title>Mrs.</title>
  </invoiceToAddress>
  <multipleShippmentsSupported>false</multipleShippmentsSupported>
  <purchaseCurrency>USD</purchaseCurrency>
  <salesTaxTotalsByTaxRate>
    <AppliedTax name="name" type="AppliedTax">
      <amount type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>193.08</value>
      </amount>
      <rate>19.0</rate>
    </AppliedTax>
  </salesTaxTotalsByTaxRate>
  <shippingBuckets>
    <BasketShippingBucket name="basketShippingBucket" type="BasketShippingBucket">
      <lineItems>
        <Link type="Link">
          <attributes>
            <ResourceAttribute name="position" type="Integer">
              <value>1</value>
            </ResourceAttribute>
            <ResourceAttribute name="sku" type="String">
              <value>5079807</value>
            </ResourceAttribute>
          </attributes>
          <title>HP ProBook 6550b Notebook PC</title>
          <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/L2IKAB3Rr6YAAAFGbuhjRgSB/items/KG4KAB3RjdAAAAFGwuljRgSB</uri>
        </Link>
        <Link type="Link">
          <attributes>
            <ResourceAttribute name="position" type="Integer">
              <value>2</value>
            </ResourceAttribute>
            <ResourceAttribute name="sku" type="String">
              <value>1612143</value>
            </ResourceAttribute>
          </attributes>
          <title>Benq MD300</title>
          <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/L2IKAB3Rr6YAAAFGbuhjRgSB/items/yN4KAB3RUBcAAAFGZw5jRgSC</uri>
        </Link>
      </lineItems>
      <shipToAddress type="Address">
        <addressName>Patricia Miller, Berliner Str. 20, Potsdam</addressName>
        <city>Potsdam</city>
        <country>Germany</country>
        <countryCode>DE</countryCode>
        <firstName>Patricia</firstName>
        <id>a28KAB3RrIkAAAFGfwFjRgSD</id>
        <lastName>Miller</lastName>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <street>Berliner Str. 20</street>
        <title>Mrs.</title>
      </shipToAddress>
      <shippingMethod name="Standard Ground" type="BasketShippingMethod">
        <id>STD_GROUND</id>
        <shippingTimeMax>7</shippingTimeMax>
        <shippingTimeMin>3</shippingTimeMin>
      </shippingMethod>
    </BasketShippingBucket>
  </shippingBuckets>
  <shippingTaxTotalsByTaxRate>
    <AppliedTax name="name" type="AppliedTax">
      <amount type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>2.70</value>
      </amount>
      <rate>19.0</rate>
    </AppliedTax>
  </shippingTaxTotalsByTaxRate>
  <totals name="basketTotals" type="BasketTotals">
    <basketShippingRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </basketShippingRebatesTotal>
    <basketTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>1226.22</value>
    </basketTotal>
    <basketValueRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.00</value>
    </basketValueRebatesTotal>
    <bucketShippingRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </bucketShippingRebatesTotal>
    <dutiesAndSurchargesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </dutiesAndSurchargesTotal>
    <itemShippingRebatesTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>0.0</value>
    </itemShippingRebatesTotal>
    <itemTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>1209.28</value>
    </itemTotal>
    <shippingTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>16.94</value>
    </shippingTotal>
    <taxTotal type="Money">
      <currencyMnemonic>USD</currencyMnemonic>
      <value>195.78</value>
    </taxTotal>
  </totals>
</Basket>

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