Skip to content

CouponPriceGroupList_Load_Query#


Description#

This function allows you to load a list of price groups assigned (or unassigned) to a coupon.

Request Parameters#

Parameter
Type Description
Coupon_ID
Coupon_Code
Edit_Coupon
Number
String
String
ID of the coupon.
Coupon code
Coupon code
assigned Boolean Defaults to true if omitted
unassigned Boolean Defaults to false if omitted
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

On Demand Columns#

This function has no on-demand columns.

Supported Search Filter Columns#

Column
Description
id The unique identifier for the coupon price group.
name The name or title of the coupon price group.
module_id Identifier for the module associated with the coupon price group.
custscope Customer scope or the range of customers the coupon applies to.
rate Rate of discount or markup applied by the coupon price group.
discount The discount percentage applied by the coupon price group.
markup The markup percentage applied by the coupon price group.
dt_start The start date for the validity of the coupon price group.
dt_end The end date for the validity of the coupon price group.
priority Priority level of the coupon price group, useful for determining which coupon takes precedence.
exclusion Indicates if the coupon price group is excluded from certain conditions or promotions.
descrip A description or additional information about the coupon price group.
display Indicates if the coupon price group is visible or displayed to customers.
qmn_subtot Minimum subtotal amount required for the coupon price group to be applicable.
qmx_subtot Maximum subtotal amount beyond which the coupon price group is not applicable.
qmn_quan Minimum quantity of items required for the coupon price group to be applicable.
qmx_quan Maximum quantity of items beyond which the coupon price group is not applicable.
qmn_weight Minimum total weight required for the coupon price group to be applicable.
qmx_weight Maximum total weight beyond which the coupon price group is not applicable.
bmn_subtot Minimum subtotal amount for which the coupon price group is applicable on a per-basket basis.
bmx_subtot Maximum subtotal amount beyond which the coupon price group is not applicable on a per-basket basis.
bmn_quan Minimum quantity of items for which the coupon price group is applicable on a per-basket basis.
bmx_quan Maximum quantity of items beyond which the coupon price group is not applicable on a per-basket basis.
bmn_weight Minimum total weight for which the coupon price group is applicable on a per-basket basis.
bmx_weight Maximum total weight beyond which the coupon price group is not applicable on a per-basket basis.

Supported Sort Columns#

One of these values would be passed in the sort request parameter to have the results sorted by that column. Value may be preceded by “-” for a descending sort.

Column
Description
id The unique identifier for the item or promotion.
name The name or title of the item or promotion.
type The type or category of the item or promotion.
module_id Identifier for the module associated with the item or promotion.
custscope Customer scope or the range of customers the item or promotion applies to.
rate Rate of discount or markup applied by the item or promotion.
discount The discount percentage applied by the item or promotion.
markup The markup percentage applied by the item or promotion.
dt_start The start date for the validity of the item or promotion.
dt_end The end date for the validity of the item or promotion.
priority Priority level of the item or promotion, useful for determining which promotion takes precedence.
exclusion Indicates if the item or promotion is excluded from certain conditions or promotions.
descrip A description or additional information about the item or promotion.
display Indicates if the item or promotion is visible or displayed to customers.
qualifying_subtotal Minimum subtotal amount required for the item or promotion to be applicable.
qualifying_quantity Minimum quantity of items required for the item or promotion to be applicable.
qualifying_weight Minimum total weight required for the item or promotion to be applicable.
basket_quantity Minimum quantity of items for which the item or promotion is applicable on a per-basket basis.
basket_subtotal Minimum subtotal amount for which the item or promotion is applicable on a per-basket basis.
basket_weight Minimum total weight for which the item or promotion is applicable on a per-basket basis.

Response Parameters#

Parameter
Type Description
total_count Number Total Product Count
start_offset Number Start Offset
id Number Price Group Id
name String Price Group Name
custscope String Customer Scope
rate String Rate
discount Number Legacy Price Group Discount
markup Number Legacy Price Group Markup
dt_start Unix Timestamp Start Time
dt_end Unix Timestamp End Time. 0 is no end time.
qmn_subtot Number Qualifying Product Minimum Subtotal
qmx_subtot Number Qualifying Product Maximum Subtotal
qmn_quan Number Qualifying Product Minimum Quantity
qmx_quan Number Qualifying Product Maximum Quantity
qmn_weight Number Qualifying Product Minimum Weight
qmx_weight Number Qualifying Product Maximum Weight
bmn_subtot Number Basket Minimum Subtotal
bmx_subtot Number Basket Maximum Subtotal
bmn_quan Number Basket Minimum Quantity
bmx_quan Number Basket Maximum Quantity
bmn_weight Number Basket Minimum Weight
bmx_weight Number Basket Maximum Weight
priority Number Priority
module Object Discount Module Use for Price Group
capabilities Object Capabilities Object
exclusion Boolean Exclusion
descrip String Description
display Boolean Boolean to display discount description in basket
assigned Boolean Assigned (true/false)

