Selling Products via API: How Supplier API Integration Works and How It Differs from XML Feeds

Short answer
What is selling products via API?
Selling products via API means you pull a supplier's product, image, stock and price data through a programmatic interface and sell those items in your own store. You then send each order back to the supplier through the same API and receive the tracking number. In short, the product sits in your storefront while the warehouse stays with the supplier.
A wholesaler tells you, "You can pull our products through our API and sell them." Two questions follow right away: can this really run without inventory, and am I signing up for a technical adventure? Your caution makes sense. Built well, the model saves a lot of manual work; built badly, it sells products nobody has in stock. In this guide we walk through selling products via API step by step, from the data flow to the supplier contract. We also compare it with XML and CSV feeds and cover the setup order and the technical risks.
An API is a rule-based doorway that lets two pieces of software request data from each other. We explain the basics in our guide what is an API, with examples; here we focus only on the sales model. One point matters above all: the API only gives you data. Toward the customer, you are still the seller, so pricing, delivery and returns remain your responsibility.
People often call this model "selling without inventory." However, no inventory does not mean no risk. The stock sits in the supplier's warehouse, but whether your site shows that stock correctly depends entirely on the quality of your sync.
How does selling products via API work, step by step?
Think of the model as a data flow. Every arrow stands for an API call or a notification, and each one needs an owner, an error plan and a log. The flow roughly follows this order:
- Product import: your system pulls names, descriptions, images, variants, barcodes and categories from the supplier's catalog endpoint.
- Mapping: you translate the supplier's categories and variant names into your own store structure.
- Pricing rules: you apply your own margin, fee and shipping rules to the supplier's cost and generate a retail price.
- Stock sync: you update stock and price changes on a schedule or through notifications.
- Order forwarding: once the customer pays, the order goes to the supplier's order endpoint with the shipping address.
- Tracking data: when the supplier ships, it returns the carrier and tracking number, and you pass them to the customer.
- Returns and cancellations: these flow in the opposite direction; if the supplier has no endpoint for them, you handle them by hand.
The first four steps bring data to you, and the last three hand work back to the supplier. That is why a one-way product list and a two-way sales integration are very different projects.
Which data does a supplier API provide, and what is often missing?
In practice, every supplier API is different, and no standard guarantees every field you need. So when you read the documentation, ask what is missing as well as what is there. The pattern we see most often looks like this:
- Usually included: SKU, name, description, image links, stock quantity, cost price and variants.
- Sometimes included: suggested retail price, package size and weight, country of origin, warranty details and promotional prices.
- Often missing: an order cancellation endpoint, return notifications, automatic tracking number updates and a delivered status.
Missing fields do not kill the project. Still, each gap comes back to your team as manual work. For example, if the API has no tracking field, someone has to copy tracking numbers from the supplier portal every day. Therefore, check this list line by line with the supplier's technical team before you request quotes.
Also, watch the image links. Some suppliers serve images from their own servers and change the URLs over time, which leaves broken images on your site. Copying images to your own storage is often safer, but check the supplier contract for usage rights first.
What is the difference between an API and an XML or CSV feed?
Many suppliers offer an XML or CSV file instead of an API, or alongside it. A feed is a product list that refreshes at set intervals; an API is an interface that answers each request immediately. The right choice depends on your order volume and how fast stock moves:
| Criterion | API integration | XML / CSV feed |
|---|---|---|
| Freshness | On request or on notification; you set the sync frequency | Only as fresh as the last file; data ages in between |
| Direction | Two-way: products come in, orders go out | Usually one-way: only products and stock come in |
| Order forwarding | Automatic, with your order number | Often email, a portal or manual entry |
| Error handling | Returns error codes; you can build retries and logs | A broken or missing file is harder to notice |
| Setup effort | Higher: authentication, limits, endpoint by endpoint | Lower: most platforms offer a ready import |
| Maintenance | Needs updates when the API changes versions | Needs mapping updates when the file schema changes |
| Best fit | Fast-moving stock, many orders, several suppliers | Few products, slow stock changes, low order volume |
In short, a feed is a starting point. As order volume grows and stock moves faster, the need for an API grows with it. Some stores also combine both: the catalog arrives by feed, while stock and orders flow through the API.
Which businesses does selling products via API suit?
This model is not the right answer for every business, and an honest filter now saves disappointment later. It usually makes sense in these cases:
- You want to test a broad catalog without moving it into your own warehouse.
- You have a trusted supplier with documentation and a technical team that answers questions.
- Your audience or brand lets you present the product differently.
- You want to combine several suppliers in one store.
On the other hand, the model struggles when delivery speed and unboxing are your edge. Because packing happens at the supplier, you may not be able to add your own insert or packaging. Also, if other sellers use the same API and the same images, competition quickly turns into a price war.
If you have not chosen a sales channel yet, settle the question of your own online store or a marketplace first. The integration architecture depends on that decision.
Is dropshipping the same as a supplier API integration?
No, although people often mention them together. Dropshipping is a business model: you sell without holding stock, and the supplier ships directly to the customer. An API integration is a technique: two systems share data automatically. We cover the model itself in our guide on what dropshipping is.
You can run dropshipping without an API; orders go out by email and stock comes from a spreadsheet. Conversely, a store with its own warehouse can use a supplier API just to receive prices and stock levels. So the real question is not "dropshipping or API?" but "how will I move orders and stock between us?"
The setup in this guide covers the point where both meet: selling without inventory plus an automated data flow. That combination reduces effort, but it also automates mistakes. One wrong mapping rule shows up on hundreds of products at once.
What do you need before you start selling products via API?
Before any technical work, complete this checklist. A missing item can stop the project halfway through setup:
- Supplier agreement: reseller rights, price terms, return rules and defective item handling in writing.
- API access: separate keys for test and production, the authentication method and the usage limits.
- Documentation: an endpoint list, field descriptions, error codes and a versioning policy.
- Ecommerce platform: a store system that lets external data create and update products.
- Payments: a payment provider agreement and the payment side of your refund flow.
- Invoicing and tax: who issues the invoice and with which system; confirm sales tax questions with your accountant.
- Shipping: which carrier the supplier uses and how tracking data comes back to you.
Once the list is done, the hardest part is often the software itself. If your platform's ready-made app does not support the supplier's API, someone has to write the connection. At that point, custom integration development is the way to build mapping, queue and error rules around your own workflow, rules a generic plugin does not cover. If an existing plugin already does the job, relying on it is the smarter move.
Which questions should you ask the supplier?
The supplier's sales team will say "we have an API." The technical team gives the real answer. Bring these questions to the meeting in writing:
- Is there a sandbox where we can place test orders without touching live data?
- What is your rate limit, and what response do we get when we exceed it?
- Do you push stock changes as notifications, or do we have to poll?
- Do you have endpoints for order cancellation, returns and tracking numbers?
- If we send the same order twice, can your system recognize the duplicate?
- How much notice do you give before a new API version?
- During an outage, whom do we contact and through which channel?
These answers directly shape how complex your software will be. For example, without notifications your system has to poll often; with a tight rate limit, those polls start to queue. Attaching the answers to the contract also helps if a dispute comes up later.
What are the setup steps for a supplier API integration?
Instead of going live in one move, progress in small, reversible steps. This is the order we recommend:
- Discovery: read the supplier documentation, draft a field mapping table and list the missing endpoints.
- Test connection: pull a few products with the test key and inspect the raw data.
- Mapping and pricing rules: write down category, variant and pricing rules first, then code them.
- Pilot with a small catalog: publish a narrow product group instead of the full catalog.
- Order tests: run order, cancellation and return scenarios end to end in the sandbox.
- Monitoring: set alerts for failed calls, sync delays and price deviations.
- Gradual rollout: once the pilot runs clean, grow the catalog in batches.
This order may feel slow. However, a store that publishes its full catalog on day one meets every mapping error on hundreds of products at the same time. A pilot lets you catch the error while it is still small.
How should you set up pricing rules?
The supplier's price is not your retail price; it is only where the calculation starts. A pricing rule is your written formula that turns that raw value into a selling price automatically. Factor in these items when you build it:
- The cost price and how the API reports tax, whether included or excluded.
- Payment processing fees and, if relevant, marketplace fees.
- Who pays for shipping.
- The exchange rate source and update frequency for prices in a foreign currency.
- Your rounding rule and price ending preference.
- A floor: any product that falls below it comes off sale.
Above all, do not skip the floor. If the supplier accidentally sends a zero or a very low price, your rule turns it into a retail price without question. So instead of publishing sudden, large price changes automatically, route them to an approval queue. Example scenario: when a product's price drops far below its previous value, the system unpublishes it and alerts you.
Will you sell out-of-stock products if the stock sync breaks?
Yes, and this is the most common and most expensive failure in this model. If the sync stops for a while, your site keeps showing old stock data, and a customer buys an item the supplier has already sold out. You then have to cancel the order, refund the payment and explain the situation to the customer.
You reduce this risk in three layers:
- Safety buffer: show items as sold out when only a few units remain at the supplier.
- Staleness rule: take a product off sale when its stock data has not updated for a set period.
- Checkout check: send a live stock request to the supplier right before payment.
What to do with the sold-out product page is a separate SEO question; we explain the trade-offs between deleting, redirecting and keeping it in our article on out-of-stock product pages. The point here is simpler: a sold-out item should never reach the cart.
Should you use webhooks or scheduled polling?
You learn about stock and order status in two ways. With scheduled polling, your system asks the supplier "what changed?" at set intervals. With a webhook, the supplier sends a notification to your endpoint when something changes. You can find the details in our article on webhooks versus APIs.
Webhooks are faster, but they are not enough on their own. Shopify's developer documentation states plainly that webhook delivery isn't always guaranteed and that apps should use reconciliation jobs that fetch data periodically; it also advises ignoring duplicate deliveries (Shopify webhooks documentation). That principle makes sense for supplier APIs as well.
Our practical rule: if notifications exist, use them for fast updates, but always back them with a regular reconciliation pull. That way, a missed notification gets fixed in the next reconciliation run. If there are no notifications, set the polling frequency according to the supplier's rate limit.
How do rate limits and 429 errors affect your sales?
A rate limit is the cap a supplier puts on how many requests it accepts in a given period. When you exceed it, the server usually returns status code 429. RFC 6585, which defines this code, says 429 means the user has sent too many requests in a given amount of time, and that the response may include a Retry-After header telling you how long to wait (RFC 6585).
The effect on sales is therefore direct. When the limit fills up, your stock updates lag; worse, order forwarding can get stuck in the same line. So take these precautions:
- Keep order calls in a separate, higher-priority queue than stock calls.
- Respect the Retry-After header when it arrives; if it does not, increase the wait time with each attempt.
- Instead of requesting the whole catalog every time, ask only for changed records if the API supports it.
- Log limit warnings; if they repeat often, talk to the supplier about your quota.
Why is idempotency essential so orders never reach the supplier twice?
If the network drops in the middle of an order call, your system never gets a response and sends the request again. If the supplier actually received the first request, the same item ships to the customer twice. Idempotency is the design principle that keeps a repeated request from creating a second operation; we explain it in our guide on idempotent APIs.
The payments world offers a clear official example. Stripe's documentation explains that the client generates a unique idempotency key, the server recognizes retries that carry the same key, and so a request can be safely repeated after a connection error without creating a second object (Stripe idempotent requests).
If your supplier's API supports such a key, give every order a fixed key derived from your own order number. If it does not, build the protection on your side. First, write a "sending" status to your record before the call. Then, before any retry, check whether the supplier already has a record with that order number.
Which logs should you keep?
When a customer asks "why hasn't my order arrived?", you look for the answer in your logs. Without logs, you and the supplier end up guessing. Keep at least the following:
- The time of every order call, the order number you sent and the response code the supplier returned.
- Failed calls and how many times your system retried them.
- The time of the last successful stock and price update for each product.
- Products your pricing rule routed to the approval queue.
- The time each tracking number arrived.
Also, do not log more customer personal data than you need. Instead of writing full addresses and phone numbers into logs, link entries to the order number. Then set a retention rule that clears old logs at regular intervals. Confirm your privacy obligations with your legal advisor.
How do you diagnose common problems when selling products via API?
When something breaks, follow a path from symptom to cause instead of looking for someone to blame. This diagnostic table sums up the cases we see most often:
| Symptom | Likely cause | Check | Fix |
|---|---|---|---|
| A sold-out item sold | Sync stopped or lagged | The product's last stock update time | Add a staleness rule and a checkout stock check |
| Price dropped to an absurd level | Supplier sent bad data | Compare the raw API response with the retail price | Add a price floor and an approval queue |
| Order reached the supplier twice | Retries without protection | Order call logs | Add an idempotency key or a pre-check |
| Order never reached the supplier | Error swallowed, queue blocked | Failed call list | Set an alert for failed calls |
| Updates lag for hours | Rate limit reached | Frequency of 429 responses | Pull only changes and prioritize orders |
| Broken images | Supplier changed image URLs | Response of the image link | Copy images to your storage, with permission |
| No tracking number | No endpoint, or a missed notification | Documentation and notification logs | Add a reconciliation pull or a manual process |
In practice, most issues in this table come from a missing rule, not a coding bug. So every time you fix a new error, write the rule down as well.
Who carries the legal and operational responsibility as the seller?
The customer bought from your site, so the customer sees you. Even if the item leaves the supplier's warehouse, you are the merchant. In the United States, the FTC's Mail, Internet, or Telephone Order Merchandise Rule covers internet orders. According to the FTC's business guide, you need a reasonable basis for any shipping time you state. If you cannot ship on time, you must notify the customer and offer the right to cancel for a refund (FTC business guide to the Mail Order Rule).
That rule matters a lot in this model, because the real shipping time belongs to the supplier. So align the supplier contract with the promises you make to customers:
- Base the delivery time on your site on the supplier's actual shipping time.
- Put in writing where returned items go and who pays the return cost.
- Add the supplier's role in warranty and defective item cases to the contract.
- Set up invoicing and sales tax handling with your accountant.
This section is general information, not legal advice. Rules differ by country and state, so check current obligations with official sources and confirm contracts with a lawyer.
What are the cost items?
We do not quote figures, because costs vary widely with the number of suppliers, the quality of the API and your order volume. Still, keep these items in your budget:
- Development: the connection, mapping, pricing rules, queue and error handling.
- Infrastructure: the server or cloud service that runs scheduled jobs and the queue.
- Supplier terms: some suppliers set separate conditions for API access, so ask about it in the contract.
- Maintenance: API version changes, new fields and broken mappings.
- Operations: team time spent on returns, cancellations and customer service.
- Shipping: whether rates depend on the supplier's carrier deal or on yours.
Many people assume shipping belongs to the supplier. In practice, the carrier and its terms shape your customer experience directly; see our guide to ecommerce shipping agreements for details. There is no profit promise in this model; your pricing rule and operational discipline decide the margin.
Can you also push the products to marketplaces and Google via API?
You can also use supplier data beyond your own site. We explain the logic of managing stock and prices across several marketplaces from one place in our article on marketplace integration. Each marketplace has its own developer documentation and rules, so read them before you connect.
On the Google side, the Merchant API lets you send product data to Merchant Center programmatically. According to Google's developer documentation, the products API supports partial updates for fields that change often, such as price and availability. You also need to create a data source of type API before you can insert products through it (Merchant API products guide).
As the number of channels grows, one rule becomes more important: stock needs a single source of truth. First pull supplier stock into your own system, then distribute it from there to every channel.
Which metrics should you watch during the pilot?
The pilot is where you measure whether the system actually works. However, you cannot fix what you do not measure. So write down the metrics before the pilot starts:
- Sync delay: how long a stock change at the supplier takes to reach your site.
- Stock-related cancellations: the share of orders you cancel because an item sold out.
- Failed order calls: orders that did not reach the supplier on the first attempt.
- Price deviations: how many products land in the approval queue, and why.
- Tracking delay: how long tracking data takes to reach the customer after shipment.
We do not give universal target values, because every supplier works at a different speed. Instead, treat the first week of the pilot as your baseline. Then look at the same metric again after each fix. For example, if stock-related cancellations stay flat after you add a staleness rule, the issue probably lies in the supplier's stock data itself, not in your sync. That way you talk with data instead of guesses, and you bring concrete logs to the supplier meeting. In short, the goal of the pilot is not a sales record; it is to find where the errors live.
When should you build it yourself, and when does outside help make sense?
Not every project for selling products via API needs a developer. If an official or widely used app for your platform already supports your supplier, installing and configuring it is often the right path. If you start with few products and few orders, an XML feed is a reasonable choice too.
Outside help starts to make sense in these cases:
- No ready app exists, or the app does not support order forwarding.
- You need to merge several suppliers with different formats into one catalog.
- Your pricing rules change by category, brand and exchange rate.
- You want a flow that also talks to your accounting, invoicing or shipping systems.
For the general framework of connecting a site to CRM and ERP systems, see our article on website integrations with CRM and ERP. If you are new to online selling, read our guide on how to start ecommerce before the integration; the platform decision comes before the integration decision.
How we approach supplier API integrations
At Talha Aslan and team, we handle these connections within the APIs and integrations scope of our custom software development service. We start with discovery, not code: together we map the supplier documentation, your store platform and your business rules, then turn the data model and architecture into a written scope.
We build the integration layer with queues, retries and logging rules. If it also needs to connect to your payment, shipping or accounting tools, each of those gets its own line in the scope. If the supplier has no API, or a limited one, we say so during discovery and choose an alternative path with you, such as a scheduled file exchange.
We work in sprints, and after each sprint you test a working build on a staging server. Security follows OWASP-based requirements. The code repository and cloud accounts sit in your name from day one, and after launch a maintenance contract covers updates, fixes and improvements. We make no sales or revenue promises; what we commit to is a written scope and tested releases.



