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

Miva Developer Docs

This function inserts a new price group.


Description#

This function inserts a new price group.

Request Parameters#

Parameter Type Required Description
basket_max_quantity Number No The maximum basket quantity for the price group
basket_max_subtotal Number No The maximum basket subtotal for the price group
basket_max_weight Number No The maximum basket weight for the price group
basket_min_quantity Number No The minimum basket quantity for the price group
basket_min_subtotal Number No The minimum basket subtotal for the price group
basket_min_weight Number No The minimum basket weight for the price group
customerscope String Yes The customer scope for the price group. One of C, X, L or A
datetime_end Number No The end date for the price group
datetime_start Number No The start date for the price group
description String No The description for the price group
discount String No The discount for the price group. Validated as a decimal number when rate is D
display Boolean No Boolean value indicating if the price group should be displayed
exclusion Boolean No Boolean value indicating if the price group should have exclusions
markup String No The markup for the price group. Validated as a decimal number when rate is M
module_id Number The module id number for the price group
name String Yes The name of the price group
priority Number No The priority of the price group
qualifying_max_quantity Number No The qualifying maximum quantity for the price group
qualifying_max_subtotal Number No The qualifying maximum subtotal for the price group
qualifying_max_weight Number No The qualifying maximum weight for the price group
qualifying_min_quantity Number No The qualifying minimum quantity for the price group
qualifying_min_subtotal Number No The qualifying minimum subtotal for the price group
qualifying_min_weight Number No The qualifying minimum weight for the price group
rate String No The pricing method for the price group. One of R, C, D or M

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