Purchasing

Repeat a bill

purchasing_save_repeating_bill · Changes data · Markdown

Records a supplier's bill again every so many weeks, months or years, with [Month] and [Year] filled in, like Xero's repeating bills.

$0.01 a call

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

An example

Our warehouse rent is 2,400 euros plus VAT on the first of every month, due three days later. Record it each month.

Your agent callspurchasing_save_repeating_bill$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
{
  "name": "Warehouse rent",
  "supplier": "Hafenblick Immobilien GmbH",
  "reference": "Miete [Month] [Year]",
  "lines": [
    {
      "description": "Warehouse rent, Billbrookdeich 112, [Month] [Year]",
      "unit_cost": "2400",
      "tax_rate": 19,
      "account": "6500"
    }
  ],
  "every": 1,
  "unit": "month",
  "start": "2026-11-01",
  "payment_terms_days": 3
}
What comes back
{
  "repeating": {
    "repeating_id": 4101,
    "name": "Warehouse rent",
    "supplier": {
      "supplier_id": 4102,
      "name": "Hafenblick Immobilien GmbH"
    },
    "lines": [
      {
        "description": "Warehouse rent, Billbrookdeich 112, [Month] [Year]",
        "unit_cost": "2400",
        "tax_rate": 19,
        "account": "6500"
      }
    ],
    "currency": null,
    "reference": "Miete [Month] [Year]",
    "notes": null,
    "tax_treatment": null,
    "payment_terms_days": 3,
    "every": 1,
    "unit": "month",
    "status": "active",
    "next_date": "2026-11-01",
    "upcoming": [
      "2026-11-01",
      "2026-12-01"
    ],
    "end_date": null,
    "times_left": null,
    "made": 0,
    "last_bill_id": null,
    "last_reference": null,
    "last_error": null
  }
}

Use it when

The same bill comes each month or year: rent, a lease, a subscription, a service contract.

What it does

A supplier's bill recorded again every so many weeks, months or years, like Xero's repeating bills: rent, a lease, a subscription. The supplier and lines as for purchasing_create_bill, every and unit, the start date, and an end_date or a number of times; each bill falls due payment_terms_days after its date (default the supplier's terms). Descriptions, notes and the reference may hold [Month], [Year], [Quarter] or [Week], with an offset like [Month+1]; a reference needs one, as a supplier's reference is recorded once. Conecto's worker records each bill as this key, at what purchasing_create_bill costs, and one an approval rule holds waits for that person. Change one by repeating_id: only what you pass changes; status paused stops it, active resumes it (dates it missed are skipped).

What comes back

repeating: its id, name, supplier, lines, reference, every and unit, status, the next three dates, end_date or times_left, how many were recorded, the last bill and why it waits or is paused. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
repeating_idintegerFrom purchasing_list_repeating_bills. At least 1.
namestringYour own label, e.g. "Warehouse rent". Up to 120 characters.
supplierinteger or stringA supplier_id, or the supplier's name. 1 to 200 characters, at least 1.
linesarray of objects1 to 200 items.
lines[].skustringAn Inventory item's SKU: received stock comes into Inventory. Its name is the default description. Up to 64 characters.
lines[].descriptionstringWhat is bought. Lines after the first print smaller, underneath. Up to 2,000 characters.
lines[].quantitynumber or stringDefault 1. Up to 6 decimals. Up to 24 characters.
lines[].unit_costRequirednumber or stringThe cost of one before tax; negative for a credit line (a discount). Up to 24 characters.
lines[].tax_ratenumber or stringTax percent on the line, e.g. 19. Default 0. Up to 24 characters.
lines[].accountstringThe book account the line goes to, e.g. "6600". Default: the supplier's. A sku line goes to the inventory account. Up to 20 characters.
lines[].trackingobjectWith books: tracking options, e.g. {"Department": "Warehouse"}.
lines[].import_vatbooleanThe line is import VAT from the customs notice, passed on by the carrier or billed by the customs office: unit_cost is the VAT itself, reclaimed whole (Germany's box 62, the UK's box 4), never a cost. No sku, account, tax_rate or tracking.
currencystringISO 4217, e.g. "EUR". Default: the supplier's. Matches ^[A-Za-z]{3}$.
referencestringe.g. "Rent [Month] [Year]". Up to 60 characters.
notesstringUp to 5,000 characters.
tax_treatmentstringreverse_charge: the supplier's invoice has no VAT because the business owes it (services from abroad, a reverse-charge trade at home); eu_goods: goods bought from another EU country. The lines' tax_rate is the rate owed; the VAT is owed and reclaimed at once. One of: ,reverse_charge,eu_goods.
payment_terms_daysintegerEach bill falls due this long after its date. Default: the supplier's terms. 0 to 365.
everyintegerDefault 1. 1 to 52.
unitstringOne of: week,month,year.
startstringThe first bill's date, today or later. Monthly and yearly bills keep to its day of the month. Matches ^\d{4}-\d{2}-\d{2}$.
end_datestringNo bill after this date. "" for none. Matches ^(\d{4}-\d{2}-\d{2})?$.
timesintegerHow many bills in all. 1 to 1,000.
statusstringOne of: active,paused.

The call

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

Terminal
curl -X POST https://api.conecto.chat/v1/tools/purchasing_save_repeating_bill \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Warehouse rent","supplier":"Hafenblick Immobilien GmbH","reference":"Miete [Month] [Year]","lines":[{"description":"Warehouse rent, Billbrookdeich 112, [Month] [Year]","unit_cost":"2400","tax_rate":19,"account":"6500"}],"every":1,"unit":"month","start":"2026-11-01","payment_terms_days":3}'

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.
not_found404A line's SKU is not an Inventory item, or the location does not exist.Add the item with inventory_save_items, or leave the SKU out.
archived409The supplier, item, location or account is archived.Bring the supplier back with purchasing_save_supplier archived: false, or use another one.
invalid_input400A new one lacks supplier, lines, unit or start; start is in the past; end_date is before start; or the reference has no [Month], [Year], [Quarter] or [Week].Give what the message names, with dates like 2026-11-01 from today on.
not_found404No repeating bill has that repeating_id.List them with purchasing_list_repeating_bills.
limit_reached409The account has 200 repeating bills that have not ended.Stop one with purchasing_delete_repeating_bill.

Give this to your agent.

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