Purchasing

Record a prepayment to a supplier

purchasing_record_prepayment · Changes data · Markdown

Records a deposit the business paid a supplier before their bill, like Xero's prepayments; it waits as a credit with them.

$0.01 a call

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

An example

We paid Nordstahl a 1,190 euro deposit on order AB-2026-311 today, VAT included.

Your agent callspurchasing_record_prepayment$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
{
  "supplier": "Nordstahl Küchentechnik GmbH",
  "amount": "1190.00",
  "tax_rate": 19,
  "reference": "Anzahlung AB-2026-311"
}
What comes back
{
  "credit": {
    "number": "SC-0001",
    "kind": "prepayment",
    "status": "open",
    "date": "2026-10-14",
    "currency": "EUR",
    "amount": "1190.00",
    "left": "1190.00",
    "tax_rate": "19",
    "tax": "190.00",
    "method": "bank_transfer",
    "reference": "Anzahlung AB-2026-311",
    "note": null,
    "entry": 1,
    "supplier": {
      "supplier_id": 4101,
      "name": "Nordstahl Küchentechnik GmbH"
    },
    "history": [
      {
        "at": "2026-10-14T08:00:00+00:00",
        "what": "received",
        "amount": "1190.00"
      }
    ]
  }
}

Use it when

The business paid ahead: a deposit on an order, an advance the supplier invoiced.

What it does

Record money the business paid a supplier before their bill, like a deposit, as Xero's prepayments: it waits as a credit with the supplier (SC-0001 on) until purchasing_use_credit puts it on their bill or records it coming back. With tax_rate it carries the VAT on the supplier's advance invoice, reclaimable once paid; using it on the bill takes that VAT back off. With books kept it is posted at once: Prepayments to suppliers (1450, made when missing) and the tax to reclaim against the bank.

What comes back

credit: its number, the amount, its VAT, what is left, the supplier and the entry that booked it. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
supplierRequiredinteger or stringA supplier_id, or the supplier's name. 1 to 200 characters, at least 1.
amountRequirednumber or stringWhat was paid, tax included. Up to 24 characters.
currencystringISO 4217, e.g. "EUR". Default: the supplier's. Matches ^[A-Za-z]{3}$.
datestringWhen it was paid. Default today. Matches ^\d{4}-\d{2}-\d{2}$.
methodstringOne of: bank_transfer,card,cash,check,online,other. Default: bank_transfer.
referencestringUp to 120 characters.
notestringUp to 500 characters.
tax_ratenumberThe VAT in it, in percent, e.g. 19. Default none. 0 to 100.

The call

Over MCP, call purchasing_record_prepayment on https://api.conecto.chat/mcp/purchasing. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/purchasing_record_prepayment \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"supplier":"Nordstahl Küchentechnik GmbH","amount":"1190.00","tax_rate":19,"reference":"Anzahlung AB-2026-311"}'

When it refuses

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

CodeWhenWhat to do
not_found404No supplier of the business has that supplier_id or name.Call purchasing_list_suppliers, or add the supplier with purchasing_save_supplier.
archived409The supplier, item, location or account is archived.Bring the supplier back with purchasing_save_supplier archived: false, or use another one.
unbalanced400The debits and credits do not add up to the same amount.Make the lines balance.
before_start409The date is before the books start.Use a later date.
period_locked409The books are locked for that date.Use a later date, or unlock with books_lock.
no_rate409There is no exchange rate for the currency on that day.Pass rate, or set a standing rate with books_setup rates.
rates_loading503The day's exchange rates are still loading.Try again in a few minutes, or pass rate.
invalid_input400The amount is 0 or not a number in the currency, or the date is in the future.Fix what the message names.
limit_reached409The account has 5,000 open credits.Use or close some first.
in_progress409Another credit took the number at the same moment.Call again.

Give this to your agent.

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