When working with websites and solutions in general I sometimes notice that customers or partners don’t fully understand what an API is, everyone has heard the word, they usually just know that its important to have one, but not allways why. If you check google, “API meaning” is one of the most used searches in relation to the word API. API is short for application programming interface.
In simple terms an API can be considered a translater, it allows two or more solutions that speak different languages to communicate with an agreed set of words and sentences.
Whenever we need to display in or save data from the front-end (the part that the user interacts with, either an app or via webbrowser) we need a way of communicating with the back-end where the business logic and databases reside.
If we use the image below as the example, in most cases the norwegian (front-end) doesn’t need to know anything about the complexity of the german language (back-end), nor need the german person need to know how to pronounce norwegian correctly. All they need to do is to use the common language, in this case english, to communicate, based only on the context the conversations needs.
Lets say the conversation is about food, one perticular product is found and then paid for. In this case the conversation, called an integration, is complete with very little knowledge of all the available words in each language. Just a few words are used, usually referred to as parameters, to complete the conversation.
Another aspect of having an API is that you allow others to start a conversion with you, APIs are externally available and by letting everyone know you speak english (has an API available) you are able to speak with more people and your business can be understood by a bigger crowd. Through APIs you allow others access to your business logic and data, whithout having to teach them your language completely. Its up to you how many words are needed to have a good conversation.
To be able to successfully use APIs it is important to have good documentation, similar to that its important to have a good dictionary when trying to learn a new language. The documentation lets you know the meaning of each word and what you would expect as a response if you use that word.