Click or drag to resize

IUCJsonOneListSave Method

Save Basket or Wish List

Namespace:  LSOmni.Service
Assembly:  LSOmni.Service (in LSOmni.Service.dll) Version: Commerce Service for LS Central 2024.6
Syntax
C#
OneList OneListSave(
	OneList oneList,
	bool calculate
)

Parameters

oneList
Type: LSRetail.Omni.Domain.DataModel.Loyalty.BasketsOneList
List Id
calculate
Type: SystemBoolean
Perform Calculation on a Basket and save result with Basket

Return Value

Type: OneList
Remarks
OneList can be saved, for both Member Contact and Anonymous Users. Member Contact can have one or more Member Cards and each Card can have one WishList and one Basket For Anonymous User, keep CardId empty and OneListSave will return OneList Id back that should be store with the session for the Anonymous user, as Commerce Service for LS Central does not store any information for Anonymous Users.

Used OneListGetById to get the OneList back.

NOTE: If no Name is provided with OneList, system will look up contact to pull the name, this can slow the process.

Examples
Sample request including minimum data needed to be able to process the request in LS Commerce
REST Sample Request
{
    "oneList": {
        "CardId": "10021",
        "Items": [{
            "Image": {
               "Id": "40020"
            },
            "ItemDescription": "Skirt Linda Professional Wear",
            "ItemId": "40020",
            "Quantity": 2,
            "VariantDescription": "YELLOW/38",
            "VariantId": "002"
        }],
        "ListType": 0,
        "Name": "Tom Tomson",
        "StoreId": "S0001"
    },
    "calculate": true
}
See Also