Related Documents
Document Properties
Kbid27654X
Last Modified23-Jun-2020
Added to KB29-Jun-2016
Public AccessEveryone
StatusOnline
Doc TypeReferences
ProductICM 7.8

REST API - Set basket related information (7.8)

URI

/baskets/<basket-id>

Http Method

PUT

Short Description

Sets/updates basket related data, marks the basket as recurrent and sets recurrence information

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
  • basket.recurring_not_allowed.error
  • basket.cost_center.no_customer.error
  • basket.cost_center.invalid_customer.error
  • basket.cost_center.not_found.error

Possible messages for missing attributes:

  • interval
  • startDate

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

501 Not implemented (If the recurring order feature is disabled.)

  • error.recurring_orders.disabled

503 Service Unavailable (If microservice is not available and/or cannot be discovered)

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. Alternatively, a URN of an existing address (e.g., of an address of a registered customer or a store address) may be passed to use this address if possible. Note that an existing address may only be used if it is marked as an invoice-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. Alternatively, a URN of an existing address (e.g., of an address of a registered customer or a store address) may be passed to use this address if possible. Note that an existing address may only be used if it is marked as a ship-to address.

commonShippingMethod

Promotion code: Adds one or 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.

department: Option to set the buyer's department at the basket in case of unregistered checkout.

taxationID: Option to set the buyer's taxation ID at the basket in case of unregistered checkout.

taxExempt

purchaseCurrency

dynamicMessages

externalOrderReferenceID: Option 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).

Recurrence Information: Sets the recurrence information at the basket which implicitly marks the basket as recurrent.

The following fields are required:

  • StartDate
  • Recurrence Interval

The following fields are optional:

  • EndDate
  • Number of repetitions
  • Flag if missed orders should be catched up (executeMissedOrders); if this field is not specified the default value is true.

The recurrence interval is defined as Java Period Object that supports ISO 8601. It allows numerous possibilities to set the interval. The string always starts with a "P" for period. The interval can contain a number of years (Y), months (M), weeks (W) or days (D) or any combination of them. The number is placed in front of the unit. Weeks are transformed to days by multiplying with 7-> (P4W = P28D)

Examples:

"P2Y" - 2 years, "P3M" - 3 months (quarterly), "P1M" - 1 month (monthly), "P4W" - 4 weeks (internally "P28D"), "P5D" - 5 days

Combinations are possible even if they might not might be very useful:
"P1Y2M3D" - 1 year, 2months, 3days,  "P1Y2M3W4D" - 1 year, 2 months, 3 weeks, 4 days

To remove the recurrence from the basket the interval has to be set to Zero "P0D".

If the basket already contains a quote it cannot be marked as recurrent (400 Bad Request).

Cost Center ID: A cost center can be assigned to the basket if it is required for order/requisition creation.

Cartridge

app_sf_rest, app_sf_rest_b2b

Application

B2C Web Shop, SMB Web Shop

Note

By default the subscriptions feature is disabled for the channel. 

Product Version

7.8

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

Request Example

Set shipping address:

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

Existing addresses of registered customers may also be used by passing the URN:

{ 
	"commonShipToAddress" : { 
		"urn" : "urn:address:customer:As8BcSwoiuFEEEAd3pp1Oye:Xf7AqMgoyuMAAAEs2sx0Uei" 
	} 
}

Deprecated: For compatibility reasons the UUID of the address can also be specified:

{ 
	"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 request.

Set invoice address:

{
    "invoiceToAddress": {
        "type": "Address",
        "mainDivision": "",
        "country": "Germany",
        "city": "Potsdam",
        "addressLine1": "Berliner Str. 20",
        "addressLine2": "",
        "addressLine3": "",
        "phoneMobile": "",
        "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"
    }
}

Existing addresses of registered customers may also be used by passing the URN:

{
    "invoiceToAddress": {
        "urn" : "urn:address:customer:As8BcSwoiuFEEEAd3pp1Oye:Xf7AqMgoyuMAAAEs2sx0Uei"
    }
}

Deprecated: For compatibility reasons the UUID of the address can also be specified:

{ 
	"invoiceToAddress" : { 
		"id" : "Xf7AqMgoyuMAAAEs2sx0Uei" 
	} 
}

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=="
}

Set recurrence information

{
    "recurrence" : {
        "startDate" : "2016-06-01T12:00:00+02:00",
        "endDate" : "2017-06-01T12:00:00+02:00",
        "interval" : "P3M",
        "repetitions" : 42,
        "executeMissedOrders" : false
  }
}     

Remove recurrence information

{
    "recurrence" : {
        "interval" : "P0D"
    }
}    

Set Cost Center ID

{
    "costCenterID" : "511288"
}

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",
    "costCenterID": "511288",
    "invoiceToAddress":
    {
        "type": "Address",
        "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
        "city": "Potsdam",
        "countryCode": "DE",
        "postalCode": "14482",
        "addressLine1": "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",
                "addressLine1": "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",
        "addressLine1": "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",
        "addressLine1": "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",
                "addressLine1": "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"
}

