Click or drag to resize

IeCommerceJsonOneListSave Method

Save Basket or Wish List

Namespace:  LSOmni.Service
Assembly:  LSOmni.Service (in LSOmni.Service.dll) Version: LS Omni 3.7.0
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 Registered Users and Anonymous Users. For Anonymous User, keep CardId and ContactId empty, and OneListSave will return OneList Id back that should be store with the session for the Anonymous user, as Omni does not store any information for Anonymous Users.

Used OneListGetById to get the OneList back.

Examples
Sample request including minimum data needed to be able to process the request in OMNI
REST Sample Request
{
  "oneList": {
    "Id": null,
    "CardId": "10021",
    "Items": [{
      "Id": null,
      "Item": {
        "Id": "40020"
            },
      "Quantity": 2,
      "VariantReg": {
        "Id": "002"
      }
        }],
    "ListType": 0,
    "StoreId": "S0001"
  },
  "calculate": true
}
See Also