B2B, B2C and D2C, the sales models in e-commerce
How the B2B, B2C and D2C models differ. Invoices, tax numbers, pricing, deferred payment terms, and how to run several sales models at once.
An API in e-commerce is how stores and marketplaces talk to other software without you in the middle. Here is a plain explanation of what an API, a REST API and a webhook are, and why every sensible sales automation rests on them.
If you sell online, the word API shows up in every tool description, integration page and plugin listing. It sounds technical, but the idea is simple. An API (Application Programming Interface) is an agreed way for two programs to exchange data, with you out of the loop and nothing retyped by hand.
The easiest comparison is a waiter in a restaurant. You (one system) say what you need. The waiter (the API) takes the order to the kitchen (the other system) and comes back with the finished dish. You do not need to know how the kitchen works, or walk in with your own frying pan. Both sides only need to agree on the menu, meaning the set of things you are allowed to ask for.
In e-commerce the dish, so to speak, is specific data: the order list from Allegro, the stock level of a product, the buyer's details for an invoice, the delivery status of a parcel. An API lets you pull or push that data automatically, instead of exporting spreadsheets and pasting them into the next system by hand.
Picture a typical day. One customer orders in your own store, a second buys on Allegro, a third on eBay. Each of those orders has to reach your accounting as an invoice, your warehouse as a stock decrease, and your carrier as a parcel. Without an API you do all that by hand, channel by channel.
With an API the same process looks different. A program (an integrator, say) asks the Allegro API: give me the new orders. The API answers with a package of data: who bought, what, for how much, with which tax number and which address. That same program sends the data to the accounting system's API, which issues an invoice with the correct VAT. It then updates the level in the warehouse module, so the same product does not sell twice on another channel.
What matters is that the data flows in an agreed, predictable format. An integration built once therefore behaves the same every time, whether one order arrives or a hundred within the hour. That is exactly what sits behind seeing every order from every platform in one place.
In practice you will meet two approaches to talking over an API: REST APIs and webhooks. They are worth telling apart when you choose tools, because they decide how quickly you see a new order.
A REST API is a request and response model. Your program sends a request, show me orders from the last hour, and the system returns data. Usually this runs in a loop: the integrator asks the platform for news every minute or few. That is simple and reliable, with a small delay, because the data is only as fresh as the last request.
A webhook works the other way round. The platform sends a signal when something happens. The moment an order is placed it knocks on your system's door with new order 12345. You are not repeating the same question, so the reaction is nearly instant and both systems carry less load.
| Trait | REST API (polling) | Webhook (notification) |
|---|---|---|
| Who starts it | Your program asks | The platform sends |
| Data freshness | Once per polling cycle | Nearly instant |
| Load | Higher, constant questions | Lower, only on an event |
| Typical use | Fetching lists, reports | New order, status change |
In a real tool the two complement each other. The webhook reports the event straight away, and the REST API pulls the full detail, or keeps stock levels in step across channels on a schedule.
Most e-commerce platforms publish an API precisely so sellers can plug external tools in. Each does it a little differently, but the shape is the same: documentation, a way to authorise, and a set of operations you may perform.
From a seller's point of view the details of each API do not matter. The effect does: the data can be pulled and pushed programmatically. The trouble starts when you want several platforms at once, because each speaks its own dialect and authorises access its own way.
That is why something usually sits between the platform and your working day, translating those dialects into one coherent view. That is the job of an integrator.
Since an API opens the door to your store's data, it has to be protected. Otherwise anyone who learned how the connection works could pull your orders or change your prices. There are two common ways to authorise, and the difference is worth understanding.
An API key is a long, random string that works like a password. You paste it into a tool, and the tool uses the key to prove to the platform that it may see the data. Convenient, but it has a weakness: if the key leaks, into a public repository or a screenshot, a stranger gains full access. Treat an API key like a password: never share it, store it safely, and replace it the moment you suspect a leak.
OAuth is the more modern and safer approach. Instead of handing over a key, you click authorise on the platform's own site (logging in to Allegro, for instance) and the platform grants the tool limited access. Two things improve at once: you never give anyone your password, and you can revoke access with one click in the platform's settings, without changing the password to your whole account.
Good tools pick the safest method a given platform offers, and store the credentials safely on their side. You do not have to remember keys or worry about rotating them, because that happens in the background.
Putting it together: an API matters because it is what makes automation possible, and automation is what saves your time and money. Without one, every order from another channel is manual clicking, and at a few dozen orders a day that is hours of work and a real risk of mistakes: the wrong tax number on an invoice, selling a product that is gone, a late despatch.
The headline: you do not need to know how to code to benefit from an API. APIs are how programs talk to each other. Your job is not writing code, it is choosing a tool that already knows how to talk to the APIs of the platforms you sell on.
That is where a ready-made integrator comes in. NavyFlame connects to marketplace and store APIs (Allegro, eBay, Shopify, WooCommerce, PrestaShop, Shoper) and to accounting systems (wFirma, inFakt, Fakturownia, iFirma), and handles all those APIs, authorisation flows and data formats on its side. You work in one panel, and the whole conversation over APIs happens underneath.
An API is an agreed way for two programs to exchange data. It works like a waiter in a restaurant: you say what you need, the API carries that to the kitchen (the other system) and comes back with the finished answer. In e-commerce an API lets you pull the order list from Allegro, or send invoice data to wFirma, without retyping anything.
No. APIs are how programs talk to each other, not how people talk to programs, so you write no code yourself. A ready-made integrator such as NavyFlame connects to the Allegro, Shopify or wFirma API for you. You supply credentials or click authorise, and the tool handles the rest.
With a REST API you (or rather your program) ask the system for data, for example checking every minute whether new orders arrived. A webhook works the other way round: the system tells you when something happens, sending a signal the moment an order is placed. Webhooks are faster and lighter on both systems, because you are not asking the same question over and over.
An API key is a long string of characters that works like a password to your store's data. Treat it like a password: never paste it anywhere public, and replace it if it leaks. OAuth is the safer option, where instead of handing over a key you authorise the application on the platform's own site, and can revoke access with one click.
Most serious platforms do: Allegro, Shopify, WooCommerce, PrestaShop and Shoper all publish APIs for sellers. They differ in scope and in how they authorise access, which is why integrating each platform looks a little different. A ready-made integrator hides those differences, handling every platform's API on its side while you work in one panel.
How the B2B, B2C and D2C models differ. Invoices, tax numbers, pricing, deferred payment terms, and how to run several sales models at once.
A comparison of the Amazon FBA and FBM logistics models: costs, control, requirements, and how to manage orders and invoices whichever fulfilment method you choose.
A backorder is a sale of a product you temporarily do not hold, fulfilled once stock returns. How to introduce it safely, how it differs from a preorder, and how to avoid overselling.
Click through the full NavyFlame demo with no sign-up and no card, and watch the tool tie orders, stock and invoices together across the APIs of different platforms.
See the demoWe use cookies to keep the site working, to measure traffic and to personalise content. Read more in our privacy policy.
Manage preferences