What Is API Integration? Methods and Points to Consider
How do systems talk to one another? The real-time request, webhook, batch transfer and message queue approaches, and the matters that need to be thought through from the start for a reliable integration.
Alp3 min read
An API (application programming interface) is the door that a piece of software offers so that it can exchange data with other software. API integration, in turn, means enabling two or more systems to talk to each other automatically through these doors. An order on your e-commerce site landing in the accounting program on its own, or a shipment tracking number being sent to the customer automatically, are both examples of integration.
Why is integration needed?
When data is carried between systems by hand, three problems arise: lost time, typing errors and data that is not up to date. As the number of transactions increases, these problems grow. Integration ensures that the same information is entered in one place and reaches every system that needs it.
Four basic methods
1. Real-time request (REST API)
One system asks the other at the moment it needs the information and receives a response. It is suitable for operations such as checking inventory, fetching prices or creating records. It is the most common method today.
2. Webhook (event notification)
When an event occurs, the source system notifies the other side on its own initiative. Receiving a notification when a payment is completed or when a shipment's status changes is an example of this. It eliminates the need for constant polling.
3. Scheduled batch transfer
Data is transferred in bulk at set intervals. Reconciliation jobs that run overnight, or file-based exchange with legacy systems that do not offer an API, are done with this method. It is not real-time, but it is simple and robust.
4. Message queue
Operations are written to a queue and processed in order. Even if the other system is temporarily unreachable, messages are not lost. It is preferred when transaction volume is high and when more than one system needs to react to the same event.
| Need | Suitable method |
|---|---|
| An immediate response is needed | Real-time request |
| Being notified when an event occurs | Webhook |
| High-volume data that is flexible in terms of timing | Batch transfer |
| High transaction load, resilience to outages | Message queue |
What to watch for in a reliable integration
- Resilience to repeats: If the same request arrives twice, the order must not be created twice. Operations should be designed to produce the same result when they are repeated.
- Retries: On temporary errors, the operation should be retried at progressively longer intervals.
- Rate limits: Most APIs limit the number of requests that can be made in a given period. The integration should be planned around these limits.
- Authentication: API keys and access tokens should be stored securely and defined with only the permissions required.
- Logging and monitoring: It should be possible to see which operation was carried out when and why it failed. Automatic alerts should be set up for errors.
- Version changes: The other party's API changes over time. Version announcements should be followed, and you should be prepared for changes.
- Data mapping: The same concept may be named differently or stored in a different format in two systems. How the fields will be mapped should be documented from the start.
What can be done with systems that have no API?
Not every piece of software offers an API. In this case, options such as file transfer, reading at the database level or an intermediary service running in between are evaluated. Each carries a different risk; the method supported by the software vendor should always be the first choice.
Questions to answer before you start
- Which data will flow, in which direction and how often?
- When there is a conflict, which system's data will be treated as correct?
- Does the other system have documentation and a test environment?
- How will work continue when the integration stops?
- Who will monitor the errors, and who will step in?
To connect your systems to one another, you can take a look at our API and system integrations service.