ONE invoice:get
← Receivers

invoice:get

invoice family

mcp

Read one estimate or invoice of your workspace, flat: its number, status (overdue and expired are read off the clock), totals, lines, dates and hosted link. `unpaid` is true for a sent invoice, so a path step can stop its reminders once the customer pays.

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.
Settles
offchain
Moves real value off chain — a balance changes.
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/invoice:get \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "id": <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 optional Defaults to the attested caller's own; the caller must control it
  • id string required The document id

Response

What comes back from the call.

  • ok boolean
  • id string
  • number string
  • kind string
  • status string draft · sent · overdue · accepted · declined · expired · paid · void
  • unpaid boolean
  • totalCents number
  • dueAt string | null
  • validUntil string | null
  • paidAt string | null
  • estimateId string | null
  • invoiceId string | null
  • url string
  • testMode boolean
  • lines object[]
  • error string sign_in_required · not_your_workspace · not_found · no_db

Traffic

Every call to invoice:get, 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 invoice:get, 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 1
  • one.ie/web/src/lib/receiver-index.generated.ts:241
Workflow 1
  • one.ie/web/src/lib/workflow-templates.ts:978
CLI 2
  • packages/cli/src/invoice.ts:161
  • packages/cli/src/lib/money-receivers.ts:50
→

Answered by

invoice:get one.ie/web/src/lib/resolvers/customer-invoice.ts:312 Dispatched through POST /api/ask/invoice:get, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "description": "Defaults to the attested caller's own; the caller must control it",
      "type": "string"
    },
    "id": {
      "type": "string",
      "description": "The document id"
    }
  },
  "required": [
    "id"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "id": {
      "type": "string"
    },
    "number": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "status": {
      "description": "draft · sent · overdue · accepted · declined · expired · paid · void",
      "type": "string"
    },
    "unpaid": {
      "type": "boolean"
    },
    "totalCents": {
      "type": "number"
    },
    "dueAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "validUntil": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "paidAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "estimateId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "invoiceId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "url": {
      "type": "string"
    },
    "testMode": {
      "type": "boolean"
    },
    "lines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "unitCents": {
            "type": "number"
          },
          "ppid": {
            "type": "string"
          }
        },
        "required": [
          "description",
          "quantity",
          "unitCents"
        ]
      }
    },
    "error": {
      "description": "sign_in_required · not_your_workspace · not_found · no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}