There are many kinds and types of application programming interfaces (APIs). This book will only concentrate on a short list of them and this chapter is meant to get everyone on the same page.
What Is Understood as an API
An interface is a well-defined entry point into a system.
An electrical socket: There is a socket and a plug. The plug goes into the socket, and the device connected to the socket works.
A vending machine ...