• Home
  • About
  • Best Practices
  • Webinars
  • Resources

ShareASale Blog

  • Twitter
  • Facebook
  • Pinterest
  • Google+
  • LinkedIn
  • ShareASale
  • Industry Insights
  • News & Events
    • Product Updates
  • Merchant Insights
    • Merchant training
  • Affiliate Insights
    • Affiliate training

Real world API Example

March 21, 2013 by ShareASale 2 Comments

In my February #Interface blog posts, I discussed our new Get Products, and Merchant Search by Product API calls. How about a real-life example of their usefulness?

If you’re a WordPress blogger, check out the quick plugin I made using the Get Products API. It simply adds a meta box on your WordPress admin post menu, where you can provide your API details and query for products by keyword. The products returned show up in a scroll-able modal light box, with their name, price, link, and some merchant details.

productsearchapiimage_28481_s.jpg

 

Feel free to analyze, modify or improve it! It uses a simple jQuery AJAX call to return data from a server-side PHP script querying ShareASale’s getProduct API. Keep in mind, each query will use one of your API credits.

Here are a challenge ideas in case you want to dive-in to the code and improve it:

  • If no products are returned, leverage the Merchant Search by Product API to query for merchants whom you could join that DO have matching products
  • Add a button to automatically insert product details into your new blog post. In my exploration, jQuery could possibly do this by targeting the WordPress post editor DOM element(s)
  • Automatically query for products based on keywords in your existing WordPress post. A WordPress API hook might assist in reading the content of your blog post and submitting it to the plugin for products

See the SourceForge hosted open source plugin below

SourceForge.net: ShareASale WordPress Demonstration - Project Web Hosting - Open Source Software

SourceForge.net: ShareASale WordPress Demonstration – Project Web Hosting – Open Source Software

SourceForge.net hosts over 100,000 Open Source projects. You may find what you’re looking for by searching our site or using our Software Map.
via: shareasalewordp.sourceforge.net

productsearchapilarge_28480_s.jpg

 

Filed Under: Affiliates Tagged With: #RealLife, api

ShareASale

ShareASale

Comments

  1. Eric Schwarzer says

    March 21, 2013 at 3:51 pm

    We have thousands of pages and would love to query the product api specifically to find licensed merchandise for specific bands.. Regrettably with limits to api calls it would take us some time to run through them all.

    Reply
  2. Brian Littleton says

    March 21, 2013 at 6:02 pm

    Eric,

    In that case, you are probably better downloading the few feeds that you need and utilizing API like calls within your own pages from your own servers. The API product feed isn’t designed to be a catch all and like you said – with limits it can’t be used the way you are describing.

    Shoot me an email if you want with some detail on the pages you are looking at monetizing in this way – we may be able to help as well with either suggested download or specific API stuff. brian@shareasale.com

    Reply

Leave A Comment Cancel reply

Interested in hearing more from ShareASale?

To receive our latest news and email communications, please opt-in to our newsletter below.
* = required field
Tell us about you:



Events Calendar

«December 2022»
SunMonTuesWedThuFriSat
    
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

Merchant Discovery

Tags

#BestOf #BuildingBlocks #HowTo #LessonsLearned #Q4Prep #TheInterface affiliate affiliate resources affiliate summit affiliate timesavers affiliate tips around the office bfcm2016 black friday blogger tips blogging Brian Littleton client services conferences conference tips content tips cyber monday Featured fun friday general news gift guide gift guides gift guides 2016 interface merchant features merchant focus merchant programs merchant resources merchants merchant timesavers merchant tips month of the interface must have merchants new and notable new merchants product datafeeds q4 reports technology tip of the day

USEFUL LINKS

  • Industry Insights
  • Affiliates Insights
  • Merchants Insights
  • News & Events

RESOURCES

  • About Us
  • Contact Us
  • Resources
  • Best Practices
  • Webinars

Contact Us

SHAREASALE@SHAREASALE.COM
(312) 321-0487

  • Twitter
  • Facebook
  • Pinterest
  • Google+
  • LinkedIn
  • ShareASale