ONE shopper:ordered
← Receivers

shopper:ordered

shopper family

Has this address paid for anything in your shop lately (or for this product)? Matched on the hashed address orders carry, never read back. ordered is true, false, or null with unattributed:true when a paid order with no buyer address sits in the same window (it could be theirs), so a flow's ordered === false fails closed

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
owner
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/shopper:ordered \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "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.

  • email string required The shopper's address. Hashed and matched against orders.customer_uid
  • withinHours number optional How far back to look. Default 168 (7 days), at most 2160 (90 days)
  • productId string optional Only orders that hold this product

Response

What comes back from the call.

  • ok boolean
  • ordered boolean | null
  • unattributed boolean A paid order with no buyer address in the window: ordered is null
  • withinHours number
  • error string no_db · not_found (no attested caller) · bad_email

Traffic

Every call to shopper:ordered, 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 shopper:ordered, 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:477
  • one.ie/web/src/lib/resolvers/commerce-email.ts:277
Workflow 1
  • one.ie/web/src/lib/workflow-templates.ts:1923
CLI 2
  • packages/cli/src/lib/receivers-index.generated.ts:498
  • packages/cli/src/lib/receivers.generated.ts:498
→

Answered by

shopper:ordered one.ie/web/src/lib/resolvers/commerce-email.ts:305 Dispatched through POST /api/ask/shopper:ordered, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "The shopper's address. Hashed and matched against orders.customer_uid"
    },
    "withinHours": {
      "description": "How far back to look. Default 168 (7 days), at most 2160 (90 days)",
      "type": "number"
    },
    "productId": {
      "description": "Only orders that hold this product",
      "type": "string"
    }
  },
  "required": [
    "email"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "ordered": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "unattributed": {
      "description": "A paid order with no buyer address in the window: ordered is null",
      "type": "boolean"
    },
    "withinHours": {
      "type": "number"
    },
    "error": {
      "description": "no_db · not_found (no attested caller) · bad_email",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}