Skip to content

Runtime_WishListList_Load_Query#


This is a runtime function intended to be called client side to query customer wishlist data. Because this is a runtime (public) function no API key is required. This function requires customer authentication and returns a paginated, filtered, and sorted list of wishlists for the currently logged-in customer. The function supports filtering by wishlist title, notes, and sharing status.

Request Parameters#

Parameter Type Description
Session_Type String This will always have a hard-coded value of “runtime.” This tells Miva, no authentication is needed for the API call.
Customer_Session_ID String Passing the Customer_Session_ID in the request is required for customer authentication to access wishlist data.
Count Number Maximum lines of data allowed to be returned in the response. This limit is used to prevent excessive amounts of data return. Set to 0 for no limit.
Filter String A string for filtering returned data
Offset Number Used with the Count parameter for paginating results of large datasets. Default 0 is no offset.
Sort String The order for sorting returned data

Available Filters#

Filter
Type Description
Title String Filter wishlists by title using text search
Notes String Filter wishlists by notes content using text search
Shared Boolean Filter wishlists by sharing status (true for shared wishlists, false for private)

Supported Sort Columns#

One of these values would be passed in the sort request parameter to have the results sorted by that column.

Column
Name
Description
ID Sorts items by wishlist ID in ascending order (default)
Title Sorts items alphabetically by title
Notes Sorts items alphabetically by notes
Shared Sorts items by sharing status

Response Parameters#

Parameter Type Description
total_count Number total_count is the total number of wishlists that match your search criteria. Note: this is not always the total wishlists returned. Based on the Count and Offset parameters passed, the number of records returned could be different than the total_count.
start_offset Number Number of the starting offset number of wishlists to return. Used in conjunction with the Count parameter for paginating results of large datasets.
id Number Wishlist ID
cust_id Number Customer ID who owns the wishlist
title String Wishlist title/name
notes String Wishlist notes or description
shared Boolean true/false flag indicating if the wishlist is shared

Example Requests#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "Runtime_WishListList_Load_Query",
    "Session_Type": "runtime",
    "Customer_Session_ID": "{{Session_ID}}",
    "Count": 10,
    "Offset": 0,
    "Filter": [
        {
            "Name": "search",
            "Value": [
                {
                    "Field": "title",
                    "Operator": "SUBWRD",
                    "Value": "birthday"
                }
            ]
        }
    ],
    "Sort": "title"
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 1,
        "start_offset": 0,
        "data": [
            {
                "id": 2,
                "cust_iD": 12,
                "title": "Birthday Wishlist",
                "notes": "Items I want for my birthday this year",
                "shared": true
            }
        ]
    }
}

Error Responses#

Authentication Error:

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

Input Validation Error:

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