Addlify / Docs / API

REST API Documentation

Programmatic access to Addlify Finance and Legal for Enterprise customers. Bulk contract scanning, ERP integration, compliance audit log.

EN RO
On this page

Authentication & rate limits

All Enterprise API endpoints authenticate via your license key or a scoped API key generated from your account dashboard. Always send keys over HTTPS — never in URL query strings for production scripts (use POST body instead).

📦 Plan requirement: Cabinet plan unlocks audit log; Enterprise plan unlocks bulk scan + ERP API. Each Addlify product (Finance, Legal) has its own license key — they're not interchangeable.

Rate limits

EndpointLimitWindow
bulk-scan.php200 requestsper hour, per license
erp-api.php500 requestsper hour, per license
audit.php (GET)30 requestsper hour, per IP

Exceeding limits returns HTTP 429 with JSON {"success": false, "message": "Prea multe cereri"}.

Legal — Bulk contract scan

Enterprise only

POST https://addlify.uk/api/legal/bulk-scan.php

Scans one or multiple contract texts against Addlify Legal rule packs (UK + Romanian law). Returns issues with article/section citations and suggested rewordings.

Request parameters

FieldRequiredDescription
license_keyRequiredYour Enterprise Legal license key (or scoped API key with legal_bulk_scan permission)
textRequired*Contract text (single scan). Max 200 KB.
text[]Optional*Array of contract texts (bulk scan, max 10 per request). Use instead of text.
langOptionalro (default), en, or auto (heuristic detection)

Example — single contract

# cURL — scan a Romanian contract clause
curl -X POST https://addlify.uk/api/legal/bulk-scan.php \
  -d "license_key=LEGAL-XXXX-XXXX-XXXX-XXXX" \
  --data-urlencode "text=Furnizorul își rezervă dreptul de a modifica unilateral tarifele oricând, fără preaviz." \
  -d "lang=ro"

Example — bulk scan (Python)

import requests

clauses = [
    "Furnizorul își rezervă dreptul de a modifica unilateral...",
    "The Provider reserves the right to unilaterally modify...",
]

r = requests.post(
    "https://addlify.uk/api/legal/bulk-scan.php",
    data={
        "license_key": "LEGAL-XXXX-XXXX-XXXX-XXXX",
        "text[]": clauses,
        "lang": "auto",
    },
    timeout=30,
)
result = r.json()
for idx, scan in enumerate(result["scans"]):
    print(f"Clause {idx}: {len(scan['issues'])} issues")
    for issue in scan["issues"]:
        print(f"  [{issue['severity']}] {issue['title']}")
        print(f"    Law: {issue['lawRef']}")
        print(f"    Suggestion: {issue['suggestion'][:80]}...")

Response schema

{
  "success": true,
  "scans": [
    {
      "text_index": 0,
      "issues": [
        {
          "ruleId": "B2C-UNILATERAL-MOD-001",
          "severity": "ERROR",        // ERROR | WARNING | INFO
          "category": "clauza_abuziva",
          "lawRef": "Legea 193/2000, Anexa lit. b)",
          "title": "Modificare unilaterală fără justificare",
          "description": "Profesionistul își rezervă...",
          "suggestion": "Restrânge dreptul de modificare...",
          "matchText": "...modifica unilateral...",
          "startOffset": 42,
          "endOffset": 88
        }
      ]
    }
  ],
  "meta": {
    "total_rules_evaluated": 42,
    "duration_ms": 87
  }
}

Finance — ERP integration

Enterprise only

POST https://addlify.uk/api/finance/erp-api.php

ERP integration for Addlify Finance: programmatic e-Factura UBL submission, CIF/VAT validation against ANAF, SAF-T D406 generation, deadline lookup. Designed for accounting software vendors and large firms with custom ERPs.

API key recommended: For ERP integrations, generate a dedicated API key from Account dashboard → ERP API keys. Don't embed your raw license_key in production scripts — use a scoped, revocable key.

Request parameters

FieldRequiredDescription
api_keyRequiredGenerated API key (recommended) OR your Enterprise license_key
actionRequiredOne of: cif_lookup, efactura_send, saft_generate, deadline_list
...Action-specific params (see below per action)

Example — CIF / VAT lookup

curl -X POST https://addlify.uk/api/finance/erp-api.php \
  -d "api_key=ak_live_..." \
  -d "action=cif_lookup" \
  -d "cif=RO12345678"
{
  "success": true,
  "cif": "12345678",
  "valid": true,
  "name": "FIRMA EXEMPLU SRL",
  "address": "Str. Exemplu 1, București",
  "vat_payer": true,
  "date_registered": "2010-03-15",
  "checked_at": "2026-05-09T14:22:00Z"
}

Audit log access

Cabinet+ & Enterprise

GET https://addlify.uk/api/legal/audit.php

Compliance audit log per license. Tracks scan events, firm clause CRUD, rule pack changes, brand updates, bulk scan API calls, device register/disconnect. Renders as an HTML page (designed for browser viewing); pass ?format=json for programmatic access.

Query parameters

FieldRequiredDescription
keyRequiredYour license key (Cabinet or Enterprise)
fromOptionalStart date YYYY-MM-DD (default: 30 days ago)
toOptionalEnd date YYYY-MM-DD (default: today)
formatOptionalhtml (default) or json

Example — fetch as JSON

curl "https://addlify.uk/api/legal/audit.php?key=LEGAL-XXX&from=2026-01-01&to=2026-05-09&format=json"
{
  "success": true,
  "license_key": "LEGAL-XXX...",
  "range": { "from": "2026-01-01", "to": "2026-05-09" },
  "events": [
    {
      "action": "legal_scan",
      "created_at": "2026-05-09T13:42:11Z",
      "ip": "86.123.45.67",
      "details": { "issues_found": 3, "document_chars": 12450 }
    },
    {
      "action": "legal_firm_pack_saved",
      "created_at": "2026-05-08T10:15:00Z",
      "ip": "86.123.45.67",
      "details": { "pack": "firm-internal-checks", "size": 4521 }
    }
  ]
}

Error codes

HTTPMeaningCommon cause
400Bad requestMissing required parameters, malformed input
401UnauthorizedAPI key invalid, revoked, or expired
403ForbiddenPlan doesn't include this endpoint, or key scope insufficient
404Not foundLicense key doesn't exist
413Payload too largeText exceeds 200 KB, or bulk request > 10 items
429Too many requestsRate limit hit (200/h scan, 500/h ERP, 30/h audit)
500Server errorTransient — retry with exponential backoff

All errors return JSON with {"success": false, "message": "...", "code": "..."}.

📞 Need an API key or custom integration?
Enterprise plan includes integration setup support. Email support@addlify.uk with your use case — we'll reply within 1 business day.