So what is an API and how can this 10x your business revenue ?

We hear a lot about partnerships in our ecosystem, one Fintech is partnering with the other to provide a new solution and have you ever asked how ? Or maybe why ?

In this article, we will discuss “how” partnerships between two totally different companies come to be beyond documents being signed, hand shakes and pictures posted.

API

The full meaning of an API is Application programmable interface, these are a set of clearly defined methods of communication between various software components. Most tech companies build API’s for internal use and for external consumers. A typical example is your Uber application where you have google maps for navigation, Uber and google are two different companies however Uber is leveraging google map API’s to service their customers.

There are various types of API’s which every company who leverages technology release. Below are categories of API’s,

For this article, we will be focusing on API’s for external customers. There are governances, securities and authentications around these API’s as businesses do not want to expose their services to bad actors or targeted malicious agents. Also, API’s power a front-end (user interface) however it doesn’t necessarily need an interface. There are various platforms for testing and documenting API’s, a simple example is Swagger ui, Postman these can be used to display documentation and test API’s.

For public API’s, they must be

1. Well documented

2. Secure

3. Functional

Documentation

All of these will be useless if there is no proper documentation on how a service or an API works. This documentation includes a quick start guide, authentication information, Api request types, sample code for popular programming languages, Tutorials, SDK examples (if available).

Documentation may be static and interactive. The latter allows for trying out APIs and see return results and usually consists of two columns: human and machine. The human column contains API descriptions, and the machine one has a console to make calls and contains info that clients and servers will be interested in when testing the API.

Mode of Authentications

Publicly available API’s usually have some form of Authentication or Authorization. In most cases, Authenticated requests are differentiated from regular requests via special Http header(s) or cookies. These headers or cookies are mostly identifiers that are tied to a particular customer. For example:- A company “A” wants to use the API of another company “B”. Company B then goes ahead to create an identifier for company A. The possible ways company A can choose to implement this “identifier” varies as different technologies exist for solving such problems like HMAC, JWT , uuid each with its own different way of implementation.

HTTPS

It’s the transport protocol ( how data is transferred over the internet ) with an extra layer of security ( SSL ). This layer makes data transferred encrypted in a way that only the client and server can understand.

URL

Stands for a Uniform resource locator. It refers to a unique address that is used to locate resources over the internet. Resources could be images, https etc. In this context URL is the address for the API server and would mostly be called “endpoint”

API request types

We use HTTP verbs, to perform CRUD operations e.g create , read , update and delete.

GET request

An HTTP method that’s principally used for fetching data. Data can be added to GET request parameters

POST request

An HTTP method that’s principally used for sending data to the server. For POST requests a “request body” is required.

PUT OR PATCH request

An HTTP methods that’s used for updating data on the server. For PUT requests a “request body” is required. N.B:- this request completely replaces the resource.

DELETE request

An HTTP method that’s principally used for deleting data on the server.

For every request, there is a response and in API calls there are various types of response formats. We will be looking at the JSON (JavaScript object notation) response structure which is supported by Rest API’s. REST is the most popular however there are others like SOAP.

REST is considered a simpler alternative to SOAP, which many developers find difficult to use because it requires writing a lot of code to complete every task and following the XML structure for every message sent. REST follows another logic since it makes data available as resources. Each resource is represented by a unique URL, and one can request this resource by providing its URL.

Web APIs that comply with REST architectural constraints are called RESTful APIs. These APIs use HTTP requests (AKA methods or verbs) to work with resources: GET, PUT, HEAD, POST, PATCH, CONNECT, TRACE, OPTIONS and DELETE.

RESTful systems support messaging in different formats, such as plain text, HTML, YAML, XML, and JSON, while SOAP only allows XML. The ability to support multiple formats for storing and exchanging data is one of the reasons REST is a prevailing choice for building public APIs these days.

JavaScript Object Notation (JSON) is a lightweight and easy-to-parse text format for data exchange. Each JSON file contains collections of name or value pairs and ordered lists of values. Since these are universal data structures, the format can be used with any programming language.

A simple Get request and response below:-

Base URL

This refers to the URL from which other endpoints on an API can be derived from. E.g

Considering the url “https://findme.com/10001” , the base url is “https://findme.com” as other endpoints like “https://findme.com/user/profile”, “https://findme.com/all” can be derived from it. For the endpoints, described “/user/profile” and “/all” are said to be paths

HTTP Status codes

These are standard numbers that are generally used to know the nature of the response returned from the server. E.g A response returned from an API with status “400” means that the data sent to the server was bad i.e “Bad Request”, “200" means request sent was ok i.e “ OK” See more http codes here.

For businesses who aim to grow, or to 10x your revenue, the most notable path from this article is collaboration, some services would take months or years to build however there are companies who have these today. The onus is on business owners, developers, product managers to think outside the box around various services and confirm that their business licenses are in order to resell those services (if yes, go ahead to request API’s from said company).

In conclusion,

For every partnership, within the Fintech space or between two software companies there are various API’s calls behind the scenes delivering the user experience the end-user consumes and also comes to love, a perfect example is watching YouTube videos on your Twitter timeline or paying your cable tv bills on bank applications or even accessing this medium post from various platforms.

To improve our way of life, we need to build software that makes living easier and collaborate when or where there are opportunities to foster business growth.

If you found the content you have just read interesting and want the series to continue. Leave a comment below.

Product Manager , Technology.