Skip to content

Runtime_BasketItemList_MoveToWishlist#


This runtime function allows a logged-in customer to move items from their basket (cart) into one of their wishlists. It supports moving:

  • All items in the basket
  • Specific items by Line_ID
  • Groups of items by Group_ID

Only one method of item selection can be used per request. The function includes full validation and detailed error reporting for items that cannot be moved. It does not require an API key, but customer authentication is mandatory.


Request Parameters#

Parameter Type Description
Session_Type String Always “runtime”. No API key needed.
Session_ID String Passing the Session_ID in the request is required for basket authentication.
Customer_Session_ID String Passing the Customer_Session_ID in the request is required for customer authentication to access wishlist data.
MoveAll Boolean If true, all basket items are moved to the wishlist. Optional.
Line_IDs Array[Int] Specific basket line item IDs to move. Optional.
Group_IDs Array[Int] Group IDs for grouped basket items to move. Optional.

Note

Exactly one of MoveAll, Line_IDs, or Group_IDs must be provided. If zero or more than one are provided, an error is returned.


Response Parameters#

Parameter Type Description
wishlistitems Array Array of successfully moved wishlist items, including full metadata
id Number ID of the wishlist item
wshlst_id Number ID of the wishlist the item was added to
parent_id Number Parent ID if the item is a child item (usually 0)
product_id Number Product ID associated with the wishlist item
quantity Number Quantity of the item moved
notes String Any notes attached to the wishlist item
dtadded Object Timestamp of when the item was added (includes date/time breakdown)

Example Request#

{
  "Store_Code": "{{Store_Code}}",
  "Function": "Runtime_BasketItemList_MoveToWishlist",
  "Session_Type": "runtime",
  "Session_ID": "{{Session_ID}}",
  "Customer_Session_ID": "{{Customer_Session_ID}}",
  "Line_IDs": [101, 103]
}
{
    "Store_Code": "{{Store_Code}}",
    "Function": "Runtime_BasketItemList_MoveToWishlist",
    "Session_Type": "runtime",
    "Session_ID": "{{Session_ID}}",
    "Customer_Session_ID": "{{Customer_Session_ID}}",
    "MoveAll": true
}

Example Response#

{
  "success": 1,
  "data": {
    "wishlistitems": [
      {
        "id": 10,
        "wshlst_id": 3,
        "parent_id": 0,
        "product_id": 11,
        "dtadded": {
          "time_t": 1748012937,
          "year": 2025,
          "month": 5,
          "day": 23,
          "hour": 8,
          "minute": 8,
          "second": 57,
          "timezone": -7
        },
        "quantity": 1,
        "notes": ""
      },
      {
        "id": 11,
        "wshlst_id": 3,
        "parent_id": 0,
        "product_id": 14,
        "dtadded": {
          "time_t": 1748012937,
          "year": 2025,
          "month": 5,
          "day": 23,
          "hour": 8,
          "minute": 8,
          "second": 57,
          "timezone": -7
        },
        "quantity": 1,
        "notes": ""
      }
    ]
  }
}

Error Responses#

Multiple Input Methods Specified:

{
  "success": 0,
  "error_code": "MER-JSN-RTM-00050",
  "error_message": "Only one of MoveAll, Line_IDs, or Group_IDs may be specified."
}

No Input Provided:

{
  "success": 0,
  "error_code": "MER-JSN-RTM-00049",
  "error_message": "One of MoveAll, Line_IDs, or Group_IDs must be specified."
}

Basket Item Load Failure:

{
  "success": 0,
  "error_code": "MER-JSN-RTM-00052",
  "error_message": "Unable to load requested Basket Item(s). Some or all of the Basket Contents may no longer be available."
}

Subscription-Required Product:

{
  "identifier": "Items[1]",
  "error_code": "MER-JSN-RTM-00055",
  "error_message": "Item 'TSHIRT-RED' requires a subscription and cannot be added to the wish list"
}

Skipped Product Error Format:

{
  "identifier": "Items[0]",
  "error_code": "MER-JSN-RTM-00053",
  "error_message": "Child items cannot be moved directly to a wish list."
}