API
An API (Application Programming Interface) is a defined programming interface through which software can use the data and functions of another system. It describes which requests are allowed, which data comes back and how a program logs in.
Explanation
An API is something like an order counter. A program sends a request in an agreed format, such as "give me all orders since yesterday", and receives a response in an equally agreed format. What happens behind the counter stays hidden. That is intentional: the vendor can change its system internally as long as the API stays the same.
Today most web APIs follow the REST principle and exchange data in JSON format. For login they use API keys or methods such as OAuth 2.0. Many APIs also limit how many requests per minute are allowed. A good API has complete documentation and a test environment.
Example from everyday integration work
An online shop is supposed to hand the previous day's orders to accounting every night. The integration queries the new orders through the shop's API, reads amounts, tax rates and payment method, and creates matching receipts through the accounting software's API. If an API reports an error, for example because a required field is missing, the record is logged and retried.
How it differs from related terms
- Interface is the umbrella term. An API is one form of it. Interfaces can also run through files or databases.
- A webhook is the opposite direction: you do not ask, the system gets in touch by itself when an event occurs.
- Middleware uses the APIs of several systems and mediates between them.
Relevance to our services
We connect systems directly from A to B through their APIs. How good a system's API is affects the effort and thus the fixed price, see What does an integration cost? If a system has no API, we connect it through a file, database or export: Integration without an API.
Frequently asked questions
Is API the same as interface?
Not quite. Every API is an interface, but not every interface is an API. A regular CSV export is also an interface.
Does using an API cost money?
That depends on the vendor. Some systems only provide the API in certain plans. This should be checked before the project.
Related
Interface
A software interface connects two systems so they exchange data automatically. Definition, everyday example and how it differs from API and middleware.
Webhook
A webhook is an automatic message that a system sends to an address when an event occurs. Explanation, example and the difference from API and polling.
Have an integration built
Direct connection between two systems, fixed price after a free check, the code is yours.
