Join Free
+ Reply to Thread
Results 1 to 1 of 1

Thread: New: Link API

  1. #1

    New: Link API

    We have just released the Link API. This endpoint is more of a general wrapper for all of our Link APIs. It combines all of features of the following endpoints in one API call:
    1. LinkAffiliator
    2. LinkOptimizer
    3. PhraseLinker

    It follows the same order as listed above. If a url can be affiliated, then it will return an affiliated url. If not, it will return an optimized url. If an optimized url is not available AND a phrase param was set, then it will return url based on that phrase.

    General Usage:


    url for this endpoint is:
    PHP Code:
    http://prosperent.com/api/link 
    parameters are:
    PHP Code:
    apikeysidurlphrase 
    PHP Code:
    http://prosperent.com/api/link/redirect?url=<MERCHANT URL>&phrase=<OPTIONAL PHRASE>&apiKey=<YOUR API KEY> 
    Replace the api key with your api key, and give it a merchant url and phrase.

    Want to add an sid for tracking? simply add sid= to the url like so:

    PHP Code:
    http://prosperent.com/api/link/redirect?url=<MERCHANT URL>&phrase=<OPTIONAL PHRASE>&apiKey=<YOUR API KEY>&sid=MYSID 
    Here is a working example for Zappos:
    PHP Code:
    http://prosperent.com/api/link/redirect?url=http://www.zappos.com/sale&phrase=nike+running+shoes&apiKey=640726f74f17fb5f7665665c2ccc74ee 
    CLICK TO TRY IT



    Advanced users keep reading:


    Let's say you want to spit back the url, or create a jsonp callback for use in your javascript. You can do that too. Simply change the url from redirect, to url like so:

    PHP Code:
    http://prosperent.com/api/link/url?url=<MERCHANT URL>&phrase=<OPTIONAL PHRASE>&apiKey=<YOUR API KEY> 
    This returns a text link. Add any of the following parameters to change the format: format={text,json,jsonp}. Here is a jsonp example:

    PHP Code:
    http://prosperent.com/api/link/url?url=<MERCHANT URL>&phrase=<OPTIONAL PHRASE>&apiKey=<YOUR API KEY>&format=jsonp 
    With jsonp you can also specify the name of the callback created by adding a callback parameter. It defaults to prospcb:

    PHP Code:
    http://prosperent.com/api/link/url?url=<MERCHANT URL>&phrase=<OPTIONAL PHRASE>&apiKey=<YOUR API KEY>&format=jsonp&callback=asdf 
    Please leave feedback so we can further refine and improve this tool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
coupons | coupons and deals