Language

2Checkout Documentation

List

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

Returns

Returns a Coupon list.

Example Usage:

twocheckout.Api.credentials({'username':'APIuser1817037', 'password':'APIpass1817037'})

params = {
    'coupon_code': 'PYTEST12'
    }

coupon = twocheckout.Coupon.list(params)

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
 },
 ...