Life, as we know it, with all the technology in today’s society and economy, wouldn’t be possible without APIs. This fact is even more fascinating since most people worldwide don’t even know of APIs. As a quick reminder, API stands for “Application Programming Interface” roughly acts as an access point that lets two (or more) applications or systems communicate with each other. If you want a way more proper introduction, make sure to check out our previous article here.
APIs optimize and increase efficiency wherever they are used: logging in to your social media accounts, applying various automated payment methods on online stores, and finding the cheapest flight on booking sites. However, you always have to keep in mind that the API is not a system that communicates with the user but an access point for applications to communicate directly with each other. To make it easier for you to understand, here are five use cases to show what APIs do and how they specifically work in those examples.
For e-commerce, there’s not just one API but, in fact, various ones that do different things. For example, some APIs are made for the user to create a more comfortable shopping experience. Other APIs are for the stores themselves to increase the efficiency of the ordering process.
A product information API pulls all the information (images, price, size, IDs, available amount, etc.) about a specific product from the database of all products in the store.
Orders APIs include all the details about your orders from the store connected to your account. Of course, your order naturally also contains details about the products you’ve ordered, so again, the product information API is also working in the background.
Once you’ve filled your online shopping cart, you’ll eventually come to the shipping process. This is the part where shipping APIs come in immensely handy since they allow you to choose from multiple carriers, including delivery time, rates, location, and automatically created tracking codes. Some APIs even go further and automate the process of order invoices and labels.
Of course, several other APIs work together here, but those are some of the most obvious ones.
When you’re planning your next vacation and go online to look through the best deals for flights, hotels, car rentals, and more, you’ll for sure benefit from the various APIs working from behind the scenes on booking websites. Especially for travel services APIs are a great way to automate processes and significantly increase the speed of data requests.
Third-party APIs from several airlines exchange their data with the flight booking site you’re on, which then gets sorted by the website to ultimately show you the best options – whether it be the best price, the shortest duration, the various classes options, or more.
Once you’ve made your choice, other APIs take over your booking confirmation with the provider they sourced the original booking data from.
In comparison: without all those APIs, there would be employees of the booking website manually requesting information from hotels, airlines, and other travel providers, then showing you the options, and then again manually confirm your booking once you’ve made your choice.
When you go to a cash dispenser to withdraw a certain amount of money from your bank account, APIs work as messengers between you and the bank. If you choose to withdraw $ 100,- the API checks your bank account in the background if you’ve got the permission to withdraw any money, and if yes, if you’ve also got enough money to withdraw that specific amount. The API then informs you that you can receive this amount (or shows you how much you can withdraw in total from your account) and makes the way free for the cash dispenser to hand you your request amount of money.
In other areas, APIs are also used at banks to check a person’s degree of creditworthiness if there’s a request for a loan. Insurance companies may use APIs, besides for many other reasons, to accept a person’s insurance and check warranty cases.
Every navigation or location-based app would be hopelessly hamstrung without their dedicated APIs. Those specific APIs identify the user’s location, their destination and then plots the route. More sophisticated APIs even take “obstacles,” like constructions zones, blocked roads, traffic jams, and other misfortunes, into account when planning the most efficient route to save time and money (for fuel). Some navigation systems even work with APIs that focus on more road safety and warn the driver from dangerous weather and road conditions, speed cameras, and vehicle profiles.
When you’re scrolling through a website, may it be an online store, a platform for online courses, or something else, you’ve for sure stumbled upon the “Login to Your Account” option. It’s incredibly convenient, but most people never even wondered how they worked. Well, APIs. That’s how. So when you’re asked to either log in with your email address that is directly linked to the website, you may also choose most of the time to login in through your Facebook, Google, Twitter, Amazon, or any other account. Applications with this functionality leverage these platforms’ APIs to authenticate the user with each login. Every time the application runs, it uses the API to check whether the user is already logged in utilizing whatever social media platform. If not, when the user clicks the “Log-in Using Facebook/Google/Amazon/Twitter” button, they are asked to confirm they want to log in with that profile. Once verified, the API provides the application with identification information to know who requests access to the account.