FOR AI AGENTS
Integrating as an AI agent
Compact, agent-oriented description of the F-sąskaita API. Base URL, authentication, spec location, pagination, error handling and rules that prevent common mistakes.
This page is written for LLM agents and coding assistants. It is intentionally dense. Humans may prefer the guides.
Facts
- Base URL:
https://app.fsaskaita.lt/api - OpenAPI 3.1 specification:
https://docs.fsaskaita.lt/openapi.json - Full documentation as text:
https://docs.fsaskaita.lt/llms-full.txt - Authentication:
Authorization: Bearer <token>. The token belongs to one business; there is no user-level or multi-business token. - Always send
Accept: application/json. Without it, unauthenticated and rate-limited requests return an HTML redirect or page instead of JSON. - Content type for invoices and profile:
application/json. Expenses usemultipart/form-databecause they carry a file. - Rate limit: 60 requests per minute per business, shared by all of its tokens. Read
X-RateLimit-Remaining; on429wait forRetry-Afterseconds. - Pagination:
?page=N, fixed 50 items per page, no filtering or sorting parameters. Response shape{ "data": [...], "meta": { "current_page", "last_page", "per_page", "total", "from", "to", "path" } }. - Single resources are wrapped:
{ "data": { ... } }. - Identifiers are UUID strings. Dates are
YYYY-MM-DD.created_atandupdated_atare Unix timestamps in seconds. Money values are JSON numbers. Currency codes are uppercase ISO 4217 and must exist inGET /currencies. - Deleting returns
200with an empty body. - Validation errors return
422with{ "message": "...", "errors": { "field.path": ["..."] } }. Messages are in Lithuanian. - Resources that belong to another business return
404.
Rules that prevent mistakes
- When updating an invoice with
PUT /invoices/{id}, send the full invoice, including its currentinvoice_number. Omitting the number assigns a new one from the series counter. - For each invoice line send exactly one of
price,totalortotal_incl_vat. The server derives the other two. typevalues ending invat_invoiceare VAT invoices. They requirevat_percentageon every line and a sellervat_code(yours from the profile whenuse_default_seller_infoistrue).- Prefer
use_default_seller_info: trueunless the caller explicitly wants to override seller details. - Draft invoices never appear in the API. Everything the API creates is a finalized, numbered invoice.
- If the PDF is not ready yet,
GET /invoices/{id}/downloadwaits up to about 20 seconds for it, so call it after creation rather than expecting the file inside the create response. - Webhook payloads are
{ "event": "<name>", "data": { ... } }, signed with HMAC-SHA256 of the raw body in theSignatureheader. Verify with the subscription secret before trusting the payload. Deliveries are attempted up to 3 times (two retries, after 10 s and 100 s); treat them as at-least-once. - There is no API for managing tokens or webhook subscriptions. Both are created by a human in the app under Settings, Integrations.
- There is no idempotency key. Do not retry a
POSTthat returned a network error without first listing recent invoices.
Instructions for your agent
Paste this into your coding agent, or point it at https://docs.fsaskaita.lt/agents/prompt.md.
Minimal request
curl https://app.fsaskaita.lt/api/profile \
-H "Authorization: Bearer $FSASKAITA_TOKEN" \
-H "Accept: application/json"Where to look next
- Endpoint shapes and every field: the OpenAPI specification or the Reference.
- Worked invoice payloads: Invoices.
- Signature verification code: Webhooks.
- Behaviour changes over time: the Changelog, also available as RSS at
/changelog.xml.
F-sąskaita / DevelopersWhat’s new