Bookkeeping

Attach a receipt

books_attach_receipt · Changes data · Markdown

Attaches a receipt from the file store to an entry that has none.

$0.01 a call

From your agent’s balance. A call that fails costs nothing.

An example

Here's the receipt for entry 61, the printer cartridges. Attach it.

Your agent callsbooks_attach_receipt$0.01 a call

The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.

With these arguments
{
  "entry": 61,
  "file_id": "9a7b2c4d-1e3f-4a5b-8c6d-0e1f2a3b4c5d"
}
What comes back
{
  "entry": {
    "entry": 61,
    "date": "2026-10-09",
    "memo": "Expense: Büro Hansa",
    "reference": null,
    "party": "Büro Hansa",
    "source": "expense",
    "total": "64.90",
    "currency": "EUR",
    "rate": null,
    "lines": [
      {
        "account": "6400",
        "account_name": "Office supplies",
        "debit": "54.54",
        "credit": null,
        "description": "Büro Hansa",
        "tax": "VAT 19%"
      },
      {
        "account": "1300",
        "account_name": "Tax to reclaim",
        "debit": "10.36",
        "credit": null,
        "description": "VAT 19%",
        "tax": "VAT 19%"
      }
    ],
    "reverses": null,
    "reversed_by": null,
    "receipt_file_id": "9a7b2c4d-1e3f-4a5b-8c6d-0e1f2a3b4c5d",
    "recorded_at": "2026-10-15T14:29:47+00:00",
    "recorded_by": "key 4101 (Pip)"
  }
}

Use it when

A receipt turned up after the cost was booked.

What it does

Attach a receipt or invoice from the file store to an entry that has none. It stays with the books: the file can't be deleted while the entry has it.

What comes back

The entry with its receipt. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
entryRequiredintegerThe entry number. At least 1.
file_idRequiredstringA file_id from the file store. Exactly 36 characters.

The call

Over MCP, call books_attach_receipt on https://api.conecto.chat/mcp/books. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/books_attach_receipt \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"entry":61,"file_id":"9a7b2c4d-1e3f-4a5b-8c6d-0e1f2a3b4c5d"}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
no_books409The business keeps no books yet.Set them up with books_setup (base currency, start date).
not_found404No entry has that number, or the file is not in the store.Check the entry with books_list_entries and the file with files_list.
has_receipt409The entry has a receipt already.Leave it, or reverse the entry and book it again.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md