Calculators API

Legal calculators API: dismissal severance, final settlement and more

Jurilia’s calculators as pure calculations over an API: you send the data and get the amount or the date with the step-by-step trace, the legal basis and the assumptions taken. If a datum that decides the result is missing, it does not make one up: it answers 409 and tells you which.

Access status

Access is open

Create your developer account, confirm your email and enable two-factor authentication (mandatory) to create your key. The library, calculators and deadlines do not use balance; companies and assistant come with 100 trial queries, no card needed.

Access will be for verified businesses worldwide.

Who it is for

  • Law-firm and labour-advisory software that wants to compute severance and final settlements without reimplementing the rules.
  • Insurers and fintechs that need the traffic compensation scale or default interest.
  • Advice platforms and legal chatbots that need a calculation that shows its work.
  • Teams building their own internal tools for lawyers.

What you can do

Twenty calculators

Employment and social security (dismissal, final settlement, reference salary, wages pending judgment, interest on late wages, surcharges), civil and commercial (child support by CPI, procedural default interest, default interest, traffic scale), criminal (record cancellation, sentence, limitation periods, plea reduction, sentencing, pre-trial detention, suspension) and administrative (silence).

A result that shows its work

Every response carries the amount or the date, the step-by-step traza, the fundamento (the articles) and the supuestos taken. Money is in euro cents and dates are civil dates (YYYY-MM-DD).

Honest when it does not know

A 409 means a datum that decides the calculation is missing or that the applicable regime is not verified against the BOE: it is not charged and there is never a default value.

A catalogue to discover them

GET /v1/dev/calculadoras lists the declared calculators by jurisdiction, with their legal basis and whether they already calculate (disponible).

The operations

  • GET/calculadoras

    Catalogue of the declared calculators, by jurisdiction Details (Spanish)

    Free
  • POST/calculadoras/despido

    Dismissal severance pay Details (Spanish)

    Free
  • POST/calculadoras/finiquito

    Final settlement (holiday pay, extra pay, days of the month) Details (Spanish)

    Free
  • POST/calculadoras/salario-regulador

    Reference salary from payslips and collective agreement Details (Spanish)

    Free
  • POST/calculadoras/salarios-tramitacion

    Wages pending judgment (salarios de tramitación) Details (Spanish)

    Free
  • POST/calculadoras/interes-mora-salario

    Interest on late payment of wages Details (Spanish)

    Free
  • POST/calculadoras/recargo-cuotas

    Surcharge for late payment of social security contributions Details (Spanish)

    Free
  • POST/calculadoras/recargo-prestaciones

    Benefit surcharge for lack of safety measures Details (Spanish)

    Free
  • POST/calculadoras/intereses-demora

    Default interest (Civil Code art. 1108, Insurance Contract Act art. 20, Law 3/2004 art. 7) Details (Spanish)

    Free
  • POST/calculadoras/mora-procesal

    Procedural default interest Details (Spanish)

    Free
  • POST/calculadoras/alimentos-ipc

    Child-support update by the consumer price index Details (Spanish)

    Free
  • POST/calculadoras/baremo

    Road-traffic accident compensation scale Details (Spanish)

    Free
  • POST/calculadoras/cancelacion-antecedentes

    Cancellation of criminal records Details (Spanish)

    Free
  • POST/calculadoras/condena

    Key dates of a prison sentence Details (Spanish)

    Free
  • POST/calculadoras/prescripcion-pena

    Limitation period of an imposed sentence Details (Spanish)

    Free
  • POST/calculadoras/prescripcion-delito

    Limitation period of an offence (Criminal Code arts. 131 and 132) Details (Spanish)

    Free
  • POST/calculadoras/conformidad

    Reduction for a guilty plea in a fast-track trial Details (Spanish)

    Free
  • POST/calculadoras/determinacion-pena

    Determination of the sentence Details (Spanish)

    Free
  • POST/calculadoras/prision

    Limits of pre-trial detention Details (Spanish)

    Free
  • POST/calculadoras/suspension

    Suspension and substitution of the sentence Details (Spanish)

    Free
  • POST/calculadoras/silencio

    Administrative silence Details (Spanish)

    Free

Request and response examples

The examples read your key from the JURILIA_API_KEY environment variable.

Dismissal severance pay

Amount in euro cents with brackets, trace, legal basis and assumptions. The daily reference salary is decided by whoever asks.

curl

curl -X POST https://api.jurilia.com/v1/dev/calculadoras/despido \
  -H "Authorization: Bearer $JURILIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"antiguedad":"2015-01-01","extincion":"2026-09-15","salarioDiarioCentimos":10000,"clase":"improcedente"}'

Python

import os
import requests

