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 products.

Arguments

  • dictionary Parameters

Returns

Returns a list of Product objects.

Example Usage:

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

params = {
    'pagesize': 3
    }

product = twocheckout.Product.list(params)

Example Response:

[   
   {    
      u'approved_url': u'http://www.google.com',
      u'assigned_product_id': u'2',
      u'categories': [
         {
            u'category_id': u'33',
            u'description': None,
            u'name': u'Purses & Other Accessories',
            u'parent_id': u'3',
            u'parent_name': u'Apparel & Accessories'
         }
      ],
      u'commission': None,
      u'commission_type': None,
      u'description': u'Test Description',
      u'duration': None,
      u'handling': u'0.00',
      u'images': [],
      u'long_description': None,
      u'name': u'test',
      u'options': [],
      u'pending_url': None,
      u'price': u'0.01',
      u'product_id': u'4774387610',
      u'recurrence': None,
      u'startup_fee': None,
      u'tangible': u'1',
      u'vendor_id': u'1817037',
      u'vendor_product_id': u'test',
      u'weight': None},
   {   
      u'approved_url': u'http://www.google.com',
      u'assigned_product_id': u'3',
      u'categories': [
           {
              u'category_id': u'21',
              u'description': None,
              u'name': u'Advice & Instruction',
              u'parent_id': u'2',
              u'parent_name': u'Business Solutions & Office Products'
           }
      ],
      u'commission': None,
      u'commission_type': None,
      u'description': u'This is a test product!',
      u'duration': u'Forever',
      u'handling': u'0.00',
      u'images': [{   u'image_id': u'4828035704', u'image_number': u'1'}],
      u'long_description': None,
      u'name': u'Example Product',
      u'options': [],
      u'pending_url': None,
      u'price': u'0.01',
      u'product_id': u'4774388564',
      u'recurrence': u'1 Week',
      u'startup_fee': None,
      u'tangible': u'0',
      u'vendor_id': u'1817037',
      u'vendor_product_id': u'example123',
      u'weight': None},
   }
]