Expenses

Create an expense

A currency outside the supported list answers 400 UNSUPPORTED_CURRENCY (with currency). In double-entry mode every line needs a debit account (from the line, the vendor's default account or category), else 400 EXPENSE_LINE_ACCOUNT_REQUIRED.

post/expenses

Request

  • Base URL: https://api.lumabill.ch/v1
  • URL: https://api.lumabill.ch/v1/expenses
  • Auth: HTTP bearer

Request body

vendor_idstring uuid nullable
descriptionstring required
amountnumber double required
currency'CHF' | 'EUR' | 'USD' | 'GBP' | 'JPY' | 'CAD' | 'AUD' | 'SEK' | 'NOK' | 'DKK' | 'HUF' required

ISO 4217 code of a currency the API converts (ESTV/BAZG rates). The same list applies to every currency field of the API.

exchangeRatenumber double nullable

Foreign-currency expense only: CHF per 1 unit of currency, a positive number (400 INVALID_EXCHANGE_RATE otherwise; 400 EXCHANGE_RATE_IMPLAUSIBLE when outside 0.5x to 2x of the ESTV/BAZG rate of the date (0.0001 to 100 without one; the body carries officialRate, min, max)). Omit to use the ESTV/BAZG rate of the expense date (the monthly average rate when the profile uses the Monatsmittelkurs for that year). On an update the stored rate is kept unless currency changes or a new exchangeRate is sent; an omitted exchangeRate keeps it, an explicit null drops a stored manual rate and converts at the ESTV/BAZG rate of the expense date again. A booked, paid or revalued expense keeps its currency and rate (400 CURRENCY_LOCKED, also for null).

datestring date required
categorystring nullable
vat_ratenumber double nullable
receipt_urlstring uri nullable

Example request

{
  "description": "Office supplies - Q2 2025",
  "amount": 84.5,
  "currency": "CHF",
  "date": "2025-05-10",
  "category": "Office Supplies",
  "vat_rate": 8.1
}

Response

Expense created

idstring uuid required
profile_idstring uuid required
vendor_idstring uuid nullable
descriptionstring required
amountnumber double required
currency'CHF' | 'EUR' | 'USD' | 'GBP' | 'JPY' | 'CAD' | 'AUD' | 'SEK' | 'NOK' | 'DKK' | 'HUF' required

ISO 4217 code of a currency the API converts (ESTV/BAZG rates). The same list applies to every currency field of the API.

exchangeRatenumber double nullable

CHF per 1 unit of currency the expense was booked at; null in the base currency

baseCurrencyAmountnumber double nullable

The expense total in CHF

datestring date required
categorystring nullable
vat_ratenumber double nullable
receipt_urlstring uri nullable
created_atstring date-time required

Example response

{
  "id": "b2c3d4e5-2345-6789-bcde-f01234567890",
  "profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "vendor_id": "4fb96g75-6828-5673-c4gf-g12345678901",
  "description": "Office supplies - Q2 2025",
  "amount": 84.5,
  "currency": "CHF",
  "date": "2025-05-10",
  "category": "Office Supplies",
  "vat_rate": 8.1,
  "receipt_url": "https://files.lumabill.com/receipts/abc123.pdf",
  "created_at": "2025-05-10T14:00:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.