5 Ways a Hypermedia API Simplifies Ecommerce

Companies want to engage more customers, in more ways, and in more environments. However, with all the new digital experiences available, consistency is proving to be difficult. Customers shouldn’t notice the technology but must remember the experience. That’s a tall order for ecommerce systems. Our Senior Development Manager & API Architect, Deepak Azad and I discussed how best to define for our readers how an API-based commerce system works; and why hypermedia makes ecommerce easier. Check out our conversation notes:  The chief problem our commerce APIs solve is complexity Deepak Azad, Senior Development Manager & API Architect, Elastic Path Curious about what is an ecommerce API? Getting the combinations right considering all the factors that have to click into place is like solving a Rubik’s cube with hundreds of squares and a different color for every customer. We recognized three major layers of complexity:  Complex state and data.  Hundreds of elements including products, pricing, currency, tax regimes, preferences for currency and shipping, and more all interact with each other and impact other pieces of many different systems.  Complex integrations.  Commerce sits between customer touchpoints (CMS, web browsers, mobile apps and internet of things) and systems (tax, inventory, ERP, billing engines and rule engines). Any given digital customer experience can comprise 15 plus different pieces of technologies all working together.  Complex customizations.  Booking shore excursions while on a cruise is very different from buying cosmetics. Different purchases require different kinds of state at varying times in the customer journey – all published through different touchpoints. Allowing developers to “understand” complex customizations was important for us to solve.  “There is inherent complexity in ecommerce, and we strive to make the ecommerce radically simpler,” says Azad. “Elastic Path API has two primary goals. It has to be easy to use and simple to extend.”  Hypermedia: a simple and elegant ecommerce solution  Elastic Path API is a level three REST API. This style is also known as Hypermedia, which is the newer shorter name for HATEOAS (or Hypermedia as the Engine of Application State).  “We use a  REST level three hypermedia API  because it alone could provide the simplicity of use and extension that we needed to solve the complexity problem,” says Azad.  Hypermedia uses two concepts: resources and relationships. “Resources are things or the nouns of the system: carts, items, profiles, purchases. They have relationships to each other that are named. For example, an item has a relationship to price.”  To access a hypermedia API, simply go to the “home page” or root, which gives a list of links to start your navigation. Each link leads to a new link, or controls like “Add to Cart.” You can add, change, or delete links completely.  “Understanding resources and relationships, essentially the resource graph, as well as how to access the API provides everything you need to successfully use a hypermedia API,” says Azad. It’s that simple.  Advantages of a hypermedia API for ecommerce Discoverability.  Hypermedia allows you to follow links to discover related content and links – just like browsing a website.  Note: Developers really like this experience as they don’t have to read documentation, study a book, or ask a lot of questions. They can jump in, figure it out, and quickly use the API.  Contextuality.  Hypermedia allows you to personalize content for every customer.  Note: You can shape the API based on their profile, and get them to do what you want, based on their role. You can add links and remove links. This contextuality gives you a lot of power over the presentation layer. Clients consume the API without understanding the context because they don’t need to. Simple.  Reactivity.  As the name implies, reactive clients can recognize and react to resources (cart, price, item, etc.) but do not have intrinsic business logic.  Note: Decisions are made by the server and provided as links in the API. Instead of coding up a client, the API presents the link or chooses not to. This model allows you to reach all touchpoints simply and quickly.  Extendibility.  Just add resources and link to an existing resource to personalize the user experience. You can push a product on sale, select content based on a user profile, and filter recommendations. Similarly, to remove capabilities (like hiding the price) just remove the link.  Note: The system never reacts to render it, and the price disappears without having to modify the item itself.  Stability.  This is the most important especially when the number of customer touchpoints increases. When you have dozens of touchpoints and many versions of an application, some may live in hardware that cannot be updated. Some of it may live in mobile devices that the client doesn’t want you to update or the vendor can’t provide updates for. Connected cars, connected homes, mPOS, clienteling apps, augmented and virtual reality all represent new touchpoints. You need a way for the API to be resilient, given the number of different clients and their varying abilities to access it over time.  Note: Hypermedia provides the right level of stability along with simplicity. Hypermedia APIs are now starting to lead the way in many other forms of complex systems, not just ecommerce, for all the same reasons.  A hypermedia ecommerce API isn’t like other APIs; some are less sophisticated and come with significant overhead. Brands using hypermedia APIs can innovate faster and deliver consistent customer experiences.   How is your company handling ecommerce complexity?   Learn more about hypermedia APIs in  10 Ways A Hypermedia Ecommerce API Leads to Developer Nirvana.