-
Notifications
You must be signed in to change notification settings - Fork 17
Coupon_List
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
###list
Use to retrieve a list of coupons.
####Arguments
- dictionary Parameters
- Dictionary containing list_coupons parameters. Parameters -> API List Coupons
####Returns
Returns a Coupon list.
####Example Usage:
twocheckout.Api.credentials({'username':'APIuser1817037', 'password':'APIpass1817037'})
params = {
'coupon_code': 'PYTEST12'
}
coupon = twocheckout.Coupon.list(params)
print coupon####Example Response:
{
u'coupon': [
{
u'coupon_code': u'7EBHKS2',
u'date_expire': u'2099-12-10',
u'minimum_purchase': u'1.00',
u'percentage_off': None,
u'type': u'shipping',
u'value_off': None},
{
u'coupon_code': u'7EBHKVT',
u'date_expire': u'2099-12-10',
u'minimum_purchase': u'1.00',
u'percentage_off': None,
u'type': u'shipping',
u'value_off': None
},
...Please feel free to contact 2Checkout directly for assistance with your integration.