Developer Docs

Send your first invoice in 5 minutes

FiscalLink Core is a headless API gateway. Send a single JSON request — we generate CIUS-RO UBL 2.1 XML, authenticate with ANAF, and handle all retries automatically.

Quickstart
1. Get your API key

Sign up at app.fiscallink.io → API Keys → Generate Key. Copy your key — it's shown once.

2. Submit an invoice
curl -X POST https://core.autoanaf.ro/v1/invoices \
  -H "Authorization: Bearer fl_your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "invoiceNumber": "FACT-2026-001",
    "issueDate": "2026-05-16",
    "currency": "RON",
    "issuer": {
      "name": "Firma Ta SRL",
      "vatNumber": "RO12345678"
    },
    "buyer": {
      "name": "Client SRL",
      "vatNumber": "RO87654321"
    },
    "items": [{
      "name": "Servicii consultanta",
      "quantity": 1,
      "unitPrice": 1000.00,
      "vatRate": 19,
      "totalAmount": 1190.00
    }]
  }'
3. Response (202 Accepted)
{
  "invoiceId": "1b7afb13-90bf-4df2-ab57-064d0f270ceb",
  "invoiceNumber": "FACT-2026-001",
  "jobId": "4cbdc05a-6555-4c35-b7f4-949cd1d48c21",
  "status": "pending",
  "message": "Invoice created and ANAF submission queued"
}
4. Check status
GET /v1/invoices/{invoiceId}
Authorization: Bearer fl_your-key
Authentication

Every request requires your FiscalLink API key in the Authorization header:

Authorization: Bearer fl_<your-api-key>

Keys are formatted as fl_<base64url-random-32-bytes>. Only a SHA-256 hash is stored — the plaintext key is shown once at creation and cannot be recovered.

API Reference
POST
/v1/invoices

Create invoice + enqueue ANAF submission

GET
/v1/invoices

List all invoices (paginated)

GET
/v1/invoices/{id}

Get invoice + job status

GET
/v1/invoices/{id}/ubl

Download UBL 2.1 XML

POST
/v1/invoices/generate-xml

Preview UBL XML (no persistence)

GET
/v1/jobs/{id}

Get job details + audit logs

GET
/v1/auth/anaf/authorize

Start ANAF OAuth2 flow (browser)

GET
/v1/auth/anaf/status

Check ANAF connection health

POST
/v1/auth/anaf/token

Manually inject ANAF token

POST
/v1/keys

Generate new API key