module Object#

Property Type Description
id Number Discount Module Id
code String Module Code
name String Module Name
provider String Developer who created the discount module
api_ver Number Miva API Version the Module is using
module String Relative path to the module file on the server
refcount Number Number of Price Groups which are using this discount module
active Boolean Active

capabilities Object#

Property Type Description
preitems String If true, the module implements the DiscountModule_Discount_PreItems function
items Boolean If true, the module supports discounts to individual items and must implement the DiscountModule_Discount_Items function
eligibility String Controls Admin UI
basket Boolean If true, the module supports discounts to the overall basket and must implement the DiscountModule_Discount_Basket function
shipping Boolean If true, the module supports discounts to shipping methods and must implement both the DiscountModule_Discount_Shipping and the DiscountModule_Discount_ShippingMethodList functions
qualifying Boolean Qualifying
exclusion Boolean Exclusion
descrip String Custom Basket Description Override
display Boolean Boolean to display discount description in basket
assigned Boolean Assigned (true/false)

Example Request#

{
    "Store_code": "beta",
    "Function": "CouponPriceGroupList_Load_Query",
    "Count": 0,
    "Offset": 0,
    "Coupon_Code": "20OFF",
    "Assigned": true,
    "Unassigned": false
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 2,
        "start_offset": 0,
        "data": [
            {
                "id": 2,
                "name": "Specific Sale Price",
                "custscope": "A",
                "rate": "R",
                "discount": 0.00,
                "markup": 0.00,
                "dt_start": 0,
                "dt_end": 0,
                "qmn_subtot": 0.00,
                "qmx_subtot": 0.00,
                "qmn_quan": 0,
                "qmx_quan": 0,
                "qmn_weight": 0.00,
                "qmx_weight": 0.00,
                "bmn_sub

tot": 0.00,
                "bmx_subtot": 0.00,
                "bmn_quan": 0,
                "bmx_quan": 0,
                "bmn_weight": 0.00,
                "bmx_weight": 0.00,
                "priority": 10,
                "module": {
                    "id": 189,
                    "code": "discount_saleprice",
                    "name": "Specific Sale Price",
                    "provider": "Miva Merchant",
                    "api_ver": "9.01",
                    "version": "9.1200",
                    "module": "modules\/discount\/saleprice.mvc",
                    "refcount": 1,
                    "active": true
                },
                "capabilities": {
                    "preitems": false,
                    "items": true,
                    "eligibility": "",
                    "basket": false,
                    "shipping": false,
                    "qualifying": false
                },
                "exclusion": false,
                "descrip": "",
                "display": true,
                "assigned": true
            },
            {
                "id": 1,
                "name": "Volume Pricing",
                "custscope": "X",
                "rate": "R",
                "discount": 0.00,
                "markup": 0.00,
                "dt_start": 0,
                "dt_end": 0,
                "qmn_subtot": 0.00,
                "qmx_subtot": 0.00,
                "qmn_quan": 0,
                "qmx_quan": 0,
                "qmn_weight": 0.00,
                "qmx_weight": 0.00,
                "bmn_subtot": 0.00,
                "bmx_subtot": 0.00,
                "bmn_quan": 0,
                "bmx_quan": 0,
                "bmn_weight": 0.00,
                "bmx_weight": 0.00,
                "priority": 0,
                "module": {
                    "id": 182,
                    "code": "discount_volume",
                    "name": "Volume Pricing",
                    "provider": "Miva Merchant",
                    "api_ver": "9.01",
                    "version": "9.1200",
                    "module": "modules\/discount\/volume.mvc",
                    "refcount": 1,
                    "active": true
                },
                "capabilities": {
                    "preitems": false,
                    "items": true,
                    "eligibility": "",
                    "basket": false,
                    "shipping": false,
                    "qualifying": false
                },
                "exclusion": false,
                "descrip": "",
                "display": true,
                "assigned": true
            }
        ]
    }
}