API: definition, how does it work?
When using a service like Amazon, we don't realise that this platform is connected to a multitude of others to function, via APIs. But what is an API and how can data communicate between different services?
Our favourite apps and sites are all connected to other platforms, even if we don't realise it.
For example, many applications, such as Uber, are connected to Google Maps to display world maps. Or the online payment methods of various e-commerce sites or marketplaces.
We are all connected to these different services, but how can we explain that these data communicate with each other?
Answer: It's thanks to APIs (Application Programming Interface).
API: a way to exchange data in real time around the world
In computer science, an API is a set of protocols that works like a messenger. It allows two systems to communicate with each other to exchange data or instructions.
Let's take a concrete example. To book a plane ticket on a flight comparator, you have to fill in several search fields. The place of departure, the place of destination, the dates, the number of passengers, the number of bags, etc. All these parameters allow you to interact with the many airlines like Air France via their API, the gateway to all their data. 📈
From this example, it is clear that the API allows databases to bequeried to provide services. In short, an API works like a power outlet to which anyone, if authorized, can connect to extract data. 🔌
API and automation with Nocode
In the world of Nocode, as in that of traditional programming, APIs are essential for building platforms or multi-service applications. The most common use case being the need to connect one's e-commerce platform to a payment system. 💸
Note that most applications, platforms or marketplaces built using Nocode use Airtable or similar dynamic database tools to manage all the data in a project. In order for the Airtable databases and the functionality of these sites to communicate, it is necessary to connect them via the Airtable API.
But in Nocode, there is one particular area where APIs are regularly used, and that is in automation. Indeed, automation services such as Zapier and Make allow their users to connect applications and websites to communicate with each other. The aim is to trigger actions based on certain events.
For example it is possible to.
- Add an electronic signature module to your application and automatically send a duplicate to the user. 📝
- Automate the sending of an email to a Google email, every time a VTC app is used for a business trip to generate an expense report. 🧾
- Automate sending a thank you email for a purchase on an e-commerce page . ❤️
- Send all your employees a notification on Slack every time you post a message on LinkedIn. 📨
For these services to work together, Zapier and Make use the APIs made available by the tool vendors.
This is why the biggest software companies are creating APIs so that other program creators or users can link them to platforms to offer new features. 💡
API: safety, operation and authorisation
There are four main types of APIs.
- 👋 O pen APIs: These are open to all. Software publishers offering this type of API provide in their documentation a public key, allowing to connect to their database.
- 🤝 Partner APIs: These allow an organisation to give access to part of its resources to external companies under certain conditions, such as having a licence to use the API. Only the services registered in a white list have access to the company's data or its services.
- 🤫Private APIs; also called internal APIs, they are only accessible to the different departments of the same company. This means that only internal actors of the same group can use them.
- 👨👩👦👦 Composite APIs: they allow access to different services and databases from a single key. They are particularly useful for a software publisher who will only have to offer a single API key for users to connect to several services and applications.
⚠️ Caution: An open API does not necessarily mean that it is free to use. For example, a software publisher may offer an open API limited to a certain volume of exchange. Once the maximum volume is reached, the user will have to subscribe to continue connecting his application to this service. This is for example the case with Google Map or CoinMarketCap.
For more information -> What difference between API and Webhook ?