-
Notifications
You must be signed in to change notification settings - Fork 8
Coupon_Update
Jacob McConnell edited this page Jun 11, 2014
·
1 revision
You must specify your API username and password when creating your 2checkout-node object (named ‘tco’ in these examples) before calling this method.
##Method
###update
Use to update an existing coupon.
####Arguments
- object - Object containing coupon parameters. Parameters -> API Update Coupon
- callback - Function to be called on success/error
####Returns
Response Object
####Example Usage:
args = {
coupon_code: "APIMODIFY002",
value_off: "0.02",
minimum_purchase: "0.03"
};
tco.coupons.update(args, function (error, data) {
if (error) {
console.log(error);
} else {
console.log(data.response_code);
}
});
####Example Response:
{
"coupon_code": "APIMODIFY002",
"response_code": "OK",
"response_message": "Coupon updated successfully"
}
Please feel free to contact 2Checkout directly for assistance with your integration.