Created by potrace 1.16, written by Peter Selinger 2001-2019

Miva Developer Docs

This function will return the runtime volume pricing values for a product or variant.


Description#

This function will return the runtime volume pricing values for a product or variant.

Request Parameters#

Parameter Type Required Description
function String Yes For module level functions, this parameter will always have the value Module
module_code String The module code will always have the value discount_volume for this function
module_function String Specifies the function being executed, in this case Runtime_VolumePricing_Load_Product_Variant
session_type String This will always be runtime
Product_Code String Yes Required Code of the product
variant_id Number No Optional ID of the variant

Response Parameters#

Parameter Type Description
success Boolean Boolean value indicating if the API request was successful
low Number Value of lowest volume pricing entry
high Number Value of highest volume pricing entry
price Number The price for the low and high setting
formatted_price String The formatted price for the low and high setting

Example Request#

{
    "Store_code": "STORE_CODE",
    "Function": "Module",
    "Module_Function": "Runtime_VolumePricing_Load_Product_Variant",
    "Module_Code":"discount_volume",
    "Session_Type": "runtime",
    "Product_Code": "PRODUCT_CODE"
}

Example Response#

{
    "success": 1,
    "data": [
        {
            "low": 1,
            "high": 1,
            "price": 9.49,
            "formatted_price": "$9.49"
        },
        {
            "low": 2,
            "high": 2,
            "price": 8.43,
            "formatted_price": "$8.43"
        },
        {
            "low": 3,
            "high": 0,
            "price": 7.38,
            "formatted_price": "$7.38"
        }
    ]
}