Method

order.removeEntry

Delete a line (same as invoice.removeEntry).

Deletes a line of an open order. It is the same method as invoice.removeEntry; it is refused once the order is closed.

Examples

Example: with a copy of the synthetic/business-editable example book open as book.gnucash.

JSON-RPC

Request:

{"jsonrpc":"2.0","id":1,"method":"order.create","params":{"owner":"5b22073fa4e34411b07c14a77147ce6b"}}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "…"
}

Request:

{"jsonrpc":"2.0","id":2,"method":"order.addEntry","params":{"order":"00ed0000000000000000000000000001","description":"Widgets","quantity":"10","price":"2.50","account":"Income"}}

Response:

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": "…"
}

Request:

{"jsonrpc":"2.0","id":3,"method":"order.removeEntry","params":{"entry":"00ed0000000000000000000000000002"}}

Response:

{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {}
}

Command line

red-ale exec --book book.gnucash --script - <<'EOF'
order.create {"owner":"5b22073fa4e34411b07c14a77147ce6b"}
order.addEntry {"order":"00ed0000000000000000000000000001","description":"Widgets","quantity":"10","price":"2.50","account":"Income"}
order.removeEntry {"entry":"00ed0000000000000000000000000002"}
EOF

It prints:

[
  "…",
  "…",
  {}
]

MCP tool call

Tool call:

{"name":"order.create","arguments":{"owner":"5b22073fa4e34411b07c14a77147ce6b"}}

Result:

{
  "content": [
    {
      "type": "text",
      "text": "\"…\""
    }
  ]
}

Tool call:

{"name":"order.addEntry","arguments":{"order":"00ed0000000000000000000000000001","description":"Widgets","quantity":"10","price":"2.50","account":"Income"}}

Result:

{
  "content": [
    {
      "type": "text",
      "text": "\"…\""
    }
  ]
}

Tool call:

{"name":"order.removeEntry","arguments":{"entry":"00ed0000000000000000000000000002"}}

Result:

{
  "structuredContent": {}
}

Effect: destructive, on the Book.

Params

Names one line.

  • entry (Guid, required): The line.

Result

A result with nothing to report.

Type: Done.