Skip to content

Runtime_WishListItemList_Load_Query#


This function retrieves a paginated, filtered, and sorted list of wishlist items for a logged-in customer via a runtime function, which does not require an API key. However, the customer must be authenticated. The function supports flexible filtering (including dates, quantity, and notes), sorting, and pagination for building dynamic wishlist item UIs or API integrations.


Request Parameters#

Parameter Type Description
Session_Type String Always “runtime”. No API key needed.
Customer_Session_ID String Passing the Customer_Session_ID in the request is required for customer authentication to access wishlist data.
Wishlist_ID String Wishlist ID to add products.
Count Number Maximum number of wishlist items to return. 0 returns all.
Offset Number For pagination; skip this many records. Defaults to 0.
Sort String Sort order for the wishlist item results.
Filter Object Structured object for applying filters.

Available Filters#

Filter Field Type Description
Wshlst_ID Number Wishlist ID to filter by
Parent_ID Number Parent item ID (for nested items)
Product_ID Number Filter by associated product ID
DtAdded RFC3339 Date the item was added to the wishlist
Quantity Integer Quantity of the wishlist item
Notes String Filter by notes attached to the wishlist item

Supported Sort Columns#

The following fields can be used for sorting:

Column Name Description
ID Wishlist Item ID (default sort)
Parent_ID Parent item ID
Product_ID Associated product ID
DtAdded Date added to wishlist
Quantity Quantity
Notes Notes attached to the item

Response Parameters#

Parameter Type Description
total_count Number Total number of matching wishlist items
start_offset Number Offset used in current query (useful for pagination)
id Number Wishlist item ID
wshlst_id Number Associated wishlist ID
parent_id Number Parent Product ID
product_id Number Product ID
quantity Number Quantity of the product
notes String Any notes attached to the item
dtadded object Date and time the item was added

dtadded Object#

Parameter
Type Description
time_t Unix Timestamp Unix Timestamp for date created
year Number Year
month Number Month
day Number Day
hour Number Hour
minute Number Minute
second Number Second
timezone Number Offset from UTC

Example Request#

{
  "Store_Code": "{{Store_Code}}",
  "Function": "Runtime_WishListItemList_Load_Query",
  "Session_Type": "runtime",
  "Customer_Session_ID": "{{Customer_Session_ID}}",
  "Count": 5,
  "Offset": 0,
  "Sort": "dtadded",
  "Filter": {
    "name": "search",
    "value": [
      { "field": "product_iD", "operator": "EQ", "value": "123" },
      { "field": "quantity", "operator": "GE", "value": "2" }
    ]
  }
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 1,
        "start_offset": 0,
        "data": [
            {
                "id": 5,
                "wshlst_iD": 3,
                "parent_iD": 0,
                "product_iD": 123,
                "dtadded": {
                    "time_t": 1747951188,
                    "year": 2025,
                    "month": 5,
                    "day": 22,
                    "hour": 14,
                    "minute": 59,
                    "second": 48,
                    "timezone": -7
                },
                "quantity": 10,
                "notes": ""
            }
        ]
    }
}

Error Responses#

Authentication Requirements:

This function requires the customer to be logged in:

  • g.Basket:cust_iD must exist
  • g.Customer_Session_Verified must be true

If not, the function returns an error:

{
  "success": 0,
  "error_code": "wishlist_customer_login",
  "error_message": "You must have a customer account to load wishlist items."
}

Input Validation Error:

{
  "success": 0,
  "error_code": "MER-JSN-00001",
  "error_message": "Invalid input parameters provided."
}

Database Execution Error:

{
  "success": 0,
  "error_code": "MER-JSN-RTM-00044",
  "error_message": "Database error executing wishlist item load."
}