Eines
API pública de les eines
Cada eina d’aquest web també es pot cridar via HTTP GET: mateix motor de càlcul, resposta JSON, sense registre ni clau API i sense emmagatzemar res. Pensada per a integracions lleugeres, fulls de càlcul i scripts.
Límits
| Peticions | 60 per minut i per IP, sumant tots els endpoints (/health no compta) |
|---|---|
| Preu i clau | Gratuïta, sense clau API ni registre |
| Codis HS | limit d’1 a 100 files per petició (25 per defecte) |
| Planificador de càrrega | fins a 600 unitats per petició |
| Capçaleres | X-RateLimit-Limit, X-RateLimit-Remaining i X-RateLimit-Reset a cada resposta; HTTP 429 amb Retry-After en superar el límit |
En necessites més o vols una clau per a la teva empresa? Escriu-me via contacte →
Endpoints
Paràmetres
piecesobligatoriqty x length x width x height x weightPerPiece, “;”-separated. cm/kg (metric) or in/lb (imperial). e.g. 2x120x80x100x50;1x60x40x30x12unitopcionalmetric (default) | imperialstackableopcionaltrue (default) | false — affects LDMairDivisoropcionalair 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 basisroadKgPerLdmopcionalkg per loading metre (default 1750)
Exemple
curl "https://glauc.cat/api/tools/chargeable-weight?pieces=2x120x80x100x50&unit=metric"
Resposta (extracte)
{ "ok": true, "data": { "result": { "totals": { "grossKg": 100, "volumeM3": 1.92 }, "results": [ { "mode": "air", "chargeableKg": 320, "chargeableRoundedKg": 320, "basis": "volume" }, … ] } } }Paràmetres
deliveryobligatoridelivery date, YYYY-MM-DDcaseopcionaldamage (default) | totalLoss | other — Art. 32 start rulewilfulopcionaltrue → 3-year limitation (default false)excludedWeekdaysopcionalcomma list, 0=Sun … 6=Sat (default 0)holidaysopcionalcomma list of YYYY-MM-DD public holidaysholidayCountryopcionalES | PT | FR | DE | IT | BE | NL | PL — auto-adds national holidays of the delivery year and the next oneagreedTimeLimitExpiryopcionaltotalLoss: agreed time-limit expirytakingOverDateopcionaltotalLoss without agreed limit: taking-over datecontractDateopcionalother cases: contract conclusion date
Exemple
curl "https://glauc.cat/api/tools/cmr-deadlines?delivery=2026-07-01"
Resposta (extracte)
{ "ok": true, "data": { "result": { "apparent": { "deadline": "2026-07-01" }, "nonApparent": { "deadline": "2026-07-09" }, "delay": { "deadline": "2026-07-22" }, "limitation": { "deadline": "2027-07-01" } } } }Paràmetres
categoryobligatorilength | weight | volume | density | area | temperature | speed | fuel | floor | containersvalueobligatorinumeric value to convertfromobligatorisource unit id (e.g. cm, kg, m3, kgm3)toopcionaltarget unit id; omitted → all units in the category
Exemple
curl "https://glauc.cat/api/tools/unit-converter?category=volume&value=1&from=m3&to=ft3"
Resposta (extracte)
{ "ok": true, "data": { "result": 35.3146667… } }Paràmetres
codeopcionalEXW … DDP; omitted → all 11 rules
Exemple
curl "https://glauc.cat/api/tools/incoterms?code=FOB"
Resposta (extracte)
{ "ok": true, "data": { "code": "FOB", "group": "F", "mode": "sea", "costs": { "mainCarriage": "buyer", … }, "riskTransfer": "fob" } }Paràmetres
sinceBreakopcionalminutes driven since the last ≥45-min breaktodayopcionalminutes driven todayweekopcionalminutes driven this weekpreviousWeekopcionalminutes driven the previous weekextensionsUsedopcional10 h days used this week (0–2)reducedRestsUsedopcionalreduced rests used (0–3)
Exemple
curl "https://glauc.cat/api/tools/driving-hours?sinceBreak=240&today=420&week=2600"
Resposta (extracte)
{ "ok": true, "data": { "assessment": { "untilBreak": 30, "todayRemaining": 120, "todayRemainingExtended": 180, "weekRemaining": 760, "effectiveRemaining": 180, … } } }Paràmetres
massobligatoricargo mass, kgmuobligatorifriction coefficient, 0–1 (EN 12195-1 Annex B)alphaopcionalvertical lashing angle, degrees (default 85)methodopcionaltie-down (default) or directmodeopcionalroad (default, Table 2) | rail (Table 3) | seaA | seaB | seaC (Table 4 sea areas)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, cmheightopcionalblock height, cmcogHeightopcionalcentre of gravity height, cm (default half the height)
Exemple
curl "https://glauc.cat/api/tools/cargo-securing?mass=6000&mu=0.45&alpha=85&stf=400&length=240&width=120&height=180"
Resposta (extracte)
{ "ok": true, "data": { "result": { "method": "tie-down", "lashings": 4, "directions": [ { "direction": "forward", "sliding": 4, "tipping": 0, "required": 4 }, … ], "warnings": [ … ] } } }Paràmetres
qopcionalcode prefix (digits) or words, at least two characters (q or code is needed)codeopcionalexact 4-, 6- or 8-digit code instead of qlangopcionalen (default) or eslimitopcionalmax rows, 1–100 (default 25)
Exemple
curl "https://glauc.cat/api/tools/hs-codes?q=lithium%20batteries&lang=en"
Resposta (extracte)
{ "ok": true, "data": { "total": 6, "rows": [ { "code": "85076000", "level": 8, "description": "Lithium-ion accumulators", "heading": "Electric accumulators…", "duty": "2,7 %", "unit": "p/st" }, … ], "source": { … } } }Paràmetres
equipmentobligatori20DV | 40DV | 40HC | 45HC | 20RF | 40RFHC | TAUT | MEGA | FRIGOpiecesobligatoriqty x length x width x height x weightPerPiece (cm/kg), separated by ";" — at most 600 units per requeststackableopcionaldefault true — pieces may be stackedthisSideUpopcionaldefault true — pieces must not be tippedcountryopcionalroad limit matrix: ES (default) | EU | US | CNmodeopcionalroad_national (default) | road_international | road_intermodal
Exemple
curl "https://glauc.cat/api/tools/load-planner?equipment=40HC&pieces=20x120x80x144x400"
Resposta (extracte)
{ "ok": true, "data": { "metrics": { "packedCount": 20, "volumeUtilizationPct": 36.4, "vgmKg": 11700, "cog": { "xEccentricityPct": -0.8, "ok": true }, … }, "compliance": { … }, "placements": [ … ] } }GET
/api/tools/healthLiveness probe: one real calculation per engine, plus the review date and source of every tool (and the loaded CN dataset). Never rate-limited, never counted.
Exemple
curl "https://glauc.cat/api/tools/health"
Resposta (extracte)
{ "ok": true, "version": "1", "checks": { "chargeable-weight": true, … }, "review": { "hs-codes": { "verifiedOn": "2026-09-06", "dataset": "CN 2026, Reg. (EU) 2025/1926", "datasetYear": 2026 }, … } }Notes generals
- — Totes les respostes són JSON amb l’estructura { ok, version, data }. Els errors retornen HTTP 400 amb { ok: false, error, hint }.
- — CORS obert (Access-Control-Allow-Origin: *): pots cridar l’API directament des del navegador.
- — No s’emmagatzema cap paràmetre ni resultat; només es compta de manera anònima i agregada quin endpoint s’usa. Les crides són stateless.
- — Sense garantia de servei: és una API de referència gratuïta. Si la integres en producció, avisa’m via contacte.
