Salta al contenido
glauc.cat

Herramientas

API pública de las herramientas

Cada herramienta de este sitio también se puede llamar vía HTTP GET: mismo motor de cálculo, respuesta JSON, sin registro ni clave API y sin almacenar nada. Pensada para integraciones ligeras, hojas de cálculo y scripts.

URL basehttps://glauc.catEspecificación OpenAPI/api/tools/openapi.json

Endpoints

GET/api/tools/chargeable-weightPrueba la herramienta interactiva

Parámetros

  • piecesobligatorioqty x length x width x height x weightPerPiece, “;”-separated. cm/kg (metric) or in/lb (imperial). e.g. 2x120x80x100x50;1x60x40x30x12
  • unitopcionalmetric (default) | imperial
  • stackableopcionaltrue (default) | false — affects LDM
  • airDivisoropcionalair volumetric divisor, cm³/kg (default 6000)
  • expressDivisoropcionalcourier DIM divisor (default 5000)
  • seaEquivalenceopcionalsea W/M kg per m³ (default 1000)
  • seaMinRevenueTonsopcionalLCL minimum W/M (default 1)
  • roadDensityopcionalroad volumetric density kg/m³ (default 333)
  • roadUseLdmopcionaltrue | false (default) — enable LDM basis
  • roadKgPerLdmopcionalkg per loading metre (default 1750)

Ejemplo

curl "https://glauc.cat/api/tools/chargeable-weight?pieces=2x120x80x100x50&unit=metric"

Respuesta (extracto)

{ "ok": true, "data": { "result": { "totals": { "grossKg": 100, "volumeM3": 1.92 }, "results": [ { "mode": "air", "chargeableKg": 320, "chargeableRoundedKg": 320, "basis": "volume" }, … ] } } }
GET/api/tools/cmr-deadlinesPrueba la herramienta interactiva

Parámetros

  • deliveryobligatoriodelivery date, YYYY-MM-DD
  • caseopcionaldamage (default) | totalLoss | other — Art. 32 start rule
  • wilfulopcionaltrue → 3-year limitation (default false)
  • excludedWeekdaysopcionalcomma list, 0=Sun … 6=Sat (default 0)
  • holidaysopcionalcomma list of YYYY-MM-DD public holidays
  • holidayCountryopcionalES | PT | FR | DE | IT | BE | NL | PL — auto-adds national holidays of the delivery year and the next one
  • agreedTimeLimitExpiryopcionaltotalLoss: agreed time-limit expiry
  • takingOverDateopcionaltotalLoss without agreed limit: taking-over date
  • contractDateopcionalother cases: contract conclusion date

Ejemplo

curl "https://glauc.cat/api/tools/cmr-deadlines?delivery=2026-07-01"

Respuesta (extracto)

{ "ok": true, "data": { "result": { "apparent": { "deadline": "2026-07-01" }, "nonApparent": { "deadline": "2026-07-09" }, "delay": { "deadline": "2026-07-22" }, "limitation": { "deadline": "2027-07-01" } } } }
GET/api/tools/unit-converterPrueba la herramienta interactiva

Parámetros

  • categoryobligatoriolength | weight | volume | density
  • valueobligatorionumeric value to convert
  • fromobligatoriosource unit id (e.g. cm, kg, m3, kgm3)
  • toopcionaltarget unit id; omitted → all units in the category

Ejemplo

curl "https://glauc.cat/api/tools/unit-converter?category=volume&value=1&from=m3&to=ft3"

Respuesta (extracto)

{ "ok": true, "data": { "result": 35.3146667… } }

Parámetros

  • codeopcionalEXW … DDP; omitted → all 11 rules

Ejemplo

curl "https://glauc.cat/api/tools/incoterms?code=FOB"

Respuesta (extracto)

{ "ok": true, "data": { "code": "FOB", "group": "F", "mode": "sea", "costs": { "mainCarriage": "buyer", … }, "riskTransfer": "fob" } }
GET/api/tools/driving-hoursPrueba la herramienta interactiva

