Developer docsv1
Guides

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

Fields

FieldRequiredNotes
fileon createOne file. Allowed extensions: pdf, jpg, jpeg, png, gif, bmp, tiff, xls, xlsx, doc, docx, odf
dateyesYYYY-MM-DD, the document date
totalyesAmount including VAT, number
currencyyesCode from GET /currencies, for example EUR
selleryesSupplier name, up to 255 characters
vatnoVAT amount, number
invoice_numbernoThe 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.pdf

The 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.

F-sąskaita / DevelopersWhat’s new

On this page