ZIRA-MARKET Product Feed

A read-only HTTP/JSON feed of one supplier's catalogue: products, stock and categories.

Building a WordPress shop? Don't write a client — install the ZIRA-MARKET plugin, which does all of this for you. This page is for everyone else.

Start now, without a token

Send DEVTEST as the token and you get 20 sample products in exactly the real response shape. No account, no supplier, no setup.

curl "http://masa.website/api/feed/products?token=DEVTEST&limit=5"
Build and test your whole integration against the sandbox. Swap in a real token at the end and nothing else changes.

Authentication

A token is issued by the supplier whose catalogue you want to read. It names exactly one supplier and grants read-only access to that supplier's feed. Send it as a bearer token:

Authorization: Bearer zm1.eyJjIjoi...

A query parameter ?token= also works and is handy in a browser, but prefer the header in production: URLs end up in access logs, proxies and error reports.

Every request also names the supplier, so the server knows which catalogue you mean:

?dataSite=<supplier code>
A token used against a supplier it was not issued for returns 403. Treat a token like a password.

Endpoints

Method & pathWhat it returns
GET /api/feedHandshake: is the token valid, which supplier, what limits.
GET /api/feed/productsA page of the catalogue.
GET /api/feed/stockSKU and quantity only. Cheap; use this for frequent polling.
GET /api/feed/categoriesThe supplier's category tree.
POST /api/feed/aimapSuggests a mapping from the supplier's categories onto yours.

Parameters

NameMeaning
startPage index, 0-based — not a row offset. start=2&limit=50 is rows 100-149.
limitPage size. Capped at 200; a larger value is clamped, not rejected.
categoryFilter to one supplier category id.
instock1 = only rows with stock.
skuFetch a single product.
shapelite (default) or full, which adds description and dimensions.

A product

{
  "success": true,
  "supplier": "artmaroc",
  "count": 1594,          // total rows matching, so you can page to the end
  "page": 0,
  "limit": 50,
  "items": [
    {
      "id": 181292,
      "sku": "92090",
      "title": "מתלה עץ + ווי ברזל",
      "category": 9348,
      "categoryName": "מדפים ופרזול",
      "price": 95,          // the supplier's WHOLESALE price
      "instock": 10,
      "status": "active",   // "inactive" = do not sell, do not delete
      "image": "https://.../181292/photo.jpg"
    }
  ]
}
price is wholesale. Your retail price is your business — apply your own markup on your side. Never show this number to a shopper.

Rules of the road

These are not suggestions. A client that ignores them gets throttled, and a client that keeps ignoring them gets its token revoked.

1. Use ETags

Every response carries an ETag. Send it back as If-None-Match and an unchanged page answers 304 with no body. This is the single biggest thing you can do for both of us.

curl -H "If-None-Match: \"a1b2c3…\"" \
     "http://masa.website/api/feed/stock?dataSite=CODE&token=TOKEN"
# → HTTP/1.1 304 Not Modified

2. Poll at a sane rate

Stock every few hours, the full catalogue once or twice a day. Nothing in a wholesale catalogue changes fast enough to justify more, and the response is served from a snapshot that only refreshes every few minutes anyway.

3. Honour 429

A 429 carries Retry-After in seconds. Stop until it passes. Retrying immediately spends the rest of your quota on refusals.

HeaderMeaning
X-RateLimit-LimitRequests allowed in the window.
X-RateLimit-RemainingHow many you have left.
Retry-AfterSeconds to wait. Sent with a 429.

4. Match on SKU

SKU is the stable identity of a product. Ids are ours and can differ between environments.

Status codes

CodeMeaningWhat to do
200Fine.
304Unchanged since your ETag.Skip the import. This is a success.
401Token missing, malformed, expired or revoked.Ask the supplier for a new one. Do not retry.
403Valid token, wrong supplier.Check dataSite. Do not retry.
429Too many requests.Wait Retry-After seconds.

Getting a real token

Tokens are issued by the supplier, not by us. Ask them for your supplier code and your token — you need both. They arrive by email along with the plugin download.

Sandbox token DEVTEST · 20 sample rows · no supplier data · try it in your browser