Justin Ball
- CTO AtomicJolt
- GearSnyper, SnapLinker, SnapSearcher
- http://www.justinball.com
It Would Be Really Cool If…
Open All The Things!
- Open Source
- APIs
- Open Content
Open Source
- Moved from installs to services
- Developers read the code. Create better integrations
- Result is a healthy community of applications
Open Content
- Kahn Academy
- MIT Open Courseware
- Creative Commons
Users win with cool remixes
Organizations (and professors) win with brand recognition
APIs
Symbiotic Relationship
Developers imagine new features for your platform.
Platform wins new functionality and profits.
Developer wins large audience and profits.
<Begging>
Please implement OAuth
and standards make things easy
</Begging>
Cool Story Bro
The AvantLink API
Merchant API
Ignore This
Affiliate API
Affiliate API
The AvantLink API
Getting Started
Everything is a GET
Just like your browser
Looks like this:
Base url
http://www.avantlink.com/api.php
Common Parameters
- affiliate_id=28861
- module=CustomLink
- output=csv
Generate Custom Links
Parameters:
- module=CustomLink
- output=csv,tab,xml
- merchant_id=10060
- website_id=37705
- merchant_url=http://www.backcountry.com/ibis-ripley
Build a Custom Link
Product Search
Parameters:
- module=ProductSearch
- output=csv,html,js,rss,tab,xml,json
- website_id=37705
- search_term=ibis
Search
SnapLinker
Search Example
var query = 'ibis';
var page = 0;
var resultCount = 8;
var url = 'http://www.avantlink.com/api.php?affiliate_id=28861';
url += '&module=ProductSearch&output=json&website_id=37705';
url += '&search_results_count=' + resultCount;
url += '&search_term=' + encodeURIComponent(query);
url += '&search_results_base=' + (page * resultCount);
$('#searchExampleA').attr('href', url).text(url);
$.getJSON(url).done(function(data, textStatus, jqXHR){
$('#searchExampleOutput').empty();
$.each(data, function(idx, result){
if(result){
$('#searchExampleOutput').append(render(result));
}
});
});
function render(result){
var url = 'http://www.avantlink.com/click.php?tt=app&ti=1021&pw=37705' +
'&mi=' + result.lngMerchantId +
'&df=' + result.lngDatafeedId +
'&pri=' + result.lngProductId;
var image = result.strThumbnailImage || result.strMediumImage;
var html = '<' + 'div class="search-result">';
html += '<' + 'a href="' + url + '" target="_blank">';
html += '<' + 'img src="' + image + '" alt="' + result.strProductName + '" />';
html += '<' + '/a>';
html += '<' + 'p class="price small">$' + result.dblProductPrice + '<' + '/p>';
html += '<' + '/div>';
return html;
}
//url += '&search_on_sale_only=1';
//url += '&search_on_sale_level=10';
//url += '&search_price_maximum=1000';
//url += '&search_price_minimum=10';
// Boolean, enables the use of advanced search syntax, causing special treatment in the following circumstances:
// preceding a word with "+" will restrict the search to ONLY products that mention that word, preceding a
// word with "-" will restrict the search to exclude any products that mention that word, and the keyword "
// OR " can be used to perform multiple simultaneous searches (in place of OR you can use the pipe character "|"
// to separate multiple search terms).
//url += '&search_advanced_syntax=1';
//url += '&search_brand=ibis'; // A product brand to which search results should be restricted (strict filter only; does not allow wildcards).
//url += '&search_category=bikes'; // A product category to which search results should be restricted.
//url += '&search_department=clothing'; // A department to which search results should be restricted.
//url += '&merchant_ids=10060';
//url += '&search_results_sort_order=Sale+Price';
Deal of the Day (DOTD)
Parameters:
- module=DotdFeed
- output=csv,html,js,rss,tab,xml,json
- website_id=37705
- layout_id=1
DOTD
Data Feeds
Parameters:
- module=SubscriptionFeed
- output=csv,tab,xml
- auth_key=908d7de89a595f9d1548s7d77d260e457
- website_id=43557
List Data Feeds
Using the API for reports
Parameters:
- module=AffiliateReport
- output=csv,html,tab,xml
- auth_key=908d7de89a595f9d1548s7d77d260e457
- report_id=1
Reports
- 1 – Performance Summary
- 2 – Ad Impressions (Summary)
- 3 – Ad Impressions (Detail)
- 5 – Click Throughs (Summary)
- 6 – Click Throughs (Detail)
- 8 – Sales/Commissions (Detail)
- 9 – Performance Summary By Tool Type
- 12 – Performance Summary By Day
- 19 – Sale Hit Tracking Trails
- 20 – Performance Summary By Affiliate Website
- 22 – Performance Summary By Custom Tracking Code
- 23 – Invalid Affiliate Links
- 24 – Performance Summary By Ad Campaign
- 29 – Performance Summary By Hour
- 31 – Performance Summary By Product
- 33 – Performance Summary By Merchant Grouping
- 47 – Merchant Ranking By Earnings
- 48 – Performance Summary By Month
- 50 – Performance Summary By Week
- 72 – Last Click Through to Sale Summary
- 77 – Performance Summary By Paid Placement
- 81 – Datafeeds: Merchant Datafeed Quality
Peformance Summary
App Market
SnapLinker
SnapSearcher
SnapSearcher
</section>
</section>
Questions?
Justin Ball
- @jbasdf
- [email protected]
- http://www.justinball.com
- https://github.com/jbasdf
</section>
</div>
$(function(){ $('#report-request').on('keyup', function(){ var id; $.each($(this).val().split('?')[1].split('&'), function(i, params){ if(params.indexOf('report_id')==0){ id = params.split('=')[1]; } }); switch(id){ case "1": title = "Performance Summary"; break; case "2": title = "Ad Impressions (Summary)"; break; case "3": title = "Ad Impressions (Detail)"; break; case "5": title = "Click Throughs (Summary)"; break; case "6": title = "Click Throughs (Detail)"; break; case "8": title = "Sales/Commissions (Detail)"; break; case "9": title = "Performance Summary By Tool Type"; break; case "12": title = "Performance Summary By Day"; break; case "19": title = "Sale Hit Tracking Trails"; break; case "20": title = "Performance Summary By Affiliate Website"; break; case "22": title = "Performance Summary By Custom Tracking Code"; break; case "23": title = "Invalid Affiliate Links"; break; case "24": title = "Performance Summary By Ad Campaign"; break; case "29": title = "Performance Summary By Hour"; break; case "31": title = "Performance Summary By Product"; break; case "33": title = "Performance Summary By Merchant Grouping"; break; case "47": title = "Merchant Ranking By Earnings"; break; case "48": title = "Performance Summary By Month"; break; case "50": title = "Performance Summary By Week"; break; case "72": title = "Last Click Through to Sale Summary"; break; case "77": title = "Performance Summary By Paid Placement"; break; case "81": title = "Datafeeds: Merchant Datafeed Quality"; break; default: title = "Report"; } $('#report-title').text(title); }); });