Home Virto Commerce blog Why API Plays an Advanced Role in eCommerce

Why API Plays an Advanced Role in eCommerce

Sep 14, 2020 • 5 min

Ecommerce API

Articles about API (Application Programming Interface) are mostly referred to a technical audience such as system architects and software developers. In our view, such articles should also target the business audience and decision-makers in terms of expanding their knowledge horizons of business development in ecommerce. In ecommerce, API plays a much larger role than in other areas of software applications. Let us see why this is so.

The value proposition for business decision-makers

For a business audience, you can define API in a way that will be in terms of their philosophy. An API is a universal labor contract for various software modules they provide as "I can be addressed this way and that, I pledge to do this and within those limits."

There are at least five reasons for people in business units of retailer, supplier and logistics companies to be aware of the benefits that API brings to ecommerce. Customer online touchpoints that are points of customer contact with a company’s brand in websites, social networks, messengers, chatbots and online ads. All these touchpoints can use a unified business logic just because of API.

  1. Cost efficiency in running multi-store and omnichannel projects. API makes it easier and faster to develop and maintain complicated ecommerce multi-store solutions. Faster go to market, less efforts, fewer risks. 
  2. Build new channels faster. Thanks to API, it is possible to re-use the business logic from one best working touchpoint when designing and implementing this logic to another touchpoint.  It means that you can extend channels and experiment with the user experience within a short time after a new touchpoint is approved to be added to the company’s practice.
  3. Test new business ideas with minimum risks. Since API makes it possible to implement business logic for new touchpoints quickly, it becomes possible to test new business ideas and business models with minimum costs and risks. 
  4. Try new technologies in the most efficient manner. Use API as a gateway to connects touchpoints to other apps in the ecommerce ecosystem and combine data required for a very complicated business scenarios. For example, adding an AI recommendation service to a catalog for better user experience would be enough to integrate AI API with the Catalog API.  
  5. Get the project support from your IT and implementation partners. Your IT department and implementation partners always like modern technologies like API to help deliver business functionality in a predictive and productive way.

That is the most important part to know about API for business users. Below, we will provide more technical information about API.


In the world of modern applications each feature, like a catalog, pricing, inventory and others talk to the other via API and all information can be extracted by using API commands. To make these commands work in a bug-free environment, an API-first approach was developed to build the web, mobile or cloud app on top of the API that was built first.  This helps you save a lot of development time and budgets on ecommerce projects, but it also lays as a basement on which other apps can be built.

One API endpoint for all ecommerce experiences

Business scenarios require the acquisition of data from multiple sources. For example, to display a product page you need to collect data from the catalog (product details), pricing (prices), inventory (stocks), marketing (promotions) and other apps and storages. 

In order for the client touchpoint to work properly with data, you need to consolidate all these data according to your business scenario and pack it in an API with a structure that is close to the business context. For example, a business scenario may require delivering all product business data (properties, description, price, discount, stock) by one command. Also, the data should be enriched. You need to add SEO, thumbnails, product specs, descriptions, etc. 

The touchpoint can load the information from multiple APIs (let’s call them A API, B API, C API, etc.), and aggregate them by itself. However, this approach requires the implementation of orchestration feature for each client app request to the server. When the number of requests between the client and the server increases, such kind of architecture could be hindering the overall system performance.

In order to reduce the chattiness inherent in the API, the discrete requests in the diagram above should be collapsed into a single request optimized for a particular client. The benefit is that the device then suffers only once from WAN latency and that it leverages the low latency and more powerful hardware server-side. As a side effect, this also puts an end to the redundancies that occur with each incoming request.

A single optimized request, such as on the second diagram, should embrace server-side parallelism to at least the same level as previously achieved, through multiple network requests from the client. Because the server-side parallelized requests are running in the same network, each one should be more performant than if it was executed from the client app.

Splitting ecommerce API by types

The universal API working perfectly for any ecommerce operation is more challenging to build than a set of specialized APIs. For example, ecommerce experience can be split into several types: 

  • Digital Catalog API – to support catalog search and browsing
  • Purchase API – to support shopping cart, checkout, payment and order operations
  • Profile API – to support customer and organizations details 
  • Authentication API – to support sign-in, registration for API and Touch and etc.

Every API has different requirements and is based on GraphQL. This modern and extensible query language makes it easy to extend and replace existing entities or create new ones.   

Digital Catalog API (Fast and Relevant Read)

This type of API must return all the data required to build product listings and run a full-text search as important features for customers.

They expect a user experience of the service that is tailored to their sense of a first-class online store. This includes a very fast response to product search requests, the ability to search by an inaccurate product description (not by product keywords), the ability to search in a native language other than English and get the local currency price. Further, customers are interested in the cross-sale offers of the related products with the same purpose and products that are often bought together with a discount.

Summary for Digital Catalog API:

  • Provides fast and relevant access to various listings
  • Less than 300 ms response (eye blink response)
  • Multi-language support
  • Multi-currency support
  • Aggregations support
  • Full-text search support

Purchase API (Transaction and Business Logic)

This API has to provide support for all operations at the payment stage of the online purchase.

From the customer's point of view, the checkout stage should provide maximum UX/UI comfort and there should be no doubts about the purchase. The customer must not encounter calculation errors and should see an exact amount to be paid for each transaction, including discounts and taxes.


  • Big amount of the transactions: Cart, Order
  • Calculation: Discount, Tax transaction
  • Payment transaction

Profile API (Flexibility and Organization Tree)

The Customer profile is processed by modules that communicate with each other by Profile API.  

This includes a transparent path of sales approval through all departments within the seller's organization. It is especially relevant for the B2B sector, where prices can be set individually and depend on many factors such as partner status, purchase volume per year, seasonal demand, etc.


  • Organization and Departments Tree 
  • Customers
  • Roles
  • Approval process. 

Authentication API

Profile API is used to support any data associated with customer identity and authentication.

An indication of users and their data security is necessary when selling goods with legal restrictions (medicines, chemicals, alcoholic products, etc.). Generally, it also to enriches the buyer's profile with “buyer habits” for providing marketing offers of similar discounted goods or some new-on-the-market advanced goods. 


  • Cross Application
  • Security 
  • Permissions

Going to Digital Experience with GraphQL protocol

To be more precise, GraphQL is not a protocol but query language used as client-server protocol.  It is an effective tool to pass requests through a stack of ecommerce middleware. The request is then inspected, transformed, modified, or halted with a response. Much more detailed info on GraphQL is available on the website of The GraphQL Foundation.

XAPI-Digital Experience Platform


API-first model is vital to modern ecommerce development for teams working on vendor and implementation partners. Splitting into a short set of operation-specific types of APIs allows you to better determine project requirements when you start to run new customer touchpoints.

Book Your Discovery Session with Our Digital Experts

You might also like...
Multi-Store eCommerce: The Ultimate Guide & Top Platforms in 2024 Multi-Store eCommerce: The Ultimate Guide & Top Platforms in 2024
 Mary Gabrielyan
Mary Gabrielyan
Mar 1, 2024 • 10 min
The Essentials of PunchOut Catalogs in B2B Ecommerce The Essentials of PunchOut Catalogs in B2B Ecommerce
 Oleg Zhuk
Oleg Zhuk
Feb 22, 2024 • 15 min
Understanding Serverless eCommerce Platforms: Complete Overview Understanding Serverless eCommerce Platforms: Complete Overview
 Oleg Zhuk
Oleg Zhuk
Jan 14, 2024 • 15 min
Copyright © 2024. All rights reserved.