Understanding Ecommerce APIs
If you work in the ecommerce industry, you know that every part of its value chain has been eaten by software: from product sourcing, inventory management, warehousing, online shopping, marketing operations, order management, payment processing, shipping, up to tax management.
Today’s state-of-the-art ecommerce software is connected to countless other services. How? Through APIs. Take a random online store using Shopify, which empowers over 1,000,000 merchants in 175 countries. Shopify connects to other services, both directly and indirectly, such as:
- Online marketplace APIs like Amazon and eBay.
- Social media APIs like Facebook and Instagram.
- Support software Zendesk is connected to the Shopify API.
- Shipping software Shippo is connected to the Shopify API.
- Shippo itself is connected to the Fedex, UPS and DHL APIs.
API integrations make both merchant and ecommerce software stronger and weaker. Stronger because they help merchants automate manual tasks, increase their sales funnel, and provide a stellar customer experience. This helps to attract and retain customers.
But weaker because it creates a dependency on third-party services, and the ecommerce provider loses control over the reliability of their application and services. We’ll show you which common issues software developers face when consuming ecommerce and logistics APIs, and how to deal with it.
Who should integrate with ecommerce and shipping APIs?
Ecommerce software developers
If you are building a software application in the ecommerce space, whether its an inventory management system, a cart solution, or shipping software, integrations with e-merchants’ existing solutions are vital.
As a developer working for an e-merchant, you may want to add services to your online store directly integrating with third-party APIs besides relying on your software providers’ integrations.
Why should you integrate with ecommerce APIs?
Automate online sellers processes
Say you are building a shipping software for e-merchants. How do you ensure that every time an order is placed on your customers’ website, it automatically triggers the shipping process on your side? The answer is: you connect to the seller ecommerce solution (like Shopify or BigCommerce) through its API. Otherwise, your customer will have to manually import the operations into your software on a daily basis (rather painful, right?).
Improve the online buyer’s experience.
Your software is only a piece, albeit an important one, of the buying experience. Being able to pull data from your product in real-time is crucial to help online sellers provide their customers with a memorable experience. How do sellers tell a buyer where a package is in the delivery process? By pulling the info from you and passing it through an API. API integrations help online sellers attract and keep buyers.
Win customers from competitors.
Look at your competitors: they are probably already integrated with ecommerce solutions and marketplaces. If not, they will fail. Native integrations are highly valuable to e-merchants; they may even be the first choice option. So any newcomer in the ecommerce space should learn how to integrate with its prospects’ existing solutions if it is willing to grab their attention.
Ecommerce APIs you should integrate with
Depending on your business, not all of the following APIs may be relevant to integrate with. Use this list as a way to acquaint yourself with the landscape of the APIs in the ecommerce & logistics space.
Ecommerce platform APIs
Ecommerce platforms help businesses set up their store and selling activities online. They handle many things, from marketing and payments, to secure checkout and shipping. This is without any doubt the most used software of online sellers. Known providers include Shopify, BigCommerce, Magento, WooCommerce, Squarespace, Weebly, Prestashop, NuOrder and Wix.
For instance, shipping software Shippo integrates with Square API to sync orders, automate shipping labels creation, email tracking numbers to customers and sync tracking info from carriers to Shopify.
Aside from their own online store, e-merchants rely on marketplaces with huge audiences to reach more customers: Amazon, eBay, Etsy, Walmart, Mercado Libre, Alibaba, Rakuten, Wish, Bonanza, and Groupon among others.
Like Shopify integrates with eBay to sync product inventory, orders and shipping processes between the two platforms.
Shipping API integrations help e-merchant streamline their checkout and delivery process. Known carriers all expose an API: USPS, FedEx, UPS, DHL, DPD, etc. You could either connect to their APIs or use a multi-carrier shipping software that handles it all for you.
Like ShipEngine does, and exposes its own API to ecommerce platforms and 3rd-party logistics providers willing to build a robust and scalable shipping brick.
Inventory and Order Management Systems APIs
Inventory and Order Management Systems allow online retailers to simplify day-to-day product operations across different distribution channels, from purchasing new products and warehousing, to receiving orders and updating stocks.
Easyship integrates with TradeGecko API to sync orders and stocks across different sales channels like Amazon, eBay, and Shopify stores. Other known software includes Sellbrite, ChannelAdvisor, Ecomdash, Stitch Labs, Veeqo, and Odoo.
Ecommerce stores with a content-first approach will sometimes build their website with a CMS that does not natively include ecommerce capabilities, like WordPress, Webflow, and Strapi. Developers can add a shopping cart to any website in minutes using carts APIs like Snipcart, Apicart, and API2Cart.
Likewise, if you need to implement payment capabilities on your website, you should have a look at payment APIs like Stripe, PayPal, Square, and Braintree. Most of them are already integrated with the above-mentioned cart solutions. For instance, Snipcart integrates with Stripe.
Creating sales invoices and purchase orders, reporting stock movements, tracking financial performance. All of it can quickly turn into a nightmare if you have to do it manually. Fortunately, accounting software such as Xero and Quickbooks expose their APIs to automate these processes. For instance, TradeGecko integrates with Xero API.
Marketing Operations APIs
To help e-merchant attract customers, developers should also integrate their software with marketing tool APIs. We won’t be able to list them all, but here are the most used ones:
- Emailing APIs to send transactional and marketing emails: Sendgrid, Postmark, Mailgun, and Mailchimp.
- SMS APIs to send text messages: Twilio, Nexmo, and MessageBird.
- Social Media APIs for social proofs (review, comment, likes): Facebook, Twitter, Instagram.
- Advertising Platform APIs: Facebook Marketing API, Google AdWords, and AdSense APIs, Amazon Product Advertising API.
APIs are a critical component of the ecommerce tech stack
API integrations have become vital to e-merchants. The problem is, you don’t have any control over the performance and reliability of your API providers. What if there is a downtime? How does it affect your application? Can your customers still use your product or buy goods on your online store? How does it impact your own revenues at the end of the month?
Maybe you are thinking “Shopify is big. Shopify API will never go down”. Bad surprise:
The most common issues you will have with ecommerce APIs
API is down
It can break entire features of your application. This is a provider-side issue and API calls will return an HTTP response with a 5xx status code, like Service Unavailable (503).
Client errors come from invalid API requests being performed. They return an HTTP response with a 4xx error code like:
- Bad Request (400) - Invalid parameters are sent
- Unauthorized (401) - The application access token has expired or was revoked
- Forbidden (403) - You do not have the appropriate user rights to access the request
- Not Found (404) - The resource specified in the request was not found
- Too many requests (429) - Your application has been rate limited - Too many requests have been made to the API.
Just look at the Handling Errors or Status Codes page of your API provider to understand how to troubleshoot 4xx errors you encountered.
Connectivity issues between client and server can also cause network errors. The server does not return any response and a socket or timeout exception is raised.
Error rate is elevated
An increasing number of errors, whether they are 4xx or 5xx errors, should alert you. As the example below shows, it can make your product completely unusable for some of your users.
API is slow
Elevated response times and timeouts should also alert you. The degraded performance will negatively impact the performance of your application.
API consumption spiked
An increasing number of API requests can cause many issues among which are higher latency and connection issues if you reach your rate-limits.
API providers will often set limits on the number of requests you can perform during a specific time window. For instance, all of Easyship’s endpoints have a limit of 60 requests per minute. You will be blocked once you make the maximum amount of requests until the window restarts. The server should return a response with a 429 status code.
API has been deprecated
Providers are constantly delivering new features and upgrading their APIs. Using a deprecated API or endpoint may not create errors right away, but it will in the long run. Look at the deprecation warnings in the response headers: they often provide helpful information to deal smartly with it.
Last but not least, consuming APIs makes you vulnerable to cyber-attacks. A flaw in the U.S. Postal Service API exposed the data of 60 million consumers. So you should know which APIs you are consuming and which data you are sending them to ensure you are not exposed.
How you should monitor ecommerce APIs
The APIs we just cited are not poor quality APIs. They just have status pages that highlight the issues they face when most API providers do not have the courtesy to do the same. And rarely are status pages accurate and up-to-date during a downtime. So you should definitely not rely on them to monitor the third-party APIs you consume.
Likewise, avoid relying on manual bot (aka synthetic monitoring) checks only. They don’t catch issues specifically related to your API usage. Have a look at your actual traffic in real-time so that every issue you face is acknowledged, troubleshot, and fixed before it impacts your users. You can either build your entire monitoring system yourself or rely on an existing API monitoring solution like Bearer.