Welcome‎ > ‎Version 3‎ > ‎Publisher Api‎ > ‎Data Structures‎ > ‎

Shopping Cart

Data Structure holding cart information based on the cart api extension methods.

Fields:
Field Data Type Nulls Description
cartName string The name of the shopper's cart.  Should be url friendly.
dateLastModified
datetime
The date the shopper last modified this cart.
items list
A collection of ShoppingCartItems.
shopperKey string

The lookup key for the shopper.
shopperType string

The type of shopper: "Unknown", "Visitor", "Profile"

ShoppingCartItem:
Field Data Type Nulls Description
offerId int The offerId of the item in the cart.
offerOptionIdintThe offer option id of the item in the cart.
quantity intThe number desired for the offer option id.
 

Sample JSON Response:
{
    "cartName": "Default_Cart",
    "dateLastModified": "/Date(1353950569000)/",
    "items": [
        {
            "offerId": 7501,
            "offerOptionId": 76012,
            "quantity": 2
        },
        {
            "offerId": 8502,
            "offerOptionId": 86023,
            "quantity": 1
        },
        {
            "offerId": 9503,
            "offerOptionId": 96024,
            "quantity": 4
        }
    ],
    "shopperKey": "ShopperKey1",
    "shopperType": "Unknown"
}



Sample XML Response:
<shoppingCart>
    <cartName>Default_Cart</cartName>
    <dateLastModified>2012-11-26T17:22:49Z</dateLastModified>
    <items>
        <shoppingCartItem>
            <offerId>7501</offerId>
            <offerOptionId>76012</offerOptionId>
            <quantity>2</quantity>
        </shoppingCartItem>
        <shoppingCartItem>
            <offerId>8502</offerId>
            <offerOptionId>86023</offerOptionId>
            <quantity>1</quantity>
        </shoppingCartItem>
        <shoppingCartItem>
            <offerId>9503</offerId>
            <offerOptionId>96024</offerOptionId>
            <quantity>4</quantity>
        </shoppingCartItem>
    </items>
    <shopperKey>ShopperKey1</shopperKey>
    <shopperType>Unknown</shopperType>
</shoppingCart>

Comments