r = requests.post(
    "https://api.jurilia.com/v1/dev/calculadoras/despido",
    headers={"Authorization": f"Bearer {os.environ['JURILIA_API_KEY']}"},
    json={"antiguedad":"2015-01-01","extincion":"2026-09-15","salarioDiarioCentimos":10000,"clase":"improcedente"},
    timeout=30,
)
r.raise_for_status()
print(r.json())

JavaScript

const r = await fetch("https://api.jurilia.com/v1/dev/calculadoras/despido", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.JURILIA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"antiguedad":"2015-01-01","extincion":"2026-09-15","salarioDiarioCentimos":10000,"clase":"improcedente"}),
});
if (!r.ok) throw new Error(`HTTP ${r.status}`);
console.log(await r.json());

Response (the shape; the values are examples)

{
  "tramos": [
    { "etiqueta": "Servicio completo", "desde": "2015-01-01", "hasta": "2026-09-15",
      "meses": 141, "diasPorAnio": 33, "dias": 387.75 }
  ],
  "diasDevengados": 387.75,
  "diasIndemnizables": 387.75,
  "importeCentimos": 3877500,
  "tope": null,
  "preaviso": null,
  "fundamento": ["art. 56.1 ET"],
  "traza": ["Contrato suscrito a partir del 2012-02-12: se aplica sólo el art. 56.1 ET (DT 11.ª.1 ET).", "…"],
  "supuestos": ["El mes incompleto se computa como mes completo …", "…"]
}

The values are illustrative so you can see the exact shape of the response; they are not data from a real query.

The calculator catalogue

By jurisdiction, with their legal basis and whether they already calculate.

curl

curl "https://api.jurilia.com/v1/dev/calculadoras" \
  -H "Authorization: Bearer $JURILIA_API_KEY"

Python

import os
import requests

r = requests.get(
    "https://api.jurilia.com/v1/dev/calculadoras",
    headers={"Authorization": f"Bearer {os.environ['JURILIA_API_KEY']}"},
    timeout=30,
)
r.raise_for_status()
print(r.json())

JavaScript

const url = new URL("https://api.jurilia.com/v1/dev/calculadoras");
const r = await fetch(url, {
  headers: { Authorization: `Bearer ${process.env.JURILIA_API_KEY}` },
});
if (!r.ok) throw new Error(`HTTP ${r.status}`);
console.log(await r.json());

Response (the shape; the values are examples)

{
  "calculadoras": [
    { "orden": "social", "clave": "social.indemnizacion_despido", "nombre": "…",
      "fundamento": ["art. 56.1 ET"], "disponible": true }
  ]
}

The values are illustrative so you can see the exact shape of the response; they are not data from a real query.

Why you can trust what it returns

Trace, legal basis and assumptions

It does not just return a number: it returns how it got there and which articles it rests on.

Never a default value

If the datum that decides the calculation is missing, 409 and the specific question; if the regime is not verified, the same.

The same ones the application uses

It is not a simplified version: they are the calculators of the Jurilia application exposed as pure calculations. Nothing is stored.

Free

They use neither balance nor the trial. They only ask for your key and respect the per-minute limit.

Limits and what it does not do

  • They are indicative calculations: a lawyer reviews them before using them in a filing or in advice.
  • The data a lawyer decides (for example, the reference salary) is supplied by you: the calculator does not guess it.
  • Each calculator has its own JSON body; the detail of every field is in the reference and in the OpenAPI.
  • 120 calls per minute per key.

Price

Free. It asks for your key and respects the limit of 120 calls per minute, but uses neither balance nor the trial.

Authentication and errors

Every call carries the key of your developer account in the header Authorization: Bearer iuris_sk_…. The base address is https://api.jurilia.com. There is a limit of 120 calls per minute per key, with the headers X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset on every response. A key can carry an allow-list of IPs or networks (CIDR).

Failures come as JSON with a stable code: 401 (missing or invalid key), 402 (no balance: not served and not charged), 403 (IP not allowed), 409 (a datum that decides the calculation is missing: not charged) and 429 (too many calls in a row).

Frequently asked questions

Is there an API to calculate dismissal severance pay in Spain?
Yes: POST /v1/dev/calculadoras/despido returns the amount in euro cents with its brackets, the trace, the legal basis and the assumptions. It is free and needs the key of your developer account.
What happens if I do not send all the data?
A badly formed datum gives 400. A missing datum that decides the calculation gives 409 with the specific question, without charging. The calculator does not fill in values on its own.
Is the data I send stored?
No: they are pure calculations. No calculation data is stored and there is no client data in the API.
Can I see which calculators exist?
Yes: GET /v1/dev/calculadoras lists them by jurisdiction, with their legal basis and whether they already calculate.