Overview
The Create Expense endpoint allows you to add a new expense to your firm’s records with just 4 required fields. The API provides smart defaults for all optional fields, making expense creation quick and simple.Request Body
Required Fields (Only 4)
- 21% is the standard rate in Romania
Optional Fields with Defaults
- Defaults to RON if not provided
- Defaults to 30 days from today if not provided
- Optional, defaults to 0 (uncategorized)
- Defaults to false if not provided
- Defaults to false if not provided
- Defaults to today if is_paid is true and paid_date not provided
- Optional even when is_paid is true
- Defaults to 1 (Cash) if is_paid is true and payment_type not provided
- Optional even when is_paid is true
1
- Cash2
- Bank transfer3
- Card4
- Check5
- Promissory note6
- Other7
- Compensation
Response
Returns the created expense object with all computed fields including VAT calculations and currency conversions.Validation Rules
- Supplier: Must exist and be owned by your firm (required)
- Amount: Must be a positive number (required)
- VAT: Must be one of: 0, 5, 9, 11, 19, or 21 (required)
- Date: Must be in YYYY-MM-DD format (required)
- Category: If provided, must be a valid expense category for your firm
- Currency: If provided, must be a valid 3-letter ISO code
- Dates: All dates must be in YYYY-MM-DD format
- Payment Info: paid_date and payment_type are optional with smart defaults
VAT Calculation
The system automatically calculates VAT amounts based on your input:- If
with_vat
is true: The amount includes VAT, and VAT is extracted from the total - If
with_vat
is false: The amount excludes VAT, and VAT is added to get the total
Currency Exchange
Ifwith_currency_exchange
is enabled:
- Original amounts are kept in the expense currency
- Account amounts are calculated using the provided exchange rate
- Exchange details are stored for audit purposes
Authorizations
Use your API key (sk_live_xxx or sk_test_xxx)
Body
Supplier CzUid (required)
Amount (required, positive number)
x >= 0.01
VAT percentage (required - accepts: 0, 5, 9, 11, 19, 21)
0
, 5
, 9
, 11
, 19
, 21
Expense date (required, Y-m-d format)
Currency code (optional, defaults to RON)
Due date (optional, defaults to 30 days from today)
Payment date (optional, defaults to today if is_paid=true)
Payment type ID 1-7 (optional, defaults to 1 if is_paid=true): 1 = Cash 2 = Bank transfer 3 = Card 4 = Check 5 = Promissory note 6 = Other 7 = Compensation
1 <= x <= 7
Category ID (optional, defaults to 0)
Reference number (optional)
Description (optional)
Whether amount includes VAT (optional, defaults to false)
Whether expense is paid (optional, defaults to false)
Whether to apply currency exchange (optional)
Target currency (if with_currency_exchange)
Exchange rate (if with_currency_exchange)