← Receivers

orders:fulfil

orders family

Mark a paid order shipped with its carrier and tracking, and mail the buyer — the fulfilment axis, never orders.status

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
member
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/orders:fulfil \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "oid": "ord_1", "carrier": "UPS", "tracking_number": "1Z999AA10123456784" }}'

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.

  • oid string required The order's primary key. Globally unique; the workspace is read OFF THE ROW, never from the request — there is deliberately no slug field here.
  • carrier string required Carrier as the seller names it, e.g. 'UPS', 'An Post'. Free text: a closed list would refuse a regional courier the seller actually used. Required — an empty carrier in a shipped mail is worse than no mail.
  • tracking_number string required The carrier's own tracking number. Required, for the same reason as carrier. Stored verbatim; never normalised, because a corrected number must be distinguishable from the original.
  • tracking_url string optional The carrier's tracking page, if the seller has one. Optional and NEVER synthesised from the carrier name — guessing a URL from 'UPS' is how a buyer lands on the wrong page.

Response

What comes back from the call.

  • ok boolean True when the order is now recorded shipped, including on an idempotent re-send.
  • oid string
  • workspace string The order's OWN workspace, echoed from the row — confirmation of which tenant was written, never an input.
  • fulfilment_status string 'unfulfilled' | 'shipped' | 'delivered'. A separate axis from `status`, which stays 'paid'/'active'.
  • carrier string | null
  • tracking_number string | null
  • tracking_url string | null
  • shipped_at number | null Unix seconds, stamped ONCE on the first fulfil. A corrected tracking number does not move it.
  • unchanged boolean True when this call matched what was already recorded: no row was written and no mail was sent. Absent on a real change.
  • emailed boolean Whether a shipped email was ATTEMPTED — not whether it arrived. False when the buyer has no address in the vault (a shredded or never-sealed row), which is a normal state and never fails the fulfilment.
  • error string 'not_found' covers absent, foreign and unattested alike — a distinguishable refusal would confirm an order id exists in some other shop.

Traffic

Every call to orders:fulfil, 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 orders:fulfil, 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/commerce/MarkShippedForm.tsx:10
  • one.ie/web/src/pages/u/[slug]/studio/orders/[oid].astro:38
API route 2
  • one.ie/web/src/lib/notify/templates/order-shipped.ts:3
  • one.ie/web/src/pages/api/storefront/order-status.ts:118

Answered by

orders:fulfil one.ie/web/src/lib/resolvers/storefront/fulfilment.ts:211 Dispatched through POST /api/ask/orders:fulfil, after the envelope validates the payload.

orders family · 2 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "oid": {
      "type": "string",
      "description": "The order's primary key. Globally unique; the workspace is read OFF THE ROW, never from the request — there is deliberately no slug field here."
    },
    "carrier": {
      "type": "string",
      "minLength": 1,
      "description": "Carrier as the seller names it, e.g. 'UPS', 'An Post'. Free text: a closed list would refuse a regional courier the seller actually used. Required — an empty carrier in a shipped mail is worse than no mail."
    },
    "tracking_number": {
      "type": "string",
      "minLength": 1,
      "description": "The carrier's own tracking number. Required, for the same reason as carrier. Stored verbatim; never normalised, because a corrected number must be distinguishable from the original."
    },
    "tracking_url": {
      "description": "The carrier's tracking page, if the seller has one. Optional and NEVER synthesised from the carrier name — guessing a URL from 'UPS' is how a buyer lands on the wrong page.",
      "type": "string"
    }
  },
  "required": [
    "oid",
    "carrier",
    "tracking_number"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "description": "True when the order is now recorded shipped, including on an idempotent re-send.",
      "type": "boolean"
    },
    "oid": {
      "type": "string"
    },
    "workspace": {
      "description": "The order's OWN workspace, echoed from the row — confirmation of which tenant was written, never an input.",
      "type": "string"
    },
    "fulfilment_status": {
      "description": "'unfulfilled' | 'shipped' | 'delivered'. A separate axis from `status`, which stays 'paid'/'active'.",
      "type": "string"
    },
    "carrier": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "tracking_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "tracking_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "shipped_at": {
      "description": "Unix seconds, stamped ONCE on the first fulfil. A corrected tracking number does not move it.",
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "unchanged": {
      "description": "True when this call matched what was already recorded: no row was written and no mail was sent. Absent on a real change.",
      "type": "boolean"
    },
    "emailed": {
      "description": "Whether a shipped email was ATTEMPTED — not whether it arrived. False when the buyer has no address in the vault (a shredded or never-sealed row), which is a normal state and never fails the fulfilment.",
      "type": "boolean"
    },
    "error": {
      "description": "'not_found' covers absent, foreign and unattested alike — a distinguishable refusal would confirm an order id exists in some other shop.",
      "type": "string"
    }
  }
}