Basket with recurrence

{
  "name": "basket",
  "type": "Basket",
  "id": "VNYKDgAhh8MAAAFV2Z84uAWq",
  ...
  "recurrence": {
    "type": "Recurrence",
    "startDate": 1464775200000,
    "endDate": 1496311200000,
    "interval": "P3M",
    "repetitions": 42,
    "executeMissedOrders": false
  },
  ...
}

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>
        <phoneMobile>004917623412341</phoneMobile>
        <phoneBusiness>004915163412341</phoneBusiness>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <mainDivision>BER</mainDivision>
        <addressLine1>Berliner Str.</addressLine1>
        <addressLine2>20</addressLine2>
        <addressLine3>Downtown</addressLine3>
        <title>Mrs.</title>
    </commonShipToAddress >   
</Basket> 

or 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 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>
        <phoneMobile>004917623412341</phoneMobile>
        <phoneBusiness></phoneBusiness>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <mainDivision>BER</mainDivision>
        <addressLine1>Berliner Str. 20</addressLine1>
        <addressLine2>20</addressLine2>
        <addressLine3>Downtown</addressLine3>
        <title>Mrs.</title>
    </invoiceToAddress>   
</Basket>

or 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>

Set recurrence information

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <recurrence interval="P3M" repetitions=42 startDate="2016-06-01T12:00:00+02:00" endDate="2017-06-01T12:00:00+02:00" executeMissedOrders=false/>
</Basket>

Remove recurrence information

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <recurrence interval="P0D"/>
</Basket>

Set Cost Center ID

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
	<costCenterID>511288</costCenterID>
</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">
  <costCenterID>511288</costCenterID>
  <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>
    <addressLine1>Berliner Str. 20</addressLine1>
    <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>
        <addressLine1>Berliner Str. 20</addressLine1>
        <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>
    <addressLine1>Berliner Str. 20</addressLine1>
    <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>
    <addressLine1>Berliner Str. 20</addressLine1>
    <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>
        <addressLine1>Berliner Str. 20</addressLine1>
        <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>

Basket with recurrence

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
  <id>zP8KAB17ceUAAAFGntJqQASH</id>
  ...
  <recurrence startDate="2016-06-01T10:00:00Z" endDate="2017-06-01T10:00:00Z" interval="P3M" repetitions=42 type="Recurrence" executeMissedOrders=false/>
  ...
</Basket>

Reference - WebShop REST APIs

URI

/baskets/<basket-id>

Http Method

PUT

Short Description

Sets/updates basket related data, marks the basket as recurrent and sets recurrence information

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
  • basket.recurring_not_allowed.error
  • basket.cost_center.no_customer.error
  • basket.cost_center.invalid_customer.error
  • basket.cost_center.not_found.error

Possible messages for missing attributes:

  • interval
  • startDate

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

501 Not implemented (If the recurring order feature is disabled.)

  • error.recurring_orders.disabled

503 Service Unavailable (If microservice is not available and/or cannot be discovered)

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. Alternatively, a URN of an existing address (e.g., of an address of a registered customer or a store address) may be passed to use this address if possible. Note that an existing address may only be used if it is marked as an invoice-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. Alternatively, a URN of an existing address (e.g., of an address of a registered customer or a store address) may be passed to use this address if possible. Note that an existing address may only be used if it is marked as a ship-to address.

commonShippingMethod

Promotion code: Adds one or 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.

department: Option to set the buyer's department at the basket in case of unregistered checkout.

taxationID: Option to set the buyer's taxation ID at the basket in case of unregistered checkout.

taxExempt

purchaseCurrency

dynamicMessages

externalOrderReferenceID: Option 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).

Recurrence Information: Sets the recurrence information at the basket which implicitly marks the basket as recurrent.

The following fields are required:

  • StartDate
  • Recurrence Interval

The following fields are optional:

  • EndDate
  • Number of repetitions
  • Flag if missed orders should be catched up (executeMissedOrders); if this field is not specified the default value is true.

The recurrence interval is defined as Java Period Object that supports ISO 8601. It allows numerous possibilities to set the interval. The string always starts with a "P" for period. The interval can contain a number of years (Y), months (M), weeks (W) or days (D) or any combination of them. The number is placed in front of the unit. Weeks are transformed to days by multiplying with 7-> (P4W = P28D)

Examples:

"P2Y" - 2 years, "P3M" - 3 months (quarterly), "P1M" - 1 month (monthly), "P4W" - 4 weeks (internally "P28D"), "P5D" - 5 days

Combinations are possible even if they might not might be very useful:
"P1Y2M3D" - 1 year, 2months, 3days,  "P1Y2M3W4D" - 1 year, 2 months, 3 weeks, 4 days

To remove the recurrence from the basket the interval has to be set to Zero "P0D".

