Overview
The Update Expense endpoint allows you to modify an existing expense record. You can update any field including supplier, category, amounts, payment status, and other details. The system will automatically recalculate VAT and currency conversions based on your changes.Some expenses may not be modifiable if they are locked due to accounting periods or other business rules. The system will return an error if the expense cannot be modified.
Path Parameters
The CzUid of the expense to update
Request Body
All fields are optional - only include the fields you want to update. Existing values will be preserved for any fields not included in the request.Change the supplier for this expense (CzUid)
Change the expense category
Update the reference or invoice number
Update the expense description
Update the expense amount (will trigger VAT recalculation)
Change whether the amount includes VAT
Update the VAT percentage
Change the currency (will trigger currency conversion recalculation)
Update the expense date (YYYY-MM-DD)
Update the payment due date (YYYY-MM-DD)
Change the payment status
Update the payment date (only relevant if is_paid is true)
Update the payment type ID (1-7, only relevant if is_paid is true):
1
- Cash2
- Bank transfer3
- Card4
- Check5
- Promissory note6
- Other7
- Compensation
Enable or disable currency exchange
Update the target currency for exchange
Update the exchange rate
Response
Returns the updated expense object with all recalculated fields.The updated expense object with all details
Success message confirming the update
Automatic Recalculations
When you update certain fields, the system automatically recalculates related values:VAT Recalculation
- Amount changes: VAT amounts are recalculated based on the new amount and VAT percentage
- VAT percentage changes: All VAT-related amounts are recalculated
- with_vat changes: The relationship between total and VAT-exclusive amounts is recalculated
Currency Conversion
- Currency changes: Account amounts are recalculated using current exchange rates
- Exchange rate changes: Account amounts are recalculated with the new rate
Status Updates
- Payment status: The overall expense status is updated based on payment and due date information
Validation Rules
- Modifiability: The expense must not be locked by accounting rules
- Supplier: If changed, must exist and be owned by your firm
- Category: If changed, must be a valid expense category
- Amount: If changed, must be a positive number
- Dates: Must be in YYYY-MM-DD format
- Payment consistency: If marking as paid, payment_type is required
Authorizations
Use your API key (sk_live_xxx or sk_test_xxx)
Path Parameters
Expense CzUid
Body
application/json
Available options:
0
, 1
Available options:
0
, 5
, 9
, 11
, 19
, 21
Available options:
0
, 1
Required range:
1 <= x <= 7
Available options:
0
, 1