← Receivers

booking:create

booking family

Hold a slot for a customer; returns a ref and a payment intent when price > 0

Effect
ask
Awaits an outcome — the call returns the response below.
Cost
variable
What one call costs, so you can budget before acting.
Reversible
no
This cannot be undone. Dry-run it first where the contract allows.
Settles
offchain
Moves real value off chain — a balance changes.
Idempotent
yes
Safe to retry as-is.
Simulatable
yes
Accepts { simulate: true } — projects an outcome and commits nothing.

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/booking:create \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "slug": "clearwater", "service": "svc_x", "slotDate": "2026-06-10", "slotTime": "15:00", "customer": { "name": "Sarah", "email": "s@ex.com" } }}'

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.

  • slug string required
  • service string required
  • slotDate string required
  • slotTime string required
  • customer object required
  • details string | object optional
  • paymentRail stripe | sui optional

Response

What comes back from the call.

  • ok boolean
  • ref string
  • status pending | confirmed
  • paymentRail stripe | sui | null
  • paymentIntent object
  • escrow object
  • error string

Traffic

Every call to booking:create, 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 booking:create, 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

UI 2
  • one.ie/web/src/components/booking/AppointmentCalendar.tsx:145
  • one.ie/web/src/components/booking/BookingCalendar.tsx:312
Agent runtime 1
  • channels/src/tools/bookings.ts:39
Workflow 1
  • one.ie/web/src/lib/workflow-templates.ts:1003

Answered by

booking:create one.ie/web/src/lib/resolvers/booking.ts:240 Dispatched through POST /api/ask/booking:create, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string"
    },
    "service": {
      "type": "string"
    },
    "slotDate": {
      "type": "string"
    },
    "slotTime": {
      "type": "string"
    },
    "customer": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email",
          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
        },
        "phone": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    },
    "details": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      ]
    },
    "paymentRail": {
      "type": "string",
      "enum": [
        "stripe",
        "sui"
      ]
    }
  },
  "required": [
    "slug",
    "service",
    "slotDate",
    "slotTime",
    "customer"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "ref": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "confirmed"
      ]
    },
    "paymentRail": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "stripe",
            "sui"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "paymentIntent": {
      "type": "object",
      "properties": {
        "clientSecret": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        }
      },
      "required": [
        "clientSecret",
        "amount"
      ]
    },
    "escrow": {
      "type": "object",
      "properties": {
        "escrowId": {
          "type": "string"
        },
        "bounty": {
          "type": "number"
        },
        "deadline": {
          "type": "string"
        }
      },
      "required": [
        "escrowId",
        "bounty",
        "deadline"
      ]
    },
    "error": {
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}