PriceGroup_Insert
Description
This function inserts a new price group.
Request Parameters
Parameter |
Type |
Description |
basket_max_quantity |
Number |
The maximum basket quantity for the price group |
basket_max_subtotal |
Number |
The maximum basket subtotal for the price group |
basket_max_weight |
Number |
The maximum basket weight for the price group |
basket_min_quantity |
Number |
The minimum basket quantity for the price group |
basket_min_subtotal |
Number |
The minimum basket subtotal for the price group |
basket_min_weight |
Number |
The minimum basket weight for the price group |
customerscope |
String |
The customer scope description for the price group |
datetime_end |
Number |
The end date for the price group |
datetime_start |
Number |
The start date for the price group |
description |
String |
The description for the price group |
discount |
Number |
The discount for the price group |
display |
Boolean |
Boolean value indicating if the price group should be displayed |
exclusion |
Boolean |
Boolean value indicating if the price group should have exclusions |
markup |
Number |
The markup for the price group |
module_id |
Number |
The module id number for the price group |
name |
String |
The name of the price group |
priority |
String |
The priority of the price group |
qualifying_max_quantity |
Number |
The qualifying maximum quantity for the price group |
qualifying_max_subtotal |
Number |
The qualifying maximum subtotal for the price group |
qualifying_max_weight |
Number |
The qualifying maximum weight for the price group |
qualifying_min_quantity |
Number |
The qualifying minimum quantity for the price group |
qualifying_min_subtotal |
Number |
The qualifying minimum subtotal for the price group |
qualifying_min_weight |
Number |
The qualifying minimum weight for the price group |
rate |
String |
The rate for the price group |
Response Parameters
Parameter |
Type |
Description |
success |
Boolean |
Boolean value indicating if the API request was successful |
id |
Number |
The id number of the price group that was inserted |
Example Request
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "PriceGroup_Insert",
"Basket_Max_Quantity": 0,
"Basket_Max_Subtotal": 0,
"Basket_Max_Weight": 0,
"Basket_Min_Quantity": 0,
"Basket_Min_Subtotal": 0,
"Basket_Min_Weight": 0,
"CustomerScope": "X",
"DateTime_End": 0,
"DateTime_Start": 0,
"Description": "",
"Discount": 0,
"Display": true,
"Exclusion": false,
"Markup": 0,
"Module_ID": 83,
"Name": "Gold",
"Priority": "0",
"Qualifying_Max_Quantity": 0,
"Qualifying_Max_Subtotal": 0,
"Qualifying_Max_Weight": 0,
"Qualifying_Min_Quantity": 0,
"Qualifying_Min_Subtotal": 0,
"Qualifying_Min_Weight": 0,
"Rate": "R"
}
Example Response
{
"success": 1,
"data": {
"id": 5
}
}
Error Responses
Error Code |
Error Message |
Error Description |
MER-JSN-00018 |
Invalid value for field ‘Name’: A price group with the name ‘Gold’ already exists |
A new price group name is required |