December 12, 2012

Future of the API This post is outdated

It would be nice if the Shopify team could start thinking about making the API more useful. We can register endpoints in our Apps to accept Webhooks. It would be nice if we could register endpoints in our Apps that expose functionality to other Apps. 

For example, I have a super App that can iterate through an entire shop and do some amazing analytics and calculations. Thing is, that calculation takes a long time and consumes a lot of resources. As an alternative I want to offer the same analytics and calculations but only on a small subset of a shop's products, like say the top 10 best sellers. The problem is, this data is not provided by Shopify, but it is provided by many Apps. If Apps could register endpoints and offer up some functionality with their own version of an API they would be more valuable. For example, I could ask the shop if it has any Apps providing functionality I could use. If one of the order analytics Apps provided a top 10 seller listing, as some method call like current_top_ten I would then be able to use the API to call that method, and Shopify would marshal this call off to the App for the response. Instead of me coding up yet another statistic about a shop, I could rely on current_top_ten() as long as the merchant had installed the App providing that function. 

It seems that once you settle in with the API, you quickly realize that mashing together code is probably better than writing copy after copy after copy of the same code amongst Apps. If some guy opens up his App to provide a useful service to other Apps, this is far superior to 15 Apps all trying to manage the same thing. Obviously DRY is the principle here. 

The point is, an App could quickly get what it needed from another App, and move on to more important things. If a shop has 1000 items, and only the top 10 matter for the purposes of quickly informing a merchant of something interesting... I see no need to go get all the orders, figure out the top 10, and then do some real work.

Sure this is a contrived situation, but it would be neat to provide this. Any App offering up a useful, reliable metric for a shop would be adding great value to not only the merchant, but to other Apps as well. As they say, the sum is greater than the parts. 


Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com