-
Notifications
You must be signed in to change notification settings - Fork 17
Coupon_Find
Jacob McConnell edited this page Jun 9, 2014
·
2 revisions
You must specify your API username and password using the twocheckout.Api.credentials
method before calling a method in this class.
##Methods
###find
Use to retrieve a coupon object.
####Arguments
- dictionary Parameters
- Dictionary containing a
coupon_code
. Parameters -> API Detail Coupon
####Returns
Returns a Coupon object.
####Example Usage:
twocheckout.Api.credentials({'username':'APIuser1817037', 'password':'APIpass1817037'})
params = {
'coupon_code': 'PYTEST12'
}
coupon = twocheckout.Coupon.find(params)
print coupon
####Example Response:
{
'coupon_code': 'PYTEST12',
'date_expire': '2020-12-12',
'minimum_purchase': '0.00',
'percentage_off': None,
'product': [
{
'product_id': '0',
'product_url': 'https://www.2checkout.com/api/products/detail_product?product_id=0'
}
],
'type': 'shipping',
'value_off': None
}
Please feel free to contact 2Checkout directly for assistance with your integration.