Skip to content

Coupon_Update#


This function allows you to update a coupon.

Request Body Parameters#

Parameter
Type Description
Coupon_ID
Coupon_Code
Edit_Coupon
Number
String
String
ID of the coupon.
Coupon code
Coupon code
Code Number Coupon code customers enter during checkout.
Description String Description of the coupon.
Customer Scope Number Scope of customers: “A” (all shoppers), “X” (specific customers), or “L” (all logged-in shoppers).
DateTime_Start Unix Timestamp Start time of the coupon. Use 0 if no start time.
DateTime_End Unix Timestamp End time of the coupon. Use 0 if no end time.
Max_Use Number Maximum times the coupon can be used. Use 0 for unlimited use.
Max_Per Number Maximum times the coupon can be used per customer. Use 0 for unlimited use.
Active Boolean Indicates if the coupon is active.

Response Parameters#

Parameter
Type Description
success Boolean Indicates if the request was successful.

Example Request#

{
    "Store_code": "beta",
    "Function": "Coupon_Update",
    "Edit_Coupon": "20OFF",
    "Code": "20OFF",
    "Description": "20 Percent Off",
    "CustomerScope": "A",
    "DateTime_Start": 0,
    "DateTime_End": 0,
    "Max_Use": 0,
    "Max_Per": 0,
    "Active": false
}

Example Response#

{
    "success": 1
}

Error Responses#

Error Code Error Message Error Description
MER-PGR-JSN-00105 Unable to load coupon: One of Coupon_ID, Edit_Coupon or Coupon_Code must be specified Missing Required Coupon Identifier