eCommerce API: What Is It & How to Harness the Power of the eCommerce API Economy
The rise of the API economy represents a seismic shift in the way eCommerce businesses operate today.
Yet surprisingly few people know what APIs are (they sound complicated, but they’re not), let alone what they can do for business. Cost savings, increased efficiency, and rapid innovation can all be yours if you harness the power of these potent business drivers.
APIs hold the key to successful digital transformation, facilitating a move away from monolithic IT systems towards microservices architectures that are straightforward, reliable, and agile. APIs are the cornerstone of today’s SaaS economy, and all eCommerce businesses should be using APIs to their advantage.
In a hurry? Here’s what you’ll find in this eCommerce API guide:
- What is an API?
- What are API providers and consumers?
- The different types of APIs: Public APIs & private APIs
- The API economy explained in one paragraph
- Monolithic vs. microservices architectures for eCommerce?
- Why monolithic architectures are terrible for eCommerce
- Why microservices architectures are perfect for eCommerce
- Why using eCommerce APIs will actually make you more money
Download this headless commerce guide
Literally everything you need to know about headless commerce.
What is an API?
Every time we look at our smartphones, we’re met by a user interface. Our devices use this user interface to communicate with us, and we use it to talk back. We use our eyes, ears, and hands to decipher information and intrinsically we understand what our device is trying to say.
An application programming interface (API) is essentially the same thing. It’s a user interface, just not for a human end-user. It’s for a machine.
An API is an interface a computer running software uses to talk to another. Computers don’t have eyes, ears, and hands (dubious dolls, notwithstanding) so it stands to reason that they need a different kind of interface to interact with one another.
What are API providers and consumers?
To fully understand the API economy, we first have to break it down into its two main constituent groups:
API providers and API consumers.
API providers are the ones who (you guessed it!) provide APIs. They take a discrete functionality within a company’s IT infrastructure (or within an app or website), turn it into a service, and put it out over the internet, usually alongside a developer portal. This portal contains reference documents, downloads, and support that developers will need to make the API work.
There are 22,406 APIs currently out there (by today’s count), some of which, like Google Maps, you’ll already be very familiar with. But, the API economy is booming, and this number is growing exponentially.
API consumers, on the other hand, consume APIs. They develop applications and integrate APIs within them. Imagine you’re building a new eCommerce site and you need mapping functionality within it.
You’d be crazy to try to build it out for yourself when you can harness the awesome power of Google Maps by entering a single line of code.
So how do API providers and consumers slot together?
They need a mutual understanding (commonly referred to as a ‘contract’) denoting exactly how this is going to work.
A useful analogy of such a contract is a standard wall socket:
In the case of a wall socket, the provider is the electrical utility, and the consumer is the appliance that’s plugged in - a toaster, for example. The contract, which allows the two to work together is the socket itself.
The socket has its own set of precise parameters by which the toaster must abide. These include the exact measurement between the holes and the specific voltage and type of current used. If anything is even slightly off, then the whole relationship breaks down and nothing works.
With a wall socket, just as with an API, the electrical utility and the appliance are interchangeable. Change the electrical utility and the toaster will still toast, providing the socket stays the same. Conversely, swap out the toaster for a blender, and the blender will blend.
This interchangeability is one of the major benefits of using APIs. Why?
Because you can change your API provider quickly and easily, assuming the contract remains the same. This gives API consumers access to the whole market of API providers, driving down costs.
The different types of APIs: Public APIs & private APIs
To complicate things slightly, there happen to be many different types of APIs, one of the most common (and relevant) for eCommerce is Web APIs.
Web APIs can be divided into two types:
1. Public APIs
Public APIs are available to the general public. Most of us use them, unwittingly, several (if not hundreds) of times a day. They can be used to do everything from book flights to check the weather, update Twitter, and get the latest football scores. They are the most famous kind of APIs but comprise only a small portion of what’s out there on the web.
2. Private APIs
Private APIs are far more common and more useful from a business standpoint. Developers make them for customers (usually paying ones) and they’re all about productivity, partnerships, and the other good stuff we explore in detail below.
Web APIs can be categorized still further by their architecture. This is where things start to get pretty technical, but it’s worth at least being aware of the different names.
The most frequently talked about architecture is REST (which stands for Representational State Transfer). It’s not a protocol as such, rather a set of architectural principles developers must adhere to, such as having simple interfaces. SOAP (which stands for Simple Object Access Protocol), XML-RPC, GraphQL and JSON-RPC are the other kinds of protocols developers can use. Each has its strengths, weaknesses and ideal use cases.
The API economy explained in one paragraph
Take all the APIs, API providers, and API consumers. Connect them into one cohesive ecosystem seamlessly via the internet. And, you have the API Economy.
Monolithic vs. microservices architectures for eCommerce?
Most eCommerce companies yet to join the API economy are still running monolithic IT architectures that are massively inefficient and creaking at the seams.
Like the map of London, monolithic infrastructures are messy, tangled, and chaotic. Services overlap, and dead-ends confront you at every turn.
In contrast, a microservices architecture uses cloud technology and APIs to disassemble monoliths into a set of independent services that are developed, deployed and maintained separately. It’s a far neater picture.
(Monolithic vs. microservice architecture)
Why monolithic architectures are terrible for eCommerce
There are many reasons, but these should be enough for you:
(4 reasons why you should use monolithic architecture)
1. They’re complicated
Like a ‘big ball of mud,’ no single developer, or group of developers, can understand a monolithic architecture in its entirety. When niggling issues arise, they persist, and nobody knows how to fix them.
2. They’re unscalable
eCommerce businesses that are scaling need their IT systems to grow with them. Scaling is very difficult for companies using monolithic architectures as they have different modules with conflicting resource requirements.
3. They’re slow
Like big ships, monolithic architectures take a long time to change course. When you see that proverbial iceberg looming on the horizon, you might be unable to react in time to avert disaster.
4. They’re not agile
In the world of eCommerce, where companies are constantly changing to meet the needs of their customers, monolithic architectures can be a considerable burden. Experimenting and innovating is slow, torturous, and fraught with risk.
Why microservices architectures are perfect for eCommerce
In contrast, here are 4 reasons why you want to go with microservices architectures:
(Micoservice architecture benefits)
1. They’re manageable
Each service is small enough to be managed and understood by one group of developers or outsourced completely, reducing staffing costs without sacrificing control, thanks to SLAs.
2. They’re resilient
Standardizing and simplifying your IT systems leads to far greater stability. With just a single point of failure, any bugs can be effectively quarantined before they cause widespread damage.
3. They’re scalable
Each service can be scaled up and down as necessary without making wholesale changes, keeping costs down, and boosting innovation.
4. They’re agile
A microservice architecture is flexible, nimble and painless when it comes to integrating new functionality. Development that used to take months can now take days.
Becoming a powerhouse in the eCommerce API economy: Why using eCommerce APIs will actually make you more money
The API economy represents a massive shift in eCommerce and one you can’t afford to ignore, lest you get caught up in an endless game of catchup with your competition.
By popping the hood of your IT system, breaking it down into its constituent parts, and rebuilding it with finely-tuned microservices, you can start to benefit from the wealth of incredible tools out there.
What effect will APIs have on your bottom line? Putting the technology to one side for a moment, here are six reasons why APIs will make you more money!
(eCommerce API benefits)
1. Cost savings
Firstly, you save money on staff costs. A developer would need to write 10,000 lines of code to achieve the functionality than an API can pull off in just one. Less code means less money spent on developers.
SaaS companies that connect to your business via APIs offer shorter contracts, so you’re not tied in with one provider who can increase prices at the drop of a hat. You can shop around, play providers off against each other, and get the best prices on the market at the time. If you’re unhappy with your provider, you can switch.
API providers tend to offer a range of packages, including pay-as-you-go type deals, so you no longer have to overspend on the additional capacity you never use. Most API providers will offer free trials, some offer free packages, and others are just free altogether.
2. Reliability and performance
Microservices architectures are inherently more stable than monolithic ones. Decreased downtime and improved speed mean improved customer retention and engagement, better conversion rates and increased revenue.
Time-to-market is paramount in the world of eCommerce. Customers are used to dealing with the likes of Amazon and expect the same level of service wherever they shop online.
Customer loyalty is lower than with brick-and-mortar stores, and if you are slow to innovate, they will take their business elsewhere, never to be seen again.
APIs afford your business the agility needed to adapt to rapidly changing customer needs and wants without overhauling your entire IT system.
4. Mergers and acquisitions
Few people associate mergers & acquisitions with APIs, but if your IT system has been split up into microservices, you will be a far more attractive proposition to prospective buyers. Why? Because they can quickly and efficiently integrate your IT systems into their own.
Conversely, if your company is the one doing the acquiring, then adding new businesses to a microservices architecture is relatively straightforward.
5. Partnerships and integrations
Partnering with other companies is great for PR, and a way to provide your customers with new, engaging, innovative products that improve loyalty and satisfaction? APIs hold the key to integrating your products and services with those of partners.
Examples of such partnerships are everywhere. Here are two chosen at random: the Hidrate Spark 2.0 Smart Water Bottle, which integrates with a FitBit or Apple Watch to adjust your daily water goal. And Bose Noise Cancelling Headphones, which have Amazon’s Alexa built-in.
There are also plenty of ‘micro-partnerships’ that you can, and probably already do, make use of on your eCommerce site. Having Facebook comments enabled on your blog posts, for example, or Trustpilot or PowerReviews reviews on your product pages makes it easier for customers to interact with your site and instills a higher degree of confidence.
(One of our clients – Stanley-PMI – integrates with PowerReviews to collect and display ratings and review content)
6. 360-degree customer view
Amazon has led the way when it comes to building a detailed picture of customer buying habits over multiple channels. Data is the world’s most valuable resource, and you mustn’t let it slip through your fingers.