Skip to content

RelatedProductList_Load_Query#


Description#

This function loads a list of related products by product id.

Request Parameters#

Parameter
Type Description
assigned Boolean Boolean value indicating if the query returns currently assigned related products
unassigned Boolean Boolean value indicating if the query returns unassigned related products
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
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

Response Parameters#

Parameter
Type Description
success Boolean Boolean value indicating if the API request was successful
total_count Number The number of related products returned
start_offset Number The offset starting point for pagination of return data
assigned Boolean Boolean value indicating if the related product is currently assigned to the product
id Number The related product id
code String The related product code
sku String The related product sku
name String The related product name
thumbnail String The filepath for the related product thumbnail
image String The filepath for the related product image
price Number The price of the related product
formatted_price String Currency formatted price of the related product
cost Number The related product cost
formatted_cost String Currency formatted related product cost
weight Number The related product weight
taxable Boolean Boolean value indicating if the related product is taxable
active Boolean Boolean value indicating if the related product is active
page_title String The title of the related product page
dt_created Number Unix timestamp for the related product creation date
dt_Updated Number Unix timestamp for the related product’s most recent update

Example Request#

{
    "Store_code": "beta",
    "Function": "RelatedProductList_Load_Query",
    "Assigned": true,
    "Count": 42,
    "Filter": "",
    "Offset": 0,
    "Product_ID": 1,
    "Sort": "disp_order",
    "Unassigned": true
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 214,
        "start_offset": 0,
        "data": [
            {
                "assigned": false,
                "id": 2,
                "code": "59535-4601",
                "sku": "53208-377",
                "name": "Pastry - Key Limepoppy Seed Tea",
                "thumbnail": "",
                "image": "",
                "price": 20.45,
                "formatted_price": "$20.45",
                "cost": 74.11,
                "formatted_cost": "$74.11",
                "weight": 10.0,
                "taxable": true,
                "active": true,
                "page_title": "",
                "dt_created": 1623690274,
                "dt_Updated": 1623690274
            },
            {
                "assigned": false,
                "id": 3,
                "code": "60232-2283",
                "sku": "55910-397",
                "name": "White Baguette",
                "thumbnail": "",
                "image": "",
                "price": 195.65,
                "formatted_price": "$195.65",
                "cost": 135.52,
                "formatted_cost": "$135.52",
                "weight": 5.0,
                "taxable": true,
                "active": true,
                "page_title": "",
                "dt_created": 1623690274,
                "dt_Updated": 1631638720
            }
        ]
    }
}