Skip to content
↑↓ to move · Enter to open · Esc to close
Data API docsReference for the Data API v2Status
Data API

Webhooks, alerts and feed delivery

Hear about your account and your feeds as things happen: by email, in the Data hub, on your own URL, or with each run copied to your own bucket.

Events
10
Signature
HMAC-SHA256
Retries
8 tries over about 2 days
Endpoints
Free 1 · Developer 3 · Team and up 10
Price
Included, no credits

Add an endpoint

Endpoints live in the Data hub under Webhooks. Each one is a public https:// URL and the events it listens for.

  1. Open Webhooks in the Data hub and add your URL. Pick the events it should get.
  2. Copy the signing secret (whsec_…). It shows once; you can roll it later.
  3. Send a test event from the endpoint’s panel and check that your server answers 2xx.

Events

Every endpoint can listen to any of these. webhook.test always goes when you press Send test.

EventSent when
credits.lowYour credits left fall below the line of a credits alert.
credits.emptyYour account has no credits left for the period.
key.cap_reachedA key reaches its monthly credit cap.
endpoint.status_changedAn endpoint you called this week goes degraded, down or back to live.
alert.firedAny alert rule fires with Webhook ticked (feed price drops, restocks and so on).
feed.run.deliveredA feed run is delivered and its files are ready.
feed.run.heldA run is held for a check by our team before delivery.
feed.run.failedA run fails.
feed.products.changedA delivered run has new, removed, price-changed or stock-changed products.
webhook.testYou press Send test.

What we send

One POST per event with a JSON body. id stays the same on every try and replay, so you can drop duplicates. apiVersion is 1; a breaking change would get a new number. Answer 2xx within 10 seconds and do the work after.

Headers
POST /hooks/retailed HTTP/1.1
Content-Type: application/json
User-Agent: Retailed-Webhooks/1
Retailed-Signature: t=1795675320,v1=5f2b0c…e91a
Retailed-Event-Id: evt_3kQ9xVb2LmT7pZr8sWc1aYdE
Retailed-Event-Type: feed.run.delivered
Retailed-Attempt: 1
Body
{
  "id": "evt_3kQ9xVb2LmT7pZr8sWc1aYdE",
  "type": "feed.run.delivered",
  "createdAt": "2026-11-26T06:42:00.000Z",
  "apiVersion": 1,
  "data": {
    "feedId": "0b6c9d2e-1a3f-4c5d-8e9f-0a1b2c3d4e51",
    "feedName": "Sneaker shops, EU daily",
    "runId": "1c7d0e3f-2b4a-4d6e-9f0a-1b2c3d4e5f62",
    "state": "delivered",
    "url": "https://data.retailed.io/feeds/0b6c9d2e-1a3f-4c5d-8e9f-0a1b2c3d4e51"
  }
}

Check the signature

Each request carries Retailed-Signature: t=<unix seconds>,v1=<hex>. The v1 is HMAC-SHA256 of <t>.<raw body> with your secret.

  1. Read the raw body before parsing it as JSON.
  2. Refuse a t more than 5 minutes from your clock.
  3. Compute HMAC-SHA256 of t, a dot and the raw body, and compare it in constant time with each v1.
Node.js
import { createHmac, timingSafeEqual } from 'node:crypto'

// rawBody: the request body exactly as received, before any JSON parsing.
export function verifyRetailed(rawBody, header, secret, toleranceS = 300) {
  const parts = header.split(',').map((p) => p.trim())
  const t = Number(parts.find((p) => p.startsWith('t='))?.slice(2))
  if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > toleranceS) return false
  const want = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest()
  return parts
    .filter((p) => p.startsWith('v1='))
    .some((p) => {
      const got = Buffer.from(p.slice(3), 'hex')
      return got.length === want.length && timingSafeEqual(got, want)
    })
}
Python
import hashlib, hmac, time

def verify_retailed(raw_body: bytes, header: str, secret: str, tolerance_s: int = 300) -> bool:
    parts = [p.strip() for p in header.split(",")]
    t = next((p[2:] for p in parts if p.startswith("t=")), "")
    if not t.isdigit() or abs(time.time() - int(t)) > tolerance_s:
        return False
    want = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return any(hmac.compare_digest(p[3:], want) for p in parts if p.startswith("v1="))

After you roll a secret, the old one keeps signing for 24 hours: requests carry two v1 values, and either may match. Update your server within that day.

Retries and the log

A try counts as failed on anything but 2xx, a timeout after 10 seconds, or no answer. We try again after each wait below.

TryAfter
21 min
35 min
430 min
52 h
66 h
712 h
824 h
9then we stop
  • Every try shows in the endpoint’s log for 30 days, with the status, the time it took and the start of your answer.
  • Replay any delivery from the log. It keeps the same event id.
  • An endpoint that fails every delivery for 3 days is switched off and we tell you by email. Switch it on again from its panel.

Alerts

Alerts live in the Data hub under Alerts. Each rule sends by email (our branded email, to everyone who manages API keys), by webhook as alert.fired, or both. Every alert also shows in the hub’s history.

AlertFires when
Credits running lowYour credits left reach a number you choose, or below.
Key near its capA key has used a share of its monthly cap (any capped key, or one key).
Calls failingA share of today’s calls fails on our side, once 50 calls are made.
Endpoint status changeAn endpoint you called this week goes degraded, down or back.
Price dropA product’s price drops by a share or more in a delivered feed run.
Back in stock / Sold outA product goes from no size in stock to some, or the other way.
New productsA delivered run finds products the feed never had.
Feed run problemA run is held for review, fails or finishes late.

We check every 5 minutes and tell you once per problem, not every 5 minutes.

Feed delivery

Every feed run is delivered to our bucket. You choose how to pick it up:

WayHow
Signed linksThe feed’s page lists each run’s files with a download link that lasts about an hour.
Pull URLGET /v2/feeds/{id}/latest with your API key, free of credits, answers the latest delivered run.
Webhookfeed.run.delivered reaches your endpoint as soon as the files are ready, with the run’s id.
EmailA feed alert (price drop, restock, run problem) sends our email when the run is in.
Your bucketEach delivered run is copied to your own S3-compatible bucket, under <folder>/<date>/<run>/, with a latest.json that names the newest folder.

Add the bucket on the feed’s page: the endpoint (AWS S3, Cloudflare R2, Google Cloud Storage, DigitalOcean Spaces, Backblaze B2, Wasabi, OVH, Linode, Hetzner or Scaleway), the bucket, a folder and a key that can write there. We check it with a small test write before we keep it, store the secret sealed and never show it again. A failed copy never changes the run: the files stay with us and the feed shows why.

Questions

General4 questions

Do webhooks or alerts cost credits?

No. They are included in every plan. The plan only limits how many endpoints you keep: 1 on Free, 3 on Developer, 10 on Team and up.

Can I get the same event twice?

Yes, after a retry or a replay. Each event keeps one `id`, so store the ids you handled and skip repeats.

In what order do events arrive?

Usually in order, but not always after retries. Use `createdAt` and the event’s own data, not the arrival order.

Which addresses can an endpoint use?

A public `https://` address. We refuse IP addresses, localhost and names that point inside a private network.

Next