Skip to content
No description, website, or topics provided.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
py_tradetracker
.gitignore
README.md
README.rst
setup.py

README.md

PY Tradetracker

What is this repository for?

  • This python3 module is for easy usage of the the TradeTracker API

How do I get set up?

  • Go To Tradetracker WSDL SIte
  • On the right side you will find your Klant-ID and Toegangssleutel (client ID and access key)
  • You will need these two keys (id and key)
  • Install this script with:
    • pip3 py_tradetracker --upgrade (or pip py_nsapi --upgrade )
    • or
    • sudo -H pip3 py_tradetracker --upgrade
  • ready to use it!

Repository & Pypi

You can find the Repro at Bitbucket

and the install information on Pypi

API's

TradeTracker web services allow you to access a large number of functions that are available in the affiliate software by providing programmatic access to the data generated by the TradeTracker platform:

  • Retrieve account information
  • Retrieve campaign information
  • Retrieve transaction information
  • Generate advanced reports
  • Retrieve product feed data
  • Retrieve payment information
  • Retrieve promotion material

This python does all the work for you and returns the data in a Dictionary. You can loop through the Dict as any Dict.

You start withs

from py_tradetracker import

clientid = [your client ID]
secretkey = [your secret key]
sandbox = "true"
locale = "nl_NL"
demo = "false"

See examples about how to get information.

All api's can write warnings, errors and debug information to log files

Just use

import logging
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.DEBUG)

More information about logging

###Affiliates

Start with connection

a = Affiliates(None, clientid, secretkey, sandbox, locale, demo)

####getAffiliateSites

Returns a list of affiliate sites associated to your account.

Parameters

options type array AffiliateSiteFilter

Return values

AffiliateSite type DICT

data = a.getAffiliateSites()

More Info on this item

####getAffiliateSiteTypes

Returns a list of all affiliate site types that are being used. Parameters

NONE

Return values

AffiliateSiteTypes type DICT

data = a.getAffiliateSiteCategories()

More Info on this item

####getAffiliateSiteCategories Returns a list of campaigns available for the supplied affiliate site. Parameters

NONE

Return values

AffiliateSiteCategories type DICT

data = a.getAffiliateSiteTypes()

More Info on this item

###Campaigns start with connection

c = Campaigns(None, clientid, secretkey, sandbox, locale, demo)

####getCampaigns

Returns a list of campaigns available for the supplied affiliate site.

Parameters

affiliateSiteID type nonNegativeInteger

options type array CampaignFilter

Return values

Campaigns type dict

data = c.getCampaigns(affiliateSiteID, options)

More Info on this item

####getCampaignCategories

Returns a list of all campaign categories that are being used.

Parameters

NONE

Return values

CampaignCategories type Dict

data = c.getCampaignCategories()

More Info on this item

####getCampaignCommissionExtended

Returns extended commission information for the supplied campaign. The commission information for the various product groups is included. Parameters

NONE

Return values

CampaignCategories type dict

data = c.getCampaignCommissionExtended

More Info on this item

####changeCampaignSubscription

Parameters

Return values

data = c.changeCampaignSubscription

More Info on this item

####getCampaignNewsItems

Parameters

Return values

data = c.getCampaignNewsItems

More Info on this item

###Material

Start with connection

m = Material(None, clientid, secretkey, sandbox, locale, demo)

####getMaterialBannerDimensions Parameters

Return values

data = m.getMaterialBannerDimensions

More Info on this item

####getMaterialBannerImageItems

Parameters

Return values

data = m.getMaterialBannerImageItems

More Info on this item

####getMaterialBannerFlashItems

Parameters

Return values

data = m.getMaterialBannerFlashItems

More Info on this item

####getMaterialTextItems

Parameters

Return values

data = m.getMaterialTextItems

More Info on this item

####getMaterialHTMLItems

Parameters

Return values

data = m.getMaterialHTMLItems

More Info on this item

####getMaterialIncentiveVoucherItems

Parameters

Return values

data = m.getMaterialIncentiveVoucherItems

More Info on this item

####getMaterialIncentiveOfferItems

Parameters

Return values

data = m.getMaterialIncentiveOfferItems

More Info on this item

###Transactions

Start with connection

t = Transactions(None, clientid, secretkey, sandbox, locale, demo)

####getClickTransactions

Parameters

Return values

data = t.getClickTransactions

More Info on this item

####getConversionTransactions

Parameters

Return values

data = t.getConversionTransactions

More Info on this item

####createConversionTransaction

Parameters

Return values

data = t.createConversionTransaction

More Info on this item

###Report

Start with connection

r = Report(None, clientid, secretkey, sandbox, locale, demo)

####getReportAffiliateSite

Parameters

Return values

data = r.getReportAffiliateSite

More Info on this item

####getReportCampaign

Parameters

Return values

data = r.getReportCampaign

More Info on this item

####getReportReference

Parameters

Return values

data = r.getReportReference

More Info on this item

###ProductsFromFeed

f = Feeds(None, clientid, secretkey, sandbox, locale, demo)

####getFeeds

Parameters

Return values

data = f.getFeeds(affiliateSiteID, options)

More Info on this item

####getFeedProductCategories

Parameters

Return values

data = f.getFeedProductCategories(affiliateSiteID, feedId)

More Info on this item

####getFeedProducts

Parameters

Return values

data = f.getFeedProducts(affiliateSiteID, options)

More Info on this item

###Payments

Start with connection

o = Other(None, clientid, secretkey, sandbox, locale, demo)

####getPayments

Parameters

Return values

data = o.getPayments

More Info on this item

####getAttributions

Parameters

Return values

data = o.getAttributions

More Info on this item

####getTouchpoints

Parameters

Return values

data = o.getTouchpoints

More Info on this item

Who do I talk to?

License

Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)

You are free to:

  • Share — copy and redistribute the material in any medium or format
  • Adapt — remix, transform, and build upon the material

-The licensor cannot revoke these freedoms as long as you follow the license terms.-

Under the following terms:

  • Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • NonCommercial — You may not use the material for commercial purposes.
  • ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
You can’t perform that action at this time.