Application Programming Interface
Ever heard of APIs? In recent years, they have become a prominent factor in tech/digital development, with giants like Google, Facebook, Salesforce, Ebay, Expedia and many more adding them to their revenue streams. API stands for “Application Programming Interface" and is basically a piece of code that acts as a go-between for two heterogeneous pieces of software.
APIs acts as mediators or translators between two parties, passing requests and responses back and forth while exposing only the code necessary to complete the transaction. Meaning, it provides a secure and standardized way for applications to work with each other and deliver the information or functionality requested without any user intervention.
That’s great news for end users, as APIs can assure that all the "heavy lifting" is done in the background, while the frontend experience remains virtually effortless.
An API is often compared to a waiter at a restaurant, communicating and delivering orders between customers and the kitchen. The customer places an order to the waiter and the API acts as the function which takes the order to the kitchen and brings the requested dish back on a neatly organized plate, as illustrated below.
The Google Case
If you've ever been trying to find a specific destination, you've probably used Google Maps to find it. Ever signed up to a new digital service? Then you've probably encountered the Google API for account user registration. Custom Search allows web developers to provide a search of their own website by embedding a custom search box and using the Custom Search API. There are multiple use cases for Googles APIs, which has become a significant revenue stream for the search engine giant, now offering more than 100 APIs.
Uber is a great example of how Google APIs have been used to great effect. The app - who enables people to get a ride swiftly and with ease - relies heavily on the Google Maps API for accurate positioning and pick-up/delivery timing.
There are many business advantages to both consuming and providing an API. The main reason? To connect your application to the rest of the software world. These connections can empower all types of organizations, from start-ups to government agencies. In this way, APIs are not only changing the way companies do business. They’re changing the way companies think about business.
Improved customer experience in digital settings as APIs can do more work behind the scenes, a spur of innovation, streamlined development process and a faster time to market through the openness and re-usability of APIs, as well as business efficiency through automation of "manually heavy" processes. These are just a few examples of incredible value that can be created by APIs.
The Expedia Case
Expedia.com is a is a travel booking website which is primarily used as a travel fare aggregator and travel metasearch engine. With Expedia APIs, developers can integrate advanced functionalities into their application enabling users to easily view and access pieces of information like availability, rates, restrictions, booking notification, retrieval and confirmation all from a third party application.
For example, the Booking Notification API allows you to receive reservation information in near real time as customers make bookings and with the Product API, you can read, create, and edit room types and rate plans.
REST vs SOAP
In the API world there are two forms of API interaction that stand out - REST (Representational State Transfer) and SOAP (Simple Object Access Protocol) - and therefore they are often compared to each other. REST is generally considered a simpler alternative to SOAP because it requires writing less code to complete tasks and follows a less rigid structure and logic than SOAP, giving it a great deal of flexibility. Data is not tied to resources or methods, so REST can handle multiple types of calls, return different data formats and even change structurally with the correct implementation of hypermedia. This flexibility allows developers to build an API that meets your needs while also meeting the needs of very diverse customers.
Regarding data formats, REST, unlike SOAP, is not constrained to XML, but can instead return XML, JSON, YAML or any other format depending on what the client requests. And unlike RPC (Remote Procedure Call), the earliest and simplest form of API interaction, users aren’t required to know procedure names or specific parameters in a specific order. REST is therefore considered a more flexible and modern option.