Prisma Reviews / Guides / Ecwid reviews API in Python
Ecwid reviews API in Python: custom app token, read_reviews scope, no replies
Ecwid by Lightspeed added product reviews to its REST API v3 with one endpoint, a status filter, offset paging and, unlike most review apps, a real updatedFrom filter for incremental syncs. The limits are on the access side: the API needs a paid Ecwid plan, and the custom app token only works once the read_reviews scope is added and the app reinstalled. There are no replies. This guide does it with requests, following docs.ecwid.com as Prisma’s Ecwid connector does (in beta, built from the docs). The store-platform picture is on e-commerce reviews API.
pip install requestsCredentials: the store id (a number), the secret token (secret_…) of a custom app with the read_reviews scope, and the store’s address for links.
1. Page through published reviews
import os, requests, time
STORE_ID = os.environ["ECWID_STORE_ID"]
API = f"https://app.ecwid.com/api/v3/{STORE_ID}"
H = {"Authorization": f"Bearer {os.environ['ECWID_SECRET_TOKEN']}", "Accept": "application/json"}
STORE = "https://shop.example.com"
def reviews(updated_from=None, limit=100):
offset = 0
while True:
params = {"status": "published", "sortBy": "DATE_CREATED_DESC", "offset": offset, "limit": limit}
if updated_from:
params["updatedFrom"] = updated_from
r = requests.get(f"{API}/reviews", headers=H, params=params, timeout=30)
r.raise_for_status()
body = r.json()
rows = body.get("items", [])
yield from rows
offset += limit
if len(rows) < limit or (body.get("total") is not None and offset >= body["total"]):
return
since = int(time.time()) - 7 * 86400
for rev in reviews(updated_from=since):
print(rev["id"], rev.get("rating"), (rev.get("reviewerInfo") or {}).get("name"), time.strftime("%Y-%m-%d", time.gmtime(rev["createTimestamp"])), rev.get("productId"), (rev.get("review") or "")[:80], STORE)Fields: id, status, rating (1 to 5), review (the text), productId, reviewerInfo.name, createTimestamp and updateTimestamp (Unix seconds). There is no title and no reply field. The product page link comes from GET /products/{productId} (url) if you need it. Quota: 600 requests a minute per token.
2. What the API won’t do
No reply endpoint and no reply field: Ecwid reviews can’t be answered, by API or in the admin. Unpublished reviews need a different status value; published is what customers see.
3. The same job through Prisma
Prisma connects an Ecwid store with the store id and secret token (checked for the scope before storing, encrypted), reads published reviews with updatedFrom after the first full read, and returns them in the same JSON as Shopify apps, WooCommerce, BigCommerce, Google and 80+ other platforms, with a webhook per new review.
H = {"Authorization": f"Bearer {os.environ['PRISMA_API_KEY']}"}
r = requests.get("https://api.prismareviews.com/v1/reviews", headers=H, params={"platform": "ecwid", "limit": 100}, timeout=30)
for rev in r.json()["data"]:
print(rev["rating"], rev["author"], rev["text"], rev["url"])Ecwid is read-only in Prisma, like on Ecwid, and in beta. Connection fields: Platforms. A test key returns sample reviews so the code runs now.
FAQ
What do I need to read Ecwid reviews by API?
A paid Ecwid plan (the API is not on the free plan), a custom app in the Ecwid admin (#develop-apps) with the read_reviews access scope, reinstalled after adding the scope, its secret_… token and the numeric store id.
Can I reply to Ecwid product reviews by API?
No. Ecwid reviews have no reply field and no reply endpoint, by API or in the admin. Merchants answer customers by email or on the product page content.
How do I sync only changed Ecwid reviews?
Pass updatedFrom (a Unix timestamp in seconds) to GET /reviews together with status=published and sortBy=DATE_CREATED_DESC, and page with offset and limit (100 max). The endpoint allows 600 requests a minute per token.
Ecwid, WooCommerce, Shopify apps and Google, one key.
2 locations free. Test keys return sample reviews from every platform.