Skip to content

ProductKitList_Load_Query#


Description#

This function loads a list of products in a product kit.

Request Parameters#

Parameter
Type Description
product_id
Edit_Product
Product_Code
Product_SKU
Number
String
String
String
ID Number of product
Product code string
Product code string
Product SKU string
count Number Maximum lines of data allowed to be returned in the response. This limit is used to prevent excessive amounts of data return
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

Response Parameters#

Parameter
Type Description
success Boolean Boolean value indicating if the api request was successful
data Object An object containing the data returned from the request
data Array An array of objects containing product information
attr_id Number Attribute id for the product
attr_type String Attribute Type
attr_code String Attribute code
attr_prompt String Name of the attribute prompt
attmpat_id Number The attribute id number of the attribute template
option_id Number The id number of the option
option_code String The option code
option_prompt String Name of the option prompt
parts Array Array containing objects of parts within the kit
start_offset Number Used with the Count parameter for paginating results of large datasets. Default 0 is no offset.
total_count Number The total number of items returned in the product kit

parts Objects#

Parameter
Type Description
product_id Number Product Id of part
product_code String Product Code of part
product_name String Product Name of part
quantity Number Quantity of Product in part

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "ProductKitList_Load_Query",
    "Product_ID": 1,
    "Filter": "",
    "Sort": "disp_order",
    "Offset": 0,
    "Count": 39
}

Example Response#

{
    "success": 1,
    "data": {
        "data": [
            {
                "attr_id": 49,
                "attr_type": "select",
                "attr_code": "color",
                "attr_prompt": "Choose Color",
                "attmpat_id": 0,
                "option_id": 75,
                "option_code": "RED",
                "option_prompt": "RED",
                "option_disp_order": 75,
                "parts": [
                    {
                        "product_id": 21799,
                        "product_code": "testtest_red",
                        "product_name": "testtest color:red",
                        "quantity": 2
                    },
                    {
                        "product_id": 21799,
                        "product_code": "sugar_10",
                        "product_name": "Sugar size:10",
                        "quantity": 1
                    }
                ]
            },
            {
                "attr_id": 49,
                "attr_type": "select",
                "attr_code": "color",
                "attr_prompt": "Choose Color",
                "attmpat_id": 0,
                "option_id": 76,
                "option_code": "BLUE",
                "option_prompt": "BLUE",
                "option_disp_order": 76,
                "parts": [
                    {
                        "product_id": 21799,
                        "product_code": "shirt_red_medium",
                        "product_name": "Shirt color:red size:medium",
                        "quantity": 1
                    },
                    {
                        "product_id": 21799,
                        "product_code": "shirt_red_large",
                        "product_name": "Shirt color:red size:large",
                        "quantity": 1
                    },
                    {
                        "product_id": 21799,
                        "product_code": "shirt_blue_medium",
                        "product_name": "Shirt color:blue size:medium",
                        "quantity": 1
                    },
                    {
                        "product_id": 21799,
                        "product_code": "testtest_red",
                        "product_name": "testtest color:red",
                        "quantity": 1
                    }
                ]
            },
            {
                "attr_id": 49,
                "attr_type": "select",
                "attr_code": "color",
                "attr_prompt": "Choose Color",
                "attmpat_id": 0,
                "option_id": 77,
                "option_code": "BROWN",
                "option_prompt": "BROWN",
                "option_disp_order": 77,
                "parts": [
                    {
                        "product_id": 21799,
                        "product_code": "shirt_red_small",
                        "product_name": "Shirt color:red size:small",
                        "quantity": 1
                    }
                ]
            }
        ],
        "start_offset": 0,
        "total_count": 10
    }
}

Error Responses#

Error Code Error Message Error Description
MER-JSN-PRD-00070 Product not found Product id is not found