How APIs change the way we do business (with examples)

How APIs change the way we do business (with examples)
What is an API? | How do APIs Work? | REST API | SOAP API | RPC API

API stands for ‘Application Programming Interface.’ APIs are a combination of algorithms and communication rules that dictate how two machines talk to each other. These interactions usually take the form of a simple request for information and a response. For example, when using a new phone for the first time, social media APIs will collect relevant contact information from the web to automatically populate your contacts folder.

Other APIs might be advanced enough to execute a small computation, such as automatically gathering weather information and predicting how the weather might turn out tomorrow.

Learning how APIs work is the key to understanding how they can help businesses accomplish more. API integrations have become essential to daily business operations and revenue worldwide.

What is an API? | How do APIs Work? | REST API | SOAP API | RPC API

The 3 main types of APIs

APIs are communication tools that devices use to exchange commands and data. Developers must instruct them how to read, translate and present the information they receive. These rules govern how we design APIs, how they operate and what we use them for. Today, there are three main categories of API architectures: REST, RPC and SOAP.

REST API

Representational state transfer (REST) is the most common approach to building APIs. REST relies on a client/server approach – much like your internet browser. This type of design separates the front and back ends of the API, i.e. the technical, finicky parts from the sleek, intuitive tools you use to interact with a web platform.

This separation allows considerable flexibility in development and implementation. A team of programmers can create the architecture and algorithms on which the API runs, then pass it on to another group who ‘plug it in’ to a user interface.

REST (sometimes called RESTful) APIs are limited because they only facilitate one-way communication. Clients send requests for information, and servers respond in a uniform and predictable way.

Because REST APIs are limited by the types of information they can send and receive, they’re easy to create and known to function reliably.

Example of a REST API

Flickr launched its RESTful API in 2004. This API allowed bloggers to take images from the Flickr site and quickly embed them into their social media feeds.

Flickr’s API used only these simple commands to achieve its purpose:

  • GET command: A request from client to server asking for information (this can be anything from a URL to a spreadsheet or an image).
  • POST command: A request to create a new resource – in this example, creating a new image within a social media feed.
  • PUT command: A request used to modify or update an existing resource.
  • DELETE command: A request to delete a given resource.

RPC API

Before REST became popular, programmers built most APIs using Remote Procedure Call (RPC) Architecture. Often called either XML-RPC or JSON-RPC because this type of API relies on these respective languages to translate data (much like REST relies on HTTP).

RPC APIs may be old tech, but we still use them today because they’re a good way of executing lots of complex interactions. They can be ‘taught’ to interact safely, so RPC APIs are often used to communicate with programs on other machines and edit sensitive information.

Users don’t often see examples of RPC APIs because they’re hidden behind the apps we use. However, they are still an important tool, as they’re well suited to executing commands (as opposed to fetching simple data).

Example of an RPC API

HR software relies on RPC APIs to collect different types of information from various sources, including communication tools (Slack, Gmail), scheduling tools, and payroll tools, and merge this information into a single data set that everyone can access quickly and easily.

For example, HR software uses RPC APIs to make sure changes made in one set of data are reflected in all others. This type of communication is something REST APIs cannot do.

SOAP API

Simple Object Access Protocol (SOAP) was designed to improve existing RPC APIs. It is, in fact, a sub-type of RPC API and not a new type of API in its own right.

SOAP simplifies the RPC communication protocol, using both XML and HTTPS in a very structured format. This allows developers to easily create new APIs by following a set approach to writing, sending, receiving and interpreting data.

SOAP is a highly structured and tightly controlled standard compared to REST APIs. However, this rigidity is its greatest tool, as any device which understands HTML or XML can also understand SOAP. In addition, SOAP can communicate across devices that use different operating systems, including web servers, mail servers, database servers and application servers.

Because of SOAP’s acceptance as a standard protocol by the World Wide Web Consortium (W3C), it also has advanced security features available via extensions. Many large enterprises use SOAP APIs for this reason.

Example of a SOAP API

Cloud storage services such as Amazon S3 make extensive use of SOAP APIs. However, you can find them used in any service which relies on sets of complex instructions that stretch beyond the scope of those functions provided by REST APIs.

While REST APIs are generally easier to design and implement, large organisations still use SOAP as an information transfer agent between in-house services.

What is an API? | How do APIs Work? | REST API | SOAP API | RPC API

5 common APIs used today

There are hundreds of public and free to use APIs available online. There are even more private APIs designed by larger organisations to facilitate greater automation. The list grows daily as software developers continue to innovate and identify new opportunities in the market.

There are several APIs you use daily without ever realising. For example, your mobile phone uses the Google and Facebook APIs to create contact information automatically.

We’ve created a list of some of the more interesting APIs commonly used today and a few-up-and-comers who might shake things up in the near future:

1. Alexa Skill Management API (SMAPI)

SMAPI allows anyone to plug into Amazon’s servers and access its voice recognition database, the same used by their ALEXA virtual assistant technology.

Developers use SMAPI to create and test new skills for Alexa or enable voice recognition in appliances and software that do not already possess that capacity.

For example, using SMAPI, you could program a home computer oven to turn on and off via your smartwatch using only voice commands.

2. Travel API (Skyscanner)

Skyscanner is a travel search engine that scours the internet for travel and accommodation options, collecting them into one easily accessible place.

Skyscanner collects ticket prices, times, destinations and other relevant information, which the Travel API processes. You can access this API either directly through the Skyscanner website. Or, you can purchase the right to use the Travel API and plug it into any user interface you design, such as an app, website or widget.

3. Open European Article Number/Global Trade Item Number (EAN/GTIN) Database API

The Open EAN/GTIN database contains the barcode numbers and detailed information of over 320 million products worldwide.

The Open EAN/GTIN API lets users request this information from the database to display it on their websites. The API’s automation makes it easy to create new product listings on sales platforms like Amazon, eBay, Ocado and the like.

4. PredictionIO API

The PredictionIO API gives users access to an open-source machine learning server. This API enables developers to add automatic, predictive features to their products.

Both Spotify and Netflix use APIs similar to PredictionIO to automatically generate music playlists and TV show recommendations based on known user information.

5. Urban dictionary API

The Urban Dictionary API is an automatic service that looks up definitions of words and phrases when added to a web page.

This community-driven initiative crowdsources information to identify colloquialisms and slang on a web page. Users simply mouse over any detected words to learn their definitions in the English language.

The CurrencyTransfer API

We’re never one to fall behind the curve here at CurrencyTransfer. We’ve developed our own proprietary global payments API to help simplify your international payments through automation and ease of integration.

With just a few lines of code, your business can consolidate, automate and streamline your payment processes. Our Global Payments API helps eliminate manual processes and wasted time. Using our bespoke API solutions enables total automation and easy accounting.

Contact us today to learn more about it. We’ll strive to understand your global payment needs, provide insights and ensure a smooth integration.

Matthew Swaile

Copywriter