What is an API?

Short answer: An application programming interface, or API, lets one piece of software ask another for data or actions in a fixed, agreed way. It sets out which requests other software can make, such as "create a customer" or "list open orders". It also sets out what information each request must include and what the answer will look like. Each API belongs to a particular software system. Its provider may publish it for outside use or keep it for internal use. When people say two systems connect through an API, they mean one system sends requests to the other in this structured way. Nobody types into a screen.

Business software such as accounting, customer records, online stores and payment systems usually offers an API. Other systems use it to read and write that software's data. An API is what makes most automation and connections between systems possible. The quality of an API varies a great deal between products. Some make almost every function available, and others only a few. Some charge extra for access or limit how many requests another system can make in a set period. So whether a system has a complete, well-documented API is an important question when buying software. A webhook is a related but different mechanism. With a webhook, a system sends a message out when something happens, instead of waiting for a request.

How it works

Most business APIs work over the internet. The calling system sends a request to a specific web address. The request includes credentials that prove the system may make it, plus any data in a structured text format. The receiving system checks the credentials and permissions. It then performs the action or looks up the data. Finally, it sends back a response with the result or an error message. The API documentation describes each available request, the fields involved and the possible errors. Providers usually limit the number of requests. They may also release new versions of the API over time and retire older ones.

Example

An online retailer re-keys 400 orders a week from its web store into its warehouse system. Each order takes about 3 minutes, which is 1,200 minutes or 20 hours a week. Staff type about 1 in 100 orders incorrectly. That causes 4 wrong shipments a week at an average cost of 50 each, or 200 a week. The retailer builds a connection that uses both systems' APIs to send each order to the warehouse automatically. That removes the 20 hours of typing and most of the wrong shipments.

Why it matters

API access decides whether a company's systems can share data without anyone typing it in again, and on what terms. When buying software, the buyer should confirm what its API allows and whether access costs extra. The buyer should also check the usage limits and how the vendor announces changes. Those terms affect what the company can automate, what reports it can build and how easy it will be to leave the vendor later.

API credentials give direct access to company data. Store them securely, limit them to the permissions needed and change them when people leave. Vendors can change or retire API versions, which can break connections that nobody is watching. Usage limits and per-request fees can grow large at higher volumes. An API connection also needs monitoring and error handling, or failed requests may go unnoticed.