Results 1 to 8 of 8

 

Thread: Affiliate Window API Help Please

  1. #1
    Registered User

    Status
    Offline
    Join Date
    Jun 2009
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts


    Hi All,

    i signed up to the affiliate window API today but i know nothing of SOAP and an relly struggling with using the service.

    i have downloaded the documentation and the php API client and have entered my id and pword in the constants.inc file but thats as far as ive got,

    could someone please help me understand this service and how i can start making requests

    thank you
    Luke

  2. #2
    Registered User

    Status
    Offline
    Join Date
    Nov 2007
    Posts
    51
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Hi Luke,

    I'm Adrian, the Technical Manager over at ShopWindow. Please drop me an email with your affiliate details and any other initial information you can provide such as what/how you're planning to build using our ProductServe API etc... We can take it from there...

    Kind regards,

    Adrian (adrian.botelho@shopwindow.com)
    Adrian Botelho – Technical Account Director Affiliate Window
    Email:- adrian.botelho@shopwindow.com Phone:- 020 7553 0391

  3. #3
    Registered User

    Status
    Offline
    Join Date
    Jun 2009
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Adrian,

    have send an email

    thanks
    Luke

  4. #4
    Registered User

    Status
    Offline
    Join Date
    Jul 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I need to develop an application in asp.net platform using Api

    The Api requires Soap header authentication ,to which i have little knowledge

    Please help me in this regard .Any code sample in Asp.net would be great


    thanks in advance

  5. #5
    Registered User

    Status
    Offline
    Join Date
    Mar 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by dhiraj_dev View Post
    I need to develop an application in asp.net platform using Api

    The Api requires Soap header authentication ,to which i have little knowledge

    Please help me in this regard .Any code sample in Asp.net would be great


    thanks in advance
    Getting the Affiliate Window Api to work in .net is certainly a bit of a challenge. I used the AffiliateService API as I wanted to get hold of commission details (I haven't completed this work but I am making progress). First go to the URL
    http://api.affiliatewindow.com/v3/AffiliateService?wsdl and download this file somewhere on your drive - normally when creating a web service you can just point at the url and discover the services that are ready - in this case however that doesnt work.

    Then in your .net application Right click References and add a web reference (if you dont see web reference add a service reference first and then click advanced to get the web reference dialog box.

    Where it says URL (for web address) instead in here put c:\downloads\affiliateService.wsdl (or wherever you saved it). This will allow the wsdl to be created. If you dont do it this way the .net will not correctly cope with the :soapenc that aw places on arrays.

    Fill in a sensible name for the web reference name (up to you of course but I kept it in line with the product service api and named mine com.affiliateservice.com.core.v3

    then When you have built your Reference.map and it compiles...

    Add a suitable using statement to make life easier in your code

    using com.affiliateservice.com.core.v3;
    .
    .
    .
    private void GetAW()
    {
    const string affiliateApiPassword = "YOUR48digitAffiliateServiceAPIKey";

    // NB there are keys for datafeed, productservice and affiliateservice so make sure you pick the right one for the right service

    var aw = new ApiService
    {
    UserAuthenticationValue = new UserAuthentication
    {
    iId = YOURAWID,
    sPassword = affiliateApiPassword,
    sType = UserType.affiliate
    }
    };

    // obvious fill in your dates etc...
    var transactionList = new getTransactionList
    {
    dStartDate = new DateTime(2011, 02, 01, 0, 0, 0, 0),
    dEndDate = new DateTime(2011, 02, 28, 23, 59, 59, 999),
    sDateType = DateType.transaction
    };

    // bit of XML craziness - because we have a namespace.. we have to create a document so that we can create a name space manager
    var document = new XmlDocument();

    // then add the namespace manager
    var manager = new XmlNamespaceManager(document.NameTable);

    // then add the aw namespace
    manager.AddNamespace("ns1", "http://api.affiliatewindow.com/");

    // Get the list of transactions
    getTransactionListResponse response = aw.getTransactionList(transactionList);

    // Did we get a resposnse
    if (response != null)
    {
    // Have we got a transaction list returned?
    if (response.getTransactionListReturn != null)
    {
    // yes, so Get the XML element array
    ArrayOfTransaction z = response.getTransactionListReturn;
    foreach (XmlElement thunk in z.Any)
    {
    // These are the transaction data type fields
    // iId

    XmlNode xmlNode = thunk.SelectSingleNode("//ns1:iId", manager);
    if (xmlNode != null)
    {
    string aa = xmlNode.InnerText;
    }

    .
    .
    // up to you from this point you can select which fields you want to deal with etc..
    // sStatus
    // sType
    // sIp
    // bPaid
    // iPaymentId
    // sDeclinedReason
    // iMerchantId
    // fSaleAmount
    // fCommissionAmount
    // dClickDate
    // dTransactionDate
    // dValidationDate
    // sClickRef
    // sSearchSiteName
    // sSearchSiteKeyword
    // aTransactionParts (node with other items in it)
    xmlNode = thunk.SelectSingleNode("//ns1:aTransactionParts", manager);
    if(xmlNode!=null)
    {
    // This is another node that contains a ns1:TransactionPart
    // sCommissionGroupName
    // fSaleAmount
    // iCommission
    // sCommissionType
    string aa = xmlNode.InnerXml;

    // SelectSingleNode or ignore - up to what you want to do of course
    }

    }
    }
    }
    }

    // In summary using with .net is bloody awkward and difficult. The generated WSDL does not generate nice .net classes.

    They are not set up for Open or WS-I compliant web services as they are geared towards php only

  6. #6
    shaunyb's Avatar

    Status
    Offline
    Join Date
    Mar 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Julian,

    Did you get your code working? I keep getting user authentication errors, even though i know my username/password is correct.

    My Code is

    **********************************************

    Imports AffiliateWindow2.AffiliateWindowApi
    Imports System.Xml

    Module Module1

    Sub Main()

    Dim aw As New ApiService

    Dim UserAuthenticationValue = New UserAuthentication

    UserAuthenticationValue.iId = "101XXX"
    UserAuthenticationValue.sPassword = "XXXXXX"
    UserAuthenticationValue.sType = UserType.affiliate

    Dim transactionList As New getTransactionList


    transactionList.dStartDate = New DateTime(2011, 10, 1, 0, 0, 0, 0)
    transactionList.dEndDate = New DateTime(2011, 10, 31, 23, 59, 59, 999)
    transactionList.sDateType = DateType.transaction


    Dim document As New XmlDocument

    Dim manager As New XmlNamespaceManager(document.NameTable)
    manager.AddNamespace("ns1", "http://api.affiliatewindow.com/")

    Dim response As getTransactionListResponse = aw.getTransactionList(transactionList)


    Console.WriteLine(response.getTransactionListCount Return)

    Console.ReadLine()







    End Sub

    End Module

    ************************************************** ******

    I keep getting the error on Dim response As getTransactionListResponse = aw.getTransactionList(transactionList) line.

    If you have time to take a look that would be most appreciated.

    Thanks

    Shaun

  7. #7
    Registered User

    Status
    Offline
    Join Date
    Feb 2011
    Posts
    17
    Thanks
    0
    Thanked 1 Time in 1 Post
    If you still looking try - the change is highlighted and underlined


    Imports AffiliateWindow2.AffiliateWindowApi
    Imports System.Xml

    Module Module1

    Sub Main()

    Dim aw As New ApiService

    Dim UserAuthenticationValue = New UserAuthentication

    UserAuthenticationValue.iId = "101XXX"
    UserAuthenticationValue.sPassword = "XXXXXX"
    UserAuthenticationValue.sType = UserType.affiliate

    aw.UserAuthenticationValue = UserAuthenticationValue

    Dim transactionList As New getTransactionList


    transactionList.dStartDate = New DateTime(2011, 10, 1, 0, 0, 0, 0)
    transactionList.dEndDate = New DateTime(2011, 10, 31, 23, 59, 59, 999)
    transactionList.sDateType = DateType.transaction


    Dim document As New XmlDocument

    Dim manager As New XmlNamespaceManager(document.NameTable)
    manager.AddNamespace("ns1", "http://api.affiliatewindow.com/")

    Dim response As getTransactionListResponse = aw.getTransactionList(transactionList)


    Console.WriteLine(response.getTransactionListCount Return)

    Console.ReadLine()

    Quote Originally Posted by shaunyb View Post
    Hi Julian,

    Did you get your code working? I keep getting user authentication errors, even though i know my username/password is correct.

    My Code is

    **********************************************

    Imports AffiliateWindow2.AffiliateWindowApi
    Imports System.Xml

    Module Module1

    Sub Main()

    Dim aw As New ApiService

    Dim UserAuthenticationValue = New UserAuthentication

    UserAuthenticationValue.iId = "101XXX"
    UserAuthenticationValue.sPassword = "XXXXXX"
    UserAuthenticationValue.sType = UserType.affiliate

    Dim transactionList As New getTransactionList


    transactionList.dStartDate = New DateTime(2011, 10, 1, 0, 0, 0, 0)
    transactionList.dEndDate = New DateTime(2011, 10, 31, 23, 59, 59, 999)
    transactionList.sDateType = DateType.transaction


    Dim document As New XmlDocument

    Dim manager As New XmlNamespaceManager(document.NameTable)
    manager.AddNamespace("ns1", "http://api.affiliatewindow.com/")

    Dim response As getTransactionListResponse = aw.getTransactionList(transactionList)


    Console.WriteLine(response.getTransactionListCount Return)

    Console.ReadLine()







    End Sub

    End Module

    ************************************************** ******

    I keep getting the error on Dim response As getTransactionListResponse = aw.getTransactionList(transactionList) line.

    If you have time to take a look that would be most appreciated.

    Thanks

    Shaun

  8. The Following User Says Thank You to smallafiliate For This Useful Post:

    nmathur (19-04-12)

  9. #8
    nmathur's Avatar
    Registered User

    Status
    Offline
    Join Date
    Apr 2012
    Posts
    12
    Thanks
    1
    Thanked 1 Time in 1 Post



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. UPDATE: Affiliate Window change to the affiliate payment system - LIVE TODAY
    By Kirsty_Lena in forum Affiliate Window & buy.at
    Replies: 49
    Last Post: 30-01-09, 04:26 PM
  2. Affiliate Window Shop Window API
    By matbrummitt in forum Affiliate Window & buy.at
    Replies: 1
    Last Post: 14-11-08, 11:11 AM
  3. Affiliate Window – Server Migration Maintenance Window
    By Dr Foster in forum Affiliate Window & buy.at
    Replies: 12
    Last Post: 13-06-08, 11:37 AM
  4. Replies: 125
    Last Post: 24-07-06, 11:05 PM
  5. Shop Window on affiliate Window
    By auntwallop in forum Affiliate Window & buy.at
    Replies: 0
    Last Post: 05-11-04, 01:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2