ONE product:notify-me
← Receivers

product:notify-me

product family

A shopper asks to hear when a product (or one variant) is back in stock: one stock_watch row per shop, product, variant and address, reopened if it already fired. Counted per visitor (10 a day) and per IP origin (30 a day); nothing attested is refused. Says whether it is in stock now; never says whether the address is subscribed

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
public
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
Idempotent
yes
Safe to retry as-is.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/product:notify-me \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "workspace": <string>, "pid": <string>, "email": <string> }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • workspace string required The shop's workspace slug
  • pid string required The product id; must be active in that shop
  • vid string optional One variant of it; must be active
  • email string required Where to send the back-in-stock mail

Response

What comes back from the call.

  • ok boolean
  • watching boolean
  • inStock boolean Already available: no tracked variants, or one (or the one named) untracked or above zero
  • error string no_db · bad_email · bad_request · rate_limited · not_found (no such active product or variant) · too_many (50 open watches for this address in this shop)

Traffic

Every call to product:notify-me, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names product:notify-me, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 2
  • one.ie/web/src/lib/receiver-index.generated.ts:426
  • one.ie/web/src/lib/resolvers/commerce-email.ts:146
CLI 2
  • packages/cli/src/lib/receivers-index.generated.ts:439
  • packages/cli/src/lib/receivers.generated.ts:439
→

Answered by

product:notify-me one.ie/web/src/lib/resolvers/commerce-email.ts:304 Dispatched through POST /api/ask/product:notify-me, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "type": "string",
      "description": "The shop's workspace slug"
    },
    "pid": {
      "type": "string",
      "description": "The product id; must be active in that shop"
    },
    "vid": {
      "description": "One variant of it; must be active",
      "type": "string"
    },
    "email": {
      "type": "string",
      "description": "Where to send the back-in-stock mail"
    }
  },
  "required": [
    "workspace",
    "pid",
    "email"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "watching": {
      "type": "boolean"
    },
    "inStock": {
      "description": "Already available: no tracked variants, or one (or the one named) untracked or above zero",
      "type": "boolean"
    },
    "error": {
      "description": "no_db · bad_email · bad_request · rate_limited · not_found (no such active product or variant) · too_many (50 open watches for this address in this shop)",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}