Expenses
Record purchase documents with their file, update them, replace the file, and download the original.
An expense is a purchase document you received: a supplier invoice, a receipt, a bill. The API stores its key figures and the original file. Because the file travels with the request, expense endpoints use multipart/form-data rather than JSON.
Endpoints
/expensesList expensesPOST/expensesCreate an expenseGET/expenses/{expense}Get an expenseDELETE/expenses/{expense}Delete an expensePUT/expenses/{expense}Replace an expensePOST/expenses/{expense}/fileReplace the expense fileGET/expenses/{expense}/downloadDownload the expense fileFields
| Field | Required | Notes |
|---|---|---|
file | on create | One file. Allowed extensions: pdf, jpg, jpeg, png, gif, bmp, tiff, xls, xlsx, doc, docx, odf |
date | yes | YYYY-MM-DD, the document date |
total | yes | Amount including VAT, number |
currency | yes | Code from GET /currencies, for example EUR |
seller | yes | Supplier name, up to 255 characters |
vat | no | VAT amount, number |
invoice_number | no | The supplier's document number |
Create an expense
curl -X POST https://app.fsaskaita.lt/api/expenses \
-H "Authorization: Bearer $FSASKAITA_TOKEN" \
-H "Accept: application/json" \
-F "[email protected]" \
-F "date=2026-09-08" \
-F "total=60.50" \
-F "vat=10.50" \
-F "currency=EUR" \
-F "seller=Telia Lietuva, AB" \
-F "invoice_number=TL-2026-000123"Response:
{
"data": {
"id": "2a7d6c1b-8e9f-4a0b-9c1d-2e3f4a5b6c7d",
"date": "2026-09-08",
"total": 60.5,
"currency": "EUR",
"seller": "Telia Lietuva, AB",
"created_at": 1757318400,
"updated_at": 1757318400
}
}The response does not echo vat, invoice_number or file metadata. Keep them on your side if you need them; the file itself is always retrievable through the download endpoint.
Update
PUT /expenses/{id} accepts the same multipart fields. file is optional here; when present it replaces the stored file. Many HTTP clients cannot send multipart bodies with PUT. Use PATCH, which behaves identically, or send a POST with an extra form field _method=PUT (or the header X-HTTP-Method-Override: PUT), which the API treats as a PUT. If you only need to swap the file, use POST /expenses/{id}/file.
Download the original
curl -L https://app.fsaskaita.lt/api/expenses/$ID/download \
-H "Authorization: Bearer $FSASKAITA_TOKEN" \
-H "Accept: application/json" \
-o receipt.pdfThe response streams the stored file with the original file name in Content-Disposition. The content type follows the file.
Side effects
Creating fires the expense.created webhook; updating the figures or the file fires expense.updated. Deleting fires expense.deleted and removes the stored file.