Products are the easy part
We have not connected a shop to Amazon or Zalando ourselves and have no marketplace connector. We have, however, worked on both ends of a feed. We have read a Danish jewellery brand’s public Shopify catalogue with a Python tool to compare prices and price history, and we pull thousands of listings from public APIs into our job search. Both taught the same lesson: getting data out is easy. The hard parts are keeping it correct, noticing when it breaks, and making sure nothing happens twice.
A Shopify catalogue, by the way, sits openly at products.json. We counted one public Shopify store’s catalogue that way: 98 products. Your competitors can read your prices just as easily as a marketplace can.
Three routes
App, feed tool or your own feed
| Route | Examples | Price | Strength | Weakness |
|---|---|---|---|---|
| App inside the shop | Shopify Marketplace Connect (Amazon, eBay); WP-Lister Lite for eBay/Amazon; LitCommerce | Marketplace Connect: free up to 50 orders/month, then 1 % per order, max. $99/month | Quick start, orders flow back | One app per platform; limited to the marketplaces it knows |
| Feed tool | Channable, ChannelEngine | No public price read – quote | Many marketplaces, rules for titles and categories | Another subscription; data sits with a third party |
| Feed plugin + own script | CTX Feed, Product Feed PRO; the script below | Free core; your time or ours | You own the format and the error report | You must monitor it yourself |
Two things from wordpress.org are worth knowing. Codisto’s WooCommerce plugin – from the company behind Shopify’s Marketplace Connect – was closed in the plugin directory on 1 December 2025 with the reason “Security Issue”. If you still have it installed, remove it. And feed plugins are widely used: CTX Feed has more than 90 000 active installs and Product Feed PRO more than 80 000.
Every plugin is one more thing to update, though. When we scanned the WordPress sites we run, we found 161 different plugins across 16 installations. Pick one route, not three.
When the feed is “installed” but sends nothing
On the Danish workwear shop we maintain, Google’s feed plugin was installed but never connected to a Google account, so the products never reached Google’s free listings. Nothing crashed and no error appeared. We saw the same pattern in an n8n workflow for a salon: 12 of 207 text messages were never sent while every run reported “success”. The rule we took away: check the outcome, not just that the job ran – a page can return a normal HTTP 200 and still be wrong.
For a marketplace feed that means: count the items in the feed and on the marketplace every day, and raise an alert if the number drops.
Your own feed from WooCommerce: the script
The script fetches every published product and variation through the WooCommerce REST API and writes two files: feed.csv and feed.xml, the RSS format with g: fields that most feed tools and marketplaces can read. It skips variations without a price and lists them in an error report, because a variation without a price looks “sold out” but is really a data error. It does the same for products without a description and barcodes with a wrong check digit.
Note the CSV flavour: this is machine CSV with commas and no BOM. That is deliberately different from the CSV files JaKonto, our own product, writes for Danish Excel with a BOM, semicolons and decimal commas. A marketplace wants the former; an accountant the latter.
Create the keys in WooCommerce under REST API with read access and pass them as environment variables – never inside the file. The script has been tested against sample data (a simple product, a variable product with and without a price, and an invalid EAN), not against a live shop.
#!/usr/bin/env python3
"""WooCommerce REST -> product feed (CSV + XML) for marketplaces and feed tools.
Run: WC_URL=https://your-shop.dk WC_KEY=ck_... WC_SECRET=cs_... BRAND="Your brand" python3 woo_feed.py
Create the keys in WooCommerce > Settings > Advanced > REST API (read access only).
"""
import csv
import html
import json
import os
import re
import sys
import time
import xml.etree.ElementTree as ET
import requests
WC_URL = os.environ.get("WC_URL", "").rstrip("/")
AUTH = (os.environ.get("WC_KEY", ""), os.environ.get("WC_SECRET", ""))
BRAND = os.environ.get("BRAND", "")
CURRENCY = os.environ.get("CURRENCY", "DKK")
G = "http://base.google.com/ns/1.0"
FIELDS = ["id", "item_group_id", "title", "description", "link", "image_link",
"price", "sale_price", "availability", "gtin", "mpn", "brand"]
def get_all(path, **params):
"""Fetches every page from the WooCommerce REST API (100 per page)."""
page = 1
while True:
r = requests.get(f"{WC_URL}/wp-json/wc/v3/{path}", auth=AUTH, timeout=30,
params={"per_page": 100, "page": page, **params})
r.raise_for_status()
yield from r.json()
if page >= int(r.headers.get("X-WP-TotalPages", "1")):
break
page += 1
time.sleep(0.5) # go easy on the shop server
def gtin_ok(code):
"""GS1 check digit for EAN-8/UPC-12/EAN-13/GTIN-14."""
if not code.isdigit() or len(code) not in (8, 12, 13, 14):
return False
digits = [int(c) for c in code]
total = sum(d * (3 if i % 2 == 0 else 1) for i, d in enumerate(reversed(digits[:-1])))
return (10 - total % 10) % 10 == digits[-1]
def find_gtin(item):
"""The global_unique_id field if your WooCommerce has it, else meta from an EAN plugin."""
if item.get("global_unique_id"):
return str(item["global_unique_id"]).strip()
for meta in item.get("meta_data", []):
if meta.get("key") in ("_gtin", "_ean", "ean", "gtin", "_wpm_gtin_code"):
return str(meta.get("value") or "").strip()
return ""
def clean_text(raw, limit=5000):
text = html.unescape(re.sub(r"<[^>]+>", " ", raw or ""))
return re.sub(r"\s+", " ", text).strip()[:limit]
def make_row(product, variation, problems):
src = variation or product
key = f"{product['id']}/{variation['id']}" if variation else str(product["id"])
price = src.get("regular_price") or ""
if not price:
# A variation without a price looks "sold out" in the shop but is a data error. Count it separately.
problems["missing_price"].append(key)
return None
description = clean_text(product.get("description") or product.get("short_description"))
if not description:
problems["missing_description"].append(key)
gtin = find_gtin(src)
if gtin and not gtin_ok(gtin):
problems["invalid_gtin"].append(f"{key}:{gtin}")
gtin = ""
title = product["name"]
if variation:
options = [a.get("option", "") for a in variation.get("attributes", []) if a.get("option")]
title = f"{title} – {' / '.join(options)}" if options else title
image = (src.get("image") or {}).get("src") if variation else \
((product.get("images") or [{}])[0].get("src"))
stock = src.get("stock_status", "instock")
return {
"id": src.get("sku") or key,
"item_group_id": str(product["id"]) if variation else "",
"title": title[:150],
"description": description,
"link": src.get("permalink") or product.get("permalink", ""),
"image_link": image or "",
"price": f"{float(price):.2f} {CURRENCY}",
"sale_price": f"{float(src['sale_price']):.2f} {CURRENCY}" if src.get("sale_price") else "",
"availability": {"instock": "in_stock", "onbackorder": "backorder"}.get(stock, "out_of_stock"),
"gtin": gtin,
"mpn": src.get("sku") or "",
"brand": BRAND,
"_ids": (product["id"], variation["id"] if variation else 0),
}
def build(fetch=get_all):
rows, problems = [], {"missing_price": [], "missing_description": [], "invalid_gtin": []}
for product in fetch("products", status="publish"):
if product["type"] == "variable":
for variation in fetch(f"products/{product['id']}/variations"):
row = make_row(product, variation, problems)
if row:
rows.append(row)
elif product["type"] == "simple":
row = make_row(product, None, problems)
if row:
rows.append(row)
return rows, problems
def write_csv(rows, path="feed.csv"):
# Machine CSV: UTF-8 without BOM, comma separated. Not the Danish Excel flavour with semicolons.
with open(path, "w", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=FIELDS, extrasaction="ignore")
writer.writeheader()
writer.writerows(rows)
def write_xml(rows, path="feed.xml"):
ET.register_namespace("g", G)
rss = ET.Element("rss", {"version": "2.0"})
channel = ET.SubElement(rss, "channel")
ET.SubElement(channel, "title").text = "Product feed"
ET.SubElement(channel, "link").text = WC_URL
for row in rows:
item = ET.SubElement(channel, "item")
for field in FIELDS:
if row.get(field):
ET.SubElement(item, f"{{{G}}}{field}").text = row[field]
ET.ElementTree(rss).write(path, encoding="utf-8", xml_declaration=True)
def main():
rows, problems = build()
if not rows:
sys.exit("Feed is empty - stopping. An empty feed must never overwrite a good one.")
write_csv(rows)
write_xml(rows)
# SKU -> (product id, variation id) is used when orders come back into WooCommerce.
with open("sku_map.json", "w", encoding="utf-8") as f:
json.dump({r["mpn"]: r["_ids"] for r in rows if r["mpn"]}, f, indent=1)
print(f"{len(rows)} items written.")
for kind, keys in problems.items():
if keys:
print(f" {kind}: {len(keys)} (e.g. {', '.join(keys[:5])})", file=sys.stderr)
if __name__ == "__main__":
main()
The script also writes sku_map.json: which product and which variation each SKU belongs to. The import script below uses that file. WooCommerce picks the first matching variation when a buyer chooses attributes, and an “any/any” variation without a price can make the whole product unbuyable – so orders must always be matched on the exact variation id, never on the product name.
Orders back in: once, never twice
An order from the marketplace has to become an order in WooCommerce so that stock is drawn down in one place. The classic failure is the duplicate: the script runs again after an error and creates the same order a second time. Our work with the MobilePay API gave us the habit of an idempotency key on every call that changes something. Here the key is the marketplace’s own order number, and it is stored before the order is created. If the network drops mid-call, the order is listed for a manual check instead of being created twice.
#!/usr/bin/env python3
"""Marketplace order -> WooCommerce order. Each order is created at most once.
The order has already been fetched from the marketplace API or report and mapped to one common format.
sku_map.json comes from the feed script.
"""
import json
import os
import sqlite3
import requests
WC_URL = os.environ.get("WC_URL", "").rstrip("/")
AUTH = (os.environ.get("WC_KEY", ""), os.environ.get("WC_SECRET", ""))
DB = sqlite3.connect("imported_orders.sqlite")
DB.execute("""CREATE TABLE IF NOT EXISTS imported (
channel TEXT, external_id TEXT, woo_id INTEGER,
PRIMARY KEY (channel, external_id))""")
def import_order(channel, order, sku_map):
# 1) Reserve the order BEFORE the call. If the script dies halfway, the row stays with woo_id = NULL
# and is listed for a manual check instead of being created twice.
try:
with DB:
DB.execute("INSERT INTO imported VALUES (?, ?, NULL)", (channel, order["id"]))
except sqlite3.IntegrityError:
return None # already imported or reserved
lines = []
for line in order["lines"]:
if line["sku"] not in sku_map:
raise ValueError(f"{channel} {order['id']}: unknown SKU {line['sku']}")
product_id, variation_id = sku_map[line["sku"]]
lines.append({"product_id": product_id, "variation_id": variation_id,
"quantity": line["qty"], "total": f"{line['total']:.2f}"})
payload = {
"status": "processing",
"set_paid": True, # the marketplace has already taken the payment
"currency": order["currency"],
"billing": {"first_name": order["name"], "email": order.get("email", ""),
"country": order["country"]},
"shipping": {"first_name": order["name"], "address_1": order["address"],
"postcode": order["postcode"], "city": order["city"],
"country": order["country"]},
"line_items": lines,
"meta_data": [{"key": "_marketplace", "value": channel},
{"key": "_marketplace_order_id", "value": order["id"]}],
}
r = requests.post(f"{WC_URL}/wp-json/wc/v3/orders", auth=AUTH, json=payload, timeout=30)
r.raise_for_status()
woo_id = r.json()["id"]
with DB:
DB.execute("UPDATE imported SET woo_id = ? WHERE channel = ? AND external_id = ?",
(woo_id, channel, order["id"]))
return woo_id
def stuck_orders():
"""Orders that were reserved but never got a WooCommerce id. Check them by hand."""
return DB.execute("SELECT channel, external_id FROM imported WHERE woo_id IS NULL").fetchall()
if __name__ == "__main__":
sku_map = json.load(open("sku_map.json", encoding="utf-8"))
orders = json.load(open("orders.json", encoding="utf-8")) # from the marketplace report/API
for o in orders:
print(o["id"], import_order(o["channel"], o, sku_map))
for channel, external_id in stuck_orders():
print("CHECK BY HAND:", channel, external_id)
We tested the script against a fake WooCommerce: the same order twice gives one order, and an order whose call fails ends up on the manual-check list. Fetching from each marketplace – Amazon’s reports or API, eBay’s order API – is left out, because it differs for every one.
Buyers type their own addresses. If you want to clean them before labels are printed, danadresse.dk, our own product, can clean whole files up to 50 MB.
Shopify and many systems
On Shopify, Marketplace Connect is the easy route to Amazon and eBay; it is free up to 50 synced orders a month. For Zalando, CDON and Miinto the route usually runs through a feed tool or the marketplace’s own integration partner.
If you run many systems – shop, POS, warehouse and accounting – do not build a link between every pair. In our PBX product we did the opposite with good results: one fixed partner contract of 8–10 endpoints that every system talks to. Specific pairs such as Shopify + e-conomic are covered on integration.best-choice.dk, and WooCommerce details on woocommerce.best-choice.dk.
Sources
- Shopify App Store – Marketplace Connect — free to 50 orders/month, 1 %, max. $99, 4.2 ★ (2 166), read 01.12.2026
- wordpress.org plugin API – codistoconnect — closed 01.12.2025, “Security Issue”, read 01.12.2026
- wordpress.org plugin API (searches “amazon ebay integration”, “product feed”) — WP-Lister Lite, LitCommerce, CTX Feed, Product Feed PRO, read 01.12.2026
- Channable – pricing — page refused automated reading on 01.12.2026; no price
Questions about feeds and integration
What is a product feed?
A file or URL listing all your products in a fixed format: id, title, description, image, price, stock and barcode. The marketplace or a feed tool reads it at regular intervals.
Should we use Channable or ChannelEngine?
If you want many marketplaces at once and have no developer, a feed tool makes sense. For one or two marketplaces from WooCommerce, a feed plugin or your own script is often enough. Ask for a quote – the prices are not public.
How often should the feed update?
As often as stock changes noticeably. Price and stock matter most; descriptions can update less often. What matters is that someone notices when a feed stops working.
Can marketplace orders go straight into e-conomic or Dinero?
Yes, through the web shop or a connector. Dinero needs the Pro plan for integrations – a free organisation gets HTTP 403 from the API. See the pairs on integration.best-choice.dk.
Fixed price, no commitment
Get a fixed price for your marketplace task
Tell us briefly what you use today and what you want to achieve. A person answers by e-mail with a proposal and a fixed price before any work starts.
- A fixed price before we start
- An answer by e-mail, no calls
- Your details are used only to answer you