Expenses

Update an expense

Partial update. The stored exchange rate is kept unless currency changes or a new exchangeRate is sent (editing lines, amount or date does not re-rate the expense). exchangeRate: null (not omitted) drops the stored rate: the expense converts at the ESTV/BAZG rate of its date again; refused with CURRENCY_LOCKED when the expense is paid or revalued. The app's revenue update (PUT /revenue/{id}, not part of this spec) follows the same rule. Currency errors (400): UNSUPPORTED_CURRENCY (with currency), CURRENCY_LOCKED (currency or rate of a booked or paid expense), FX_REVALUATION_LIVE (amount or date of a foreign-currency expense in a fiscal year with a booked FX revaluation), INVALID_EXCHANGE_RATE, EXCHANGE_RATE_IMPLAUSIBLE, AMOUNT_OUT_OF_RANGE (base amount beyond 9'999'999'999.99), VAT_CODE_NOT_VALID_FOR_DATE (e.g. 7.7 % dated 2024 or later).

put/expenses/{id}

Request

  • Base URL: https://api.lumabill.ch/v1
  • URL: https://api.lumabill.ch/v1/expenses/{id}
  • 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

Updated expense

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.