Skip to content

CouponPriceGroup_Update_Assigned#


Description#

This function allows you to assign or unassign a coupon to a price group.

Request Body Parameters#

Parameter
Type Description
Coupon_ID
Coupon_Code
Edit_Coupon
Number
String
String
ID of the coupon.
Coupon code
Coupon code
PriceGroup_ID
PriceGroup_Code
Edit_PriceGroup
Number
String
String
ID of the Price Group.
Price Group code
Price Group code
Assigned Boolean true = assign, false = unassign

Response Parameters#

Parameter Description
success boolean value for if the request was successful

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "CouponPriceGroup_Update_Assigned",
    "Edit_Coupon_Code": "20Off",
    "Edit_PriceGroup": "Volume Pricing",
    "Assigned": true
}

Example Response#

{
    "success": 1
}

Error Responses#

error code error message
MER-PGR-JSN-00104 Coupon not found
MER-PGR-JSN-00102 Unable to load price group: One of PriceGroup_ID, Edit_PriceGroup or PriceGroup_Name must be specified