Even Billion Dollar Brooklyn Companies Aren’t Perfect
Something that we always harp on is the lack of testing people are doing for APIs. Specifically in regards to the API’s response. We have spoken with hundreds of companies and each time are amazed to hear how few have systems in place.
The best case scenario is that they are monitoring the latency of their endpoints, but that’s an antiquated and myopic view. It is a false sense of security on par with certain government agencies. Your API is a product that directly effects your entire company.
Etsy is a huge success. From a technical and business standpoint, they are the sort of company that we all hope to be someday. With that said, no one is perfect. This is a real world example I use to illuminate how an API payload issue can directly lead to a loss of revenue. Etsy is not an API Fortress customer, this is based on their public API. Please note that this example is time sensitive due to the fluctuations of products being uploaded and sold, so I won’t be providing direct links as it may be sold before the end of the day.
Etsy has a listing endpoint where you can get a list of 50,100 of their products. The JSON payload is very clear and has one object titled recipient. According to their documentation these are the acceptable options: men, women, unisex_adults, teen_boys, teen_girls, teens, boys, girls, children, baby_boys, baby_girls, babies, birds, cats, dogs, pets, not_specified.
There are three major things to note:
- First, to Etsy recipient means who the item is for. Whether it’s men or a women. This is how they categorize items.
- Only a Brooklyn, NY based company would have birds as a recipient.
3. Null is not supposed to be a response.
That means that each item has to be specifically tied to a category. When you browse to Etsy.com and click under Women, for example, all the items for Women should be shown. Well we ran a payload test with API Fortress and out of the 50,100, there were over 3,600 items that had recipient set to “null.” That’s not supposed to be an option.
Here is a specific example that shows you why this is a significant issue. One of the 3,600 items is a scarf titled “Super Soft Burnt Orange Scarf Hand Knit.” When I use Etsy’s top level navigation and browse to the Women section I don’t see the scarf. Let’s go one deeper and go to Accessories. The scarf is still not there. Finally, let us click on Scarves. We finally find the product. What happened?
Without the top level category, the only way that this scarf gets picked up by the Etsy platform for placement is thanks to the category_path object. In that object it is set as “Accessories” and “Scarves.” Therefore, only when you go to Accessories AND Scarves will the item appear. That means the item is being hidden from potential buyers in the higher level categories because of this one omission. Those are lost eyeballs and, potentially, lost sales. Not to mention, and this is really in the weeds, the category_path for Men’s scarves is “Other Accessories” and “Scarves.” So if the intention was to have this item be unisex, that is failing because it is not shown under the Men’s scarves section AT ALL.
Is this the most interesting piece of information you will learn today? No, this is. For us this is fascinating though. We love it. Our whole team is dedicated to finding issues you may have never considered, that could be costing you tens of thousands of dollars (3,600 items x $X per item = MONEY). APIs can be tested as extensively as websites and apps, and that should be the minimum level you demand of your API program. Talk to us, because we want to do these boring things for you.