1 What a supplier API is
An API is an address on your supplier's server that answers with data instead of a web page. You (or a plugin) send a request to that address, and it replies with the product list: names, prices, stock, pictures and so on.
Because the answer always has the same structure, a program can read it and turn every item into a WooCommerce product, and do it again tomorrow to pick up new prices.
2 Three ways to get the products into WooCommerce
| Way | Good for | The catch |
|---|---|---|
| Spreadsheet (CSV) import | A one-off import of a small catalogue. WooCommerce has a CSV importer: the Import button on the Products screen. | Someone has to export, fix and re-upload a file every time prices change. |
| Custom code | Unusual APIs, or very specific rules. | You pay a developer to build it and again whenever the supplier changes something. |
| An API sync plugin | Most suppliers that offer a JSON API. | The API has to return products as JSON, which almost all modern supplier APIs do. |
The rest of this page is about the third way.
3 What to ask your supplier for
Before you start, get these from your supplier or from their developer documentation:
- The product list address, for example
https://api.supplier.com/v1/products. - How to authenticate: an API key, a token, a username and password, or nothing.
- Where the key goes: in a header (and its name), or in the address.
- How pages work, if the catalogue is large: which parameters choose the page and the page size.
- Limits: how many requests you may send per minute or per day.
Ask for one example answer as well. Seeing a real product in the API answer makes the field mapping a two-minute job.
4 Keys and tokens, in plain words
Most supplier APIs check who is asking. The common ways, as the plugin names them:
| In the plugin | What your supplier’s docs say |
|---|---|
| No authentication | Nothing, the list is public. |
| Bearer token | Authorization: Bearer YOUR_TOKEN |
| Token in a custom header | Their own header name, such as X-API-Key or CJ-Access-Token. |
| Basic PRO | A username and password. |
| Key in the URL PRO | Something like ?api_key=YOUR_KEY at the end of the address. |
| OAuth 2 PRO | A client ID and secret that you exchange for a token. |
| HMAC signed PRO | An app key and secret used to sign every request (AliExpress and similar). |
Treat the key like a password. Never paste it into a public page or a support forum. The plugin stores it encrypted in your own WordPress database and sends it only to the address you entered.
5 What the answer looks like
A supplier API usually answers with JSON. A typical product list looks like this:
{
"data": [
{
"id": 1042,
"title": "Cotton T-shirt",
"price": 8.50,
"stock": 120,
"category": "T-shirts",
"images": ["https://cdn.supplier.com/1042-front.jpg"]
}
],
"total": 3500
}
Two things matter here. The products sit inside data, which is the products root path. And each product has its own field names: this supplier says title, another says name or productNameEn.
6 Matching the fields to WooCommerce
Field mapping tells the importer which supplier field fills which WooCommerce field. For the example above:
| WooCommerce | Supplier field |
|---|---|
| Product ID (required) | id |
| Product name (required) | title |
| Regular price (required) | price |
| Stock | stock |
| Category | category |
| Images | images |
The product ID is the most important one: it is how the importer recognises a product on the next run and updates it instead of creating a copy.
TechCare API Product Sync fills this table for you when you press Test connection & detect fields. You only check it and fix anything it guessed wrong. Fields inside other fields use dots, such as pricing.retail. Products with sizes and colours: see importing variable products.
7 Large catalogues and pages
An API rarely sends 10,000 products in one answer. It sends a page, for example 100 products, and you ask for the next page until there are none left. Suppliers do this in one of two ways:
- limit / offset: “give me 100, skipping the first 200”, for example
?limit=100&offset=200(some call itskiporstart). - page / per_page: “give me page 3, 100 per page”, for example
?page=3&per_page=100(orpageNumandpageSize).
PRO Pro reads every page for you: choose the Pagination style, and the connection test checks that page 2 really returns different products from page 1. The free edition reads the address once, exactly as you entered it.
8 Doing it step by step
- Install TechCare API Product Sync (start with the free 7-day Pro trial: up to 50 products, no card).
- In Settings → Source and connection, paste the product list address and choose the authentication your supplier uses.
- Press Test connection & detect fields, check the mapping, and save.
- In Pricing and profit, switch on Apply pricing rules and enter your markup.
- Press Sync now on the Dashboard and watch the products arrive.
The getting started guide walks through each screen, and the CJdropshipping tutorial shows a complete real example.
9 Before you go live
- Open a few imported products and compare name, price, stock and pictures with the supplier.
- Check that your markup gives the selling prices you expect.
- Run Sync now a second time: nothing should be duplicated, and products whose data did not change are skipped.
- Decide how often to sync. Prices and stock change more often than names and pictures; Pro can run a fast price-and-stock update between full syncs. See keeping prices and stock in sync.
Try it with your supplier's API
Every Pro feature free for 7 days, up to 50 products, no card needed.
Start the free trialQuestions about your API? Email support@techcare2.com with a link to its documentation.
