
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.
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 | densityvalueobligatorinumeric 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
equipmentobligatori20DV | 40DV | 40HC | 45HC | 20RF | 40RFHC | TAUT | MEGA | FRIGOpiecesobligatoriqty x length x width x height x weightPerPiece (cm/kg), separated by ";"stackableopcionaldefault 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": [ … ] } }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.
- — Límit d’ús: 60 peticions per minut i per IP (HTTP 429 amb Retry-After en superar-lo).
- — 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.