If the basket already contains a quote it cannot be marked as recurrent (400 Bad Request).

Cost Center ID: A cost center can be assigned to the basket if it is required for order/requisition creation.

Cartridge

app_sf_rest, app_sf_rest_b2b

Application

B2C Web Shop, SMB Web Shop

Note

By default the subscriptions feature is disabled for the channel. 

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:

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

Existing addresses of registered customers may also be used by passing the URN:

{ 
	"commonShipToAddress" : { 
		"urn" : "urn:address:customer:As8BcSwoiuFEEEAd3pp1Oye:Xf7AqMgoyuMAAAEs2sx0Uei" 
	} 
}

Deprecated: For compatibility reasons the UUID of the address can also be specified:

{ 
	"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 request.

Set invoice address:

{
    "invoiceToAddress": {
        "type": "Address",
        "mainDivision": "",
        "country": "Germany",
        "city": "Potsdam",
        "addressLine1": "Berliner Str. 20",
        "addressLine2": "",
        "addressLine3": "",
        "phoneMobile": "",
        "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"
    }
}

Existing addresses of registered customers may also be used by passing the URN:

{
    "invoiceToAddress": {
        "urn" : "urn:address:customer:As8BcSwoiuFEEEAd3pp1Oye:Xf7AqMgoyuMAAAEs2sx0Uei"
    }
}

Deprecated: For compatibility reasons the UUID of the address can also be specified:

{ 
	"invoiceToAddress" : { 
		"id" : "Xf7AqMgoyuMAAAEs2sx0Uei" 
	} 
}

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=="
}

Set recurrence information

{
    "recurrence" : {
        "startDate" : "2016-06-01T12:00:00+02:00",
        "endDate" : "2017-06-01T12:00:00+02:00",
        "interval" : "P3M",
        "repetitions" : 42,
        "executeMissedOrders" : false
  }
}     

Remove recurrence information

{
    "recurrence" : {
        "interval" : "P0D"
    }
}    

Set Cost Center ID

{
    "costCenterID" : "511288"
}

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",
    "costCenterID": "511288",
    "invoiceToAddress":
    {
        "type": "Address",
        "addressName": "Patricia Miller, Berliner Str. 20, Potsdam",
        "city": "Potsdam",
        "countryCode": "DE",
        "postalCode": "14482",
        "addressLine1": "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",
                "addressLine1": "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",
        "addressLine1": "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",
        "addressLine1": "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",
                "addressLine1": "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"
}

Basket with recurrence

{
  "name": "basket",
  "type": "Basket",
  "id": "VNYKDgAhh8MAAAFV2Z84uAWq",
  ...
  "recurrence": {
    "type": "Recurrence",
    "startDate": 1464775200000,
    "endDate": 1496311200000,
    "interval": "P3M",
    "repetitions": 42,
    "executeMissedOrders": false
  },
  ...
}

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>
        <phoneMobile>004917623412341</phoneMobile>
        <phoneBusiness>004915163412341</phoneBusiness>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <mainDivision>BER</mainDivision>
        <addressLine1>Berliner Str.</addressLine1>
        <addressLine2>20</addressLine2>
        <addressLine3>Downtown</addressLine3>
        <title>Mrs.</title>
    </commonShipToAddress >   
</Basket> 

or 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 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>
        <phoneMobile>004917623412341</phoneMobile>
        <phoneBusiness></phoneBusiness>
        <phoneHome>049364112677</phoneHome>
        <postalCode>14482</postalCode>
        <mainDivision>BER</mainDivision>
        <addressLine1>Berliner Str. 20</addressLine1>
        <addressLine2>20</addressLine2>
        <addressLine3>Downtown</addressLine3>
        <title>Mrs.</title>
    </invoiceToAddress>   
</Basket>

or 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>

Set recurrence information

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <recurrence interval="P3M" repetitions=42 startDate="2016-06-01T12:00:00+02:00" endDate="2017-06-01T12:00:00+02:00" executeMissedOrders=false/>
</Basket>

Remove recurrence information

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
    <recurrence interval="P0D"/>
</Basket>

Set Cost Center ID

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
	<costCenterID>511288</costCenterID>
</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">
  <costCenterID>511288</costCenterID>
  <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>
    <addressLine1>Berliner Str. 20</addressLine1>
    <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>
        <addressLine1>Berliner Str. 20</addressLine1>
        <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>
    <addressLine1>Berliner Str. 20</addressLine1>
    <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>
    <addressLine1>Berliner Str. 20</addressLine1>
    <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>
        <addressLine1>Berliner Str. 20</addressLine1>
        <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>

Basket with recurrence

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Basket name="basket" type="Basket">
  <id>zP8KAB17ceUAAAFGntJqQASH</id>
  ...
  <recurrence startDate="2016-06-01T10:00:00Z" endDate="2017-06-01T10:00:00Z" interval="P3M" repetitions=42 type="Recurrence" executeMissedOrders=false/>
  ...
</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
Tickets