My advice would be to assess the "out of the box" tools first before attempting to "go it alone". The networks have been developing tools themselves and often they will do what you need and give you more time to get on with the marketing:
Affiliate Marketing Shopping Development Tools
Rgds