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.
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 hosts over 100,000 Open Source projects. You may find what you’re looking for by searching our site or using our Software Map.
Eric Schwarzer saysMarch 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.
Brian Littleton saysMarch 21, 2013 at 6:02 pm
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. firstname.lastname@example.org