Basket

Copy

OneList Basket Save

<soapenv:Body>
    <ser:OneListSave>
        <ser:oneList>
            <ns1:CardId>10023</ns1:CardId>
            <ns1:Items>
                <ns1:OneListItem>
                    <ns1:ItemDescription>Skirt Linda Professional Wear</ns1:ItemDescription>
                    <ns1:ItemId>40020</ns1:ItemId>
                    <ns1:Quantity>2</ns1:Quantity>
                    <ns1:VariantDescription>YELLOW/38</ns1:VariantDescription>
                    <ns1:VariantId>002</ns1:VariantId>
                </ns1:OneListItem>
            </ns1:Items>
            <ns1:ListType>Basket</ns1:ListType>
            <ns1:StoreId>S0001</ns1:StoreId>
        </ser:oneList>
        <ser:calculate>true</ser:calculate>
    </ser:OneListSave>
</soapenv:Body>

Set CardId for the Member Contact. To create a basket for an anonymous user, leave CardId blank. In that case you need to store the OneList ID that will be returned or create one yourself to be able to get the basket back.

When storing a basket, a Calculate Request can be added. If Calculate is set to true, you need to add StoreId to the OneList object so LS Central can know from which store it should apply prices and discounts.

Commerce Service sends the Calculate Request to LS Central and updates the basket with the correct prices and discounts. An updated basket (OneList) is the returned after the call is completed.