Parámetros

  • sinceBreakopcionalminutes driven since the last ≥45-min break
  • todayopcionalminutes driven today
  • weekopcionalminutes driven this week
  • previousWeekopcionalminutes driven the previous week
  • extensionsUsedopcional10 h days used this week (0–2)
  • reducedRestsUsedopcionalreduced rests used (0–3)

Ejemplo

curl "https://glauc.cat/api/tools/driving-hours?sinceBreak=240&today=420&week=2600"

Respuesta (extracto)

{ "ok": true, "data": { "assessment": { "untilBreak": 30, "todayRemaining": 120, "todayRemainingExtended": 180, "weekRemaining": 760, "effectiveRemaining": 180, … } } }
GET/api/tools/cargo-securingPrueba la herramienta interactiva

Parámetros

  • massobligatoriocargo mass, kg
  • muobligatoriofriction coefficient, 0–1 (EN 12195-1 Annex B)
  • alphaopcionalvertical lashing angle, degrees (default 85)
  • methodopcionaltie-down (default) or direct
  • stfopcionalSTF per lashing, daN (tie-down; default 400)
  • lcopcionalLC per lashing, daN (direct; default 2500)
  • betaopcionalhorizontal lashing angle, degrees (direct; default 30)
  • lengthopcionalblock length, cm (tipping check)
  • widthopcionalblock width, cm
  • heightopcionalblock height, cm

Ejemplo

curl "https://glauc.cat/api/tools/cargo-securing?mass=6000&mu=0.45&alpha=85&stf=400&length=240&width=120&height=180"

Respuesta (extracto)

{ "ok": true, "data": { "result": { "method": "tie-down", "lashings": 4, "directions": [ { "direction": "forward", "sliding": 4, "tipping": 0, "required": 4 }, … ], "warnings": [ … ] } } }

Parámetros

  • qopcionalcode prefix (digits) or words, at least two characters
  • codeopcionalexact 4-, 6- or 8-digit code instead of q
  • langopcionalen (default) or es
  • limitopcionalmax rows, 1–100 (default 25)

Ejemplo

curl "https://glauc.cat/api/tools/hs-codes?q=lithium%20batteries&lang=en"

Respuesta (extracto)

{ "ok": true, "data": { "total": 6, "rows": [ { "code": "85076000", "level": 8, "description": "Lithium-ion accumulators", "heading": "Electric accumulators…", "duty": "2,7 %", "unit": "p/st" }, … ], "source": { … } } }
GET/api/tools/load-plannerPrueba la herramienta interactiva

Parámetros

  • equipmentobligatorio20DV | 40DV | 40HC | 45HC | 20RF | 40RFHC | TAUT | MEGA | FRIGO
  • piecesobligatorioqty x length x width x height x weightPerPiece (cm/kg), separated by ";"
  • stackableopcionaldefault true — pieces may be stacked
  • thisSideUpopcionaldefault true — pieces must not be tipped
  • countryopcionalroad limit matrix: ES (default) | EU | US | CN
  • modeopcionalroad_national (default) | road_international | road_intermodal

Ejemplo

curl "https://glauc.cat/api/tools/load-planner?equipment=40HC&pieces=20x120x80x144x400"

Respuesta (extracto)

{ "ok": true, "data": { "metrics": { "packedCount": 20, "volumeUtilizationPct": 36.4, "vgmKg": 11700, "cog": { "xEccentricityPct": -0.8, "ok": true }, … }, "compliance": { … }, "placements": [ … ] } }

Notas generales

  • Todas las respuestas son JSON con la estructura { ok, version, data }. Los errores devuelven HTTP 400 con { ok: false, error, hint }.
  • CORS abierto (Access-Control-Allow-Origin: *): puedes llamar a la API directamente desde el navegador.
  • Límite de uso: 60 peticiones por minuto y por IP (HTTP 429 con Retry-After al superarlo).
  • No se almacena ningún parámetro ni resultado; solo se cuenta de forma anónima y agregada qué endpoint se usa. Las llamadas son stateless.
  • Sin garantía de servicio: es una API de referencia gratuita. Si la integras en producción, avísame vía contacto.