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