Overview
The Export Expenses endpoint allows you to download your expense data in structured formats for external analysis, reporting, or archival purposes. You can export all expenses or use the same filtering options available in the List Expenses endpoint.This endpoint returns file data directly rather than JSON, so the response format differs from other API endpoints.
Query Parameters
Export format:
csv
- Comma-separated values file (Excel compatible)pdf
- Portable Document Format (currently not implemented)
Filtering Parameters
All filtering parameters from the List Expenses endpoint are supported:Filter by supplier CzUid
Filter by expense category ID
Filter by payment status (paid, unpaid, overdue, registered)
Filter by currency code
Filter by payment type ID (1-7)
Start date for filtering expenses
End date for filtering expenses
Sort field (created_at, date, due_date, amount)
Sort order (asc, desc)
Response Formats
CSV Export (format=csv
)
The CSV export includes the following columns:
Column | Description |
---|---|
Reference | Reference number or invoice number |
Date | Expense date |
Due Date | Payment due date |
Supplier | Supplier name |
Category | Expense category name |
Description | Expense description |
Amount | Total amount |
Currency | Currency code |
VAT % | VAT percentage |
Amount without VAT | Amount excluding VAT |
VAT Amount | VAT amount |
Status | Payment status (Paid/Unpaid) |
Payment Date | Date when expense was paid (if applicable) |
Payment Type | Payment method name (if paid) |
- UTF-8 encoding with BOM for Excel compatibility
- Comma-separated values
- Headers included in first row
- Filename format:
expenses_YYYY-MM-DD.csv
PDF Export (format=pdf
)
PDF export is currently not implemented. The endpoint will return a JSON error message indicating this feature is not yet available.
Response Headers
CSV Export
Error Responses
Pagination Behavior
Unlike the List Expenses endpoint, the export endpoint does not use pagination. It will export all expenses matching your filter criteria in a single file. Be mindful when exporting large datasets.Use Cases
Accounting Integration
Export expenses for import into accounting software:Monthly Reporting
Generate monthly expense reports:Audit Preparation
Export all expenses for a specific period for auditing:Category Analysis
Export expenses by category for detailed analysis:Best Practices
File Management
- Naming conventions: Use descriptive filenames with dates
- Storage: Store exported files securely with appropriate access controls
- Cleanup: Regularly clean up old export files to save storage space
Data Integrity
- Filtering: Use appropriate filters to export only needed data
- Sorting: Sort by relevant fields for easier analysis
- Validation: Verify exported data matches your expectations
Performance Considerations
- Large exports: For very large datasets, consider using date ranges to split exports
- Scheduling: Schedule exports during off-peak hours for better performance
- Monitoring: Monitor export file sizes and processing times
Security
- Access control: Ensure only authorized users can export sensitive financial data
- Audit logging: Log export activities for security auditing
- Data handling: Follow your organization’s data protection policies for exported files
Integration Tips
- Automation: Automate regular exports for recurring reporting needs
- File processing: Build workflows to automatically process exported CSV files
- Error handling: Implement proper error handling for failed exports
- Notifications: Set up notifications for successful or failed export operations
Authorizations
Use your API key (sk_live_xxx or sk_test_xxx)
Query Parameters
Filter by supplier CzUid
Filter by category ID
Start date (Y-m-d format)
End date (Y-m-d format)
Filter by payment status
Available options:
paid
, unpaid
, overdue
Response
CSV export file
The response is of type file
.