-
Notifications
You must be signed in to change notification settings - Fork 8
Coupon_Retrieve
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
###retrieve
Use to retrieve a coupon.
####Arguments
- object - Object containing coupon parameters. Parameters -> API Detail Coupon
- callback - Function to be called on success/error
####Returns
Single Coupon Object.
####Example Usage:
args = {
coupon_code: 4631234571
};
tco.coupons.retrieve(args, function (error, data) {
if (error) {
console.log(error);
} else {
console.log(data.response_code);
}
});####Example Response:
{
"coupon": {
"coupon_code": "APITEST002",
"date_expire": "2012-12-31",
"minimum_purchase": "5.00",
"percentage_off": "5",
"product": [
{
"product_id": "0",
"product_url": "https://www.2checkout.com/api/products/detail_product?product_id=0"
}
],
"type": "sale",
"value_off": null
},
"response_code": "OK",
"response_message": "Coupon detail retrieved successfully."
}Please feel free to contact 2Checkout directly for assistance with your integration.