CustomerPriceGroupList_Load_Query
#
Description#
This function allows you to load a list of price groups assigned (or not assigned) to a customer.
Request Body Parameters#
Parameter |
Type | Description |
---|---|---|
customer_id edit_customer customer_login |
Number String String |
The customer id The customer login The customer login |
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 |
Assigned |
Boolean | Assigned |
Unassigned |
Boolean | Unassigned |
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 | One of the following values: C = Coupon Only, X = Specific Customers, L = All Logged-in Customers, A = All Shoppers |
rate |
String | Used in Legacy Price Group to determine discount type: R = Retail, C = Cost, D = Discount from Retail, M = Markup from cost. |
discount |
Number | Legacy Price Group Discount |
markup |
Number | Legacy Price Group Markup |
dt_start |
Object | Start Time |
dt_end |
Object | 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 | Used for order in which price groups are applied |
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 | true/false if customer is assigned to Price Group |
dt_start
#
Parameter |
Type | Description |
---|---|---|
time_t |
Unix Timestamp | Start Time as a Unix Timestamp |
year |
Number | Year |
month |
Number | Month |
day |
Number | Day of week represented as a integer |
hour |
Number | Hour |
minute |
Number | Minute |
second |
Number | Second |
timezone |
Number | Number of hours before or after GMT |
dt_end
#
Parameter |
Type | Description |
---|---|---|
time_t |
Unix Timestamp | Start Time as a Unix Timestamp |
year |
Number | Year |
month |
Number | Month |
day |
Number | Day of week represented as a integer |
hour |
Number | Hour |
minute |
Number | Minute |
second |
Number | Second |
timezone |
Number | Number of hours before or after GMT |
module
#
Parameter |
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
#
Parameter |
Type | Description |
---|---|---|
preitems |
String | If true, the module implements theDiscountModule_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 | Description |
display |
Boolean | Boolean to display discount description in basket |
assigned |
Boolean | true/false if customer is assigned to Price Group |
#
Example Request
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "CustomerPriceGroupList_Load_Query",
"Count": 0,
"Offset": 0,
"Customer_Login": "bheyde",
"Assigned": true,
"Unassigned": false
}
Example Response#
{
"success": 1,
"data": {
"total_count": 1,
"start_offset": 0,
"data": [
{
"id": 2,
"name": "Wholesale Pricing",
"custscope": "X",
"rate": "R",
"discount": 0.0,
"markup": 0.0,
"dt_start": {
"time_t": 0,
"year": 1969,
"month": 12,
"day": 31,
"hour": 16,
"minute": 0,
"second": 0,
"timezone": -8
},
"dt_end": {
"time_t": 0,
"year": 1969,
"month": 12,
"day": 31,
"hour": 16,
"minute": 0,
"second": 0,
"timezone": -8
},
"qmn_subtot": 0.0,
"qmx_subtot": 0.0,
"qmn_quan": 0,
"qmx_quan": 0,
"qmn_weight": 0.0,
"qmx_weight": 0.0,
"bmn_subtot": 0.0,
"bmx_subtot": 0.0,
"bmn_quan": 0,
"bmx_quan": 0,
"bmn_weight": 0.0,
"bmx_weight": 0.0,
"priority": 0,
"module": {
"id": 87,
"code": "discount_product",
"name": "Product Discount",
"provider": "Miva Merchant",
"api_ver": "9.01",
"version": "10.0000",
"module": "modules/discount/product.mvc",
"refcount": 1,
"active": true
},
"capabilities": {
"preitems": false,
"items": true,
"eligibility": "",
"basket": false,
"shipping": false,
"qualifying": false
},
"exclusion": false,
"descrip": "",
"display": true,
"assigned": true
}
]
}
}