Climly API

REST · JSONX-API-KeyPCF StudioPinned versions

Reads are open and rate-limited (see below); bulk export and write endpoints need an account — your API key is on the Account page, sent as X-API-Key. The endpoints below are the public contract. Signed-in users can also download the OpenAPI schema of the PCF Studio endpoints at /api/pcf/openapi.json.

The endpoints you'll use first

GET /api/factors?q=diesel&region=TUR&limit=20 — search factors

GET /api/factor/EF-ETKB-b2cd0398e3 — one factor, full provenance

GET /api/value?uid=EF-… — bare number (Excel/Sheets-friendly)

GET /api/spread — where sources disagree, quantified

GET /api/drift — factor drift report: how published factors moved between two editions of one source. Today it covers one source pair only, DEFRA 2025 → 2026: {pairs_matched, moved_5pct_plus, ambiguous_keys_skipped, method, generated_at, top}, each top item {activity, category, subcategory, unit, gas, v2025, v2026, change_pct, uid_2025, uid_2026}; 404 when the report has not been generated. No login required; shown on /drift

GET /api/calc?type=electricity&amount=1000&region=TUR — quantity × factor with citation; the factor object carries the record's license, license_url and the source's attribution sentence, to show next to the value. /api/export.csv ends each row with an attribution column.

POST /api/calc/estimate {factor_id, amount, unit} — kg CO2e with any factor ID: the amount is converted into the factor's unit, and the answer carries the uncertainty band, the conversion step by step and the factor's citation and licence (details) · POST /api/calc/batch — up to 100 of them in one call

POST /api/pcf/calculate {product?, lines: [{factor_uid, qty, qty_unit}]} — a whole product footprint in one call, nothing stored: total, band, stage totals and a per-line breakdown (details)

GET /api/cbam/lookup?country=TUR&q=7208 — CBAM default values

GET /api/stats — catalogue counts: {verified, derived, deprecated, superseded, withdrawn, expired, active, total, definition, sources, regions, categories, gases}; verified counts only records with status “verified” (the number on our home page), active = verified + derived, and deprecated records (superseded, kept so pinned results stay reproducible) and expired records (EPDs whose validity has ended, kept for citation, not offered for matching) are counted separately; total = every public record (verified + derived + deprecated + expired) and is the same number as /api/health factors and /api/trust universe.total. Private factors (your own or supplier-submitted) are never counted. definition says so in plain words

GET /api/trust — live audit status (what we publish on /trust): universe.factors with universe.by_status {verified, deprecated, derived} and a plain universe.definition of what is counted; dtd {date, passed, total, failed, skipped, skip_reasons, ran_at, age_days, fresh, note} — total counts the checks that ran; skipped checks need a test tool or an internal file that is not on the production server (they run on the development machine), are listed by reason in skip_reasons and are never counted as passed; fresh is false when the last end-to-end test run is more than seven days old (fresh_max_days; the suite runs every week on a copy of the live database, and dtd.definition states the rule)

GET /api/health — for uptime monitors: {status, factors}, where status is ok or degraded (HTTP 200) or unhealthy (HTTP 503) and factors is counted exactly like /api/stats total

GET /f/EF-… — the permanent, human-readable page of one factor record: the link printed in citations, QR codes and PDF statements. For JSON, use /api/factor/EF-…

Developer tools

GET /api/openapi.json — one OpenAPI 3.1 schema for the developer API: factor data, calculation (estimate, batch, one-call PCF), PCF Studio and public verification, tagged by area, with real request and answer examples where we have them. For signed-in users (session or X-API-Key; 401 with reason: "login_required" without). Account, sign-in and administration endpoints are not in it. The narrower /api/pcf/openapi.json and /api/calc/openapi.json stay as they are

Postman — climly-api.postman_collection.json (collection format v2.1), the same endpoints as the schema, in folders. No key is in the file: set the collection variable climly_api_key to the key on your Account page and it is sent as X-API-Key; base_url is https://climly.earth; path values such as pid are collection variables too

curl in 20 seconds

« search »
curl -s "__BASE__/api/factors?q=grid+electricity&region=TUR&limit=3"

« calculate: 1,000 kWh Turkish grid »
curl -s "__BASE__/api/calc?type=electricity&amount=1000&region=TUR"

« calculate with any factor ID: 120 MWh on the Ember grid factor for Turkey (per kWh) »
curl -s -X POST "__BASE__/api/calc/estimate" -H "Content-Type: application/json" \
  -d '{"factor_id":"EF-EMBER-d5dc8f6518","amount":120,"unit":"MWh"}'

« authenticated: your private factors »
curl -s -H "X-API-Key: fb_..." "__BASE__/api/private-factors"

Calculate with any factor

POST /api/calc/estimate {"factor_id", "amount", "unit", "heating_value_basis"?} multiplies an activity amount by any public factor record (or one of your own private factors, with your session or X-API-Key). No sign-in is needed for public factors. amount is a number from 0 to 1e12 in unit; the amount is converted into the factor's own unit with the table below — the same table and the same multipliers the PCF Studio engine uses. The factor value is used as published, in the record's own GWP set (factor.gwp_set); PCF Studio additionally restates records that publish a per-gas split to one GWP set (see the PCF method), so a PCF line's GWP total differs from this result by that restatement only (its headline also reports biogenic CO2 separately). The answer carries:

curl -s -X POST "__BASE__/api/calc/estimate" -H "Content-Type: application/json" \
  -d '{"factor_id": "EF-EMBER-d5dc8f6518", "amount": 120, "unit": "MWh"}'

Answer (200):

{
  "factor_id": "EF-EMBER-d5dc8f6518",
  "amount": 120.0,
  "unit": "MWh",
  "kg_co2e": 57087.6,
  "result_unit": "kg CO2e",
  "uncertainty": {
    "pct": 10.0,
    "basis": "source_default",
    "low_kg": 51378.84,
    "high_kg": 62796.36,
    "definition": "The factor record's own published uncertainty (+/- percent) applied to this one result: low = result x (1 - pct/100), high = result x (1 + pct/100), never below zero for a positive result. Uncertainty of your activity amount is not included. This is not the PCF Studio product band, which also widens the factor uncertainty by how the factor was chosen."
  },
  "conversion": {
    "input_amount": 120.0,
    "input_unit": "MWh",
    "factor_unit": "kWh",
    "family": "energy",
    "multiplier": 1000.0,
    "converted_amount": 120000.0,
    "explanation": "120 MWh x 1000 = 120000 kWh (energy; 1 MWh = 1000 kWh)."
  },
  "factor": {
    "uid": "EF-EMBER-d5dc8f6518",
    "activity": "Grid electricity — Turkey (2025)",
    "category": "Electricity",
    "subcategory": "Grid average intensity",
    "source": "ember",
    "source_name": "Ember Yearly Electricity Data",
    "publisher": "Ember (ember-energy.org)",
    "region": "TUR",
    "region_name": "Turkey",
    "year": 2025,
    "gas": "CO2e",
    "gwp_set": "AR5",
    "value": 0.47573,
    "unit": "kg CO2e / kWh",
    "unit_num": "kg CO2e",
    "unit_den": "kWh",
    "uncertainty_pct": 10.0,
    "uncertainty_basis": "source_default",
    "status": "verified",
    "superseded_by": null,
    "license": "CC-BY-4.0",
    "license_url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "Data: Ember Yearly Electricity Data (CC-BY-4.0).",
    "source_url": "https://ember-energy.org/data/yearly-electricity-data/",
    "source_ref": "yearly_full_release_long_format.csv · Turkey · 2025",
    "private": false,
    "permalink": "/f/EF-EMBER-d5dc8f6518"
  },
  "warnings": [],
  "citation": "EF-EMBER-d5dc8f6518 · Ember Yearly Electricity Data · Grid electricity — Turkey (2025) · 0.47573 kg CO2e / kWh · via Climly"
}

Errors. Every error is {"error", "reason", …}: 400 unit_mismatch (the unit is of another quantity — kg for a per-MWh factor, km for a per-tonne.km factor, passenger-km for a per-vehicle-km factor; nothing is assumed), unknown_unit, missing_unit, factor_unit_not_convertible (the factor is per head, device or similar: send exactly that unit), not_co2e (the record is raw gas mass such as kg CH4; the answer lists co2e_variants), invalid_amount, invalid_factor_id, unknown_field, invalid_heating_value_basis; 404 unknown_factor (also for someone else's private factor); 403 factor_withdrawn or licence_restricted — a record whose licence does not allow its figure to be redistributed (withdrawn on licence grounds, republication permission pending, or a paid database) gets neither a value nor a result, only its identity and licence; 429 rate_limited. Unit errors carry factor_unit, factor_unit_family and accepted_units:

{"factor_id": "EF-EMBER-d5dc8f6518", "amount": 5, "unit": "kg"}
→ 400
{
  "error": "Unit 'kg' (mass) cannot be converted to this factor's unit 'kWh' (energy).",
  "reason": "unit_mismatch",
  "field": "unit",
  "input_unit_family": "mass",
  "factor_unit": "kWh",
  "factor_unit_family": "energy",
  "accepted_units": [
    "kwh",
    "mwh",
    "gwh",
    "gj",
    "mj",
    "mmbtu",
    "kwh (net cv)",
    "kwh (gross cv)",
    "kwh (pcs/hhv)",
    "kwh pci",
    "gj pci",
    "mj pci",
    "tep pci"
  ],
  "factor_id": "EF-EMBER-d5dc8f6518"
}

Natural gas invoices. The kWh printed on a gas invoice are on gross calorific value; many natural gas factors are per kWh on net calorific value. Send "heating_value_basis": "gross" and the amount is converted with the same gross-to-net ratio as a PCF line marked gross (the ratio of the DEFRA natural gas factors per kWh Gross CV and Net CV, a declared proxy; the step is in conversion.heating_value). Without it a net-CV natural gas factor answers with a warning. Turkish invoices in Sm3 (standard m³) convert 1:1 to m³; Nm3 is not accepted (a different reference volume).

{"factor_id": "EF-DEFRA-95b0012d9a", "amount": 50000, "unit": "kWh", "heating_value_basis": "gross"}
→ kg_co2e 9115.4956155 · 50000 kWh = 50000 kWh (Net CV) (energy; 1 kWh = 1 kWh (Net CV)). Then x 0.902569 (gross to net calorific value) = 45128.45 kWh (Net CV).

Batch: up to 100 calculations in one call

POST /api/calc/batch {"items": [ …estimate bodies… ]} — session or X-API-Key (401 without). At most 100 items (413 {"reason": "too_many_items"} over; an empty list or another top-level key is 400). The answer is {count, succeeded, failed, results}, one entry per item in order: {index, status: 200, result} with exactly the body /api/calc/estimate would give, or {index, status, error} with its error body — one bad item never fails the others. Each item counts as one request against the calculation rate limit; a batch that does not fit in what is left of the minute answers 429 and none of it is counted.

curl -s -X POST "__BASE__/api/calc/batch" -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d '{"items": [{"factor_id": "EF-EMBER-d5dc8f6518", "amount": 120, "unit": "MWh"}, {"factor_id": "EF-DEFRA-347d1c839e", "amount": 1500, "unit": "Sm3"}, {"factor_id": "EF-DEFRA-9efc94b7ad", "amount": 3600, "unit": "tonne.km"}, {"factor_id": "EF-DEFRA-9efc94b7ad", "amount": 300, "unit": "km"}]}' \
  | jq -c '.results[] | {index, status, kg_co2e: .result.kg_co2e, reason: .error.reason}'
{"index":0,"status":200,"kg_co2e":57087.6,"reason":null}
{"index":1,"status":200,"kg_co2e":3039.495,"reason":null}
{"index":2,"status":200,"kg_co2e":372.816,"reason":null}
{"index":3,"status":400,"kg_co2e":null,"reason":"unit_mismatch"}

Signed-in users (session or X-API-Key) can download the OpenAPI schema of both endpoints, with these examples, at GET /api/calc/openapi.json (401 without).

Unit conversion table

Units convert only within one family; the multiplier takes one unit to the family's canonical unit. Spellings are case-insensitive and a trailing s is ignored. ton is read as the metric tonne (with a warning; write short ton for US tons). Currencies are separate families: no exchange-rate or inflation conversion, and a different reference year is a warning. A factor whose unit is not in the table (per head, per device…) accepts only that exact unit.

FamilyCanonicalAccepted units and multiplier to the canonical unit
masskgkg 1, kilogram 1, g 0.001, gram 0.001, t 1000, tonne 1000, tonnes 1000, t product 1000, kg product 1, short ton 907.185, kg net weight 1, kg live weight 1, kg fabric 1, kg yarn 1, kg moulded part 1, kg extrudate 1, kg good casting 1, kg finished part 1, kg net forged part 1, kg formed part 1, kg h2 1, kg gas 1, tonne of waste 1000, kilogramm 1, gramm 0.001, tonnen 1000, ton 1000, kilo 1
energykWhkwh 1, mwh 1000, gwh 1000000, gj 277.778, mj 0.277778, mmbtu 293.071, kwh (net cv) 1, kwh (gross cv) 1, kwh (pcs/hhv) 1, kwh pci 1, gj pci 277.778, mj pci 0.277778, tep pci 11630
mass x distance (freight)tonne.kmtkm 1, tonne.km 1, t.km 1, ton-mile 1.45997, short ton-mile 1.45997, tonnenkilometer 1, ton-km 1, tonkm 1
distancekmkm 1, miles 1.60934, vehicle-mile 1.60934, kilometer 1, kilometre 1
passenger distancepassenger.kmpassenger-mile 1.60934, passenger.km 1, pkm 1, p.km 1
volumelitrelitres 1, l 1, kl 1000, gallon 3.78541, m3 1000, 1000 m3 1000000, scf 28.3168, sm3 1000, sm³ 1000, scm 1000, cubic metre 1000, litre 1, liter 1, liters 1, ml 0.001, m³ 1000, kubikmeter 1000, liter (de) 1
length (product)mm 1, metre 1, meter 1, linear metre 1, lm 1
nightsnightroom per night 1, room night 1, night 1, nights 1, room-night 1
timehourhour 1
aream2m2 1, m² 1, sqm 1, ha 10000, quadratmeter 1
itemspiecepiece 1, pieces 1, pcs 1, unit 1, units 1, item 1, items 1, each 1, stueck 1, stk 1, adet 1

PCF Studio API (product carbon footprints)

Everything the PCF Studio page does is a JSON endpoint. Authenticate with your API key (X-API-Key) or a logged-in session; write calls need Content-Type: application/json (except the CSV import, text/csv). You only see your own products (and your organisation's, read-only unless you are an admin). Every result is a pinned, numbered version: factor values, engine version and methodology are frozen with it, so a recalculation opens a new version instead of changing a published one.

End-to-end in one script

The shortest path through the whole lifecycle, including the two steps new integrators miss most — confirming the AI draft's assumptions, and deleting a test account with a session, not an API key. Copy-paste into bash/zsh (needs jq); the whole script was verified end-to-end against our test server on 2026-10-23, every request answering 2xx. A cookie jar carries the session cookie that /api/register sets, so every later step reuses it automatically. If the server you point it at confirms sign-ups by e-mail (step 1 then answers check_email: true and sets no cookie), create the account through the link in that e-mail, log in with POST /api/login {email, password} into the same cookie jar and continue from step 2.

export B="__BASE__" JAR="$(mktemp)"
H=(-c "$JAR" -b "$JAR" -H "Content-Type: application/json")

# 1 · register — sets the session cookie in $JAR; also hands back an API key you could use instead.
#     age_confirmed and accept_terms are REQUIRED and must be JSON true (the two boxes on the sign-up form: "I am 18 or
#     older", "I accept the Terms of Service"); omit either and this 400s with reason age_required / terms_required
EMAIL="e2e-$RANDOM@example.com"
curl -s "${H[@]}" -X POST "$B/api/register" \
  -d '{"email":"'$EMAIL'","password":"a-long-enough-passphrase-1","age_confirmed":true,"accept_terms":true}' | jq '{ok, email}'

# 2 · create a product
PID=$(curl -s "${H[@]}" -X POST "$B/api/pcf/products" \
  -d '{"name":"Hot-rolled steel bracket, powder coated","country":"TUR","year":2026,"functional_unit":"1 piece","weight_kg":0.4}' \
  | jq -r .id)

# 3 · AI process-tree draft — POST starts it in the background (202); poll the SEPARATE job endpoint until done
#     (there is no POST /api/pcf/product/{id}/ai-draft — a common mistake; see the endpoint list below)
JOB=$(curl -s "${H[@]}" -X POST "$B/api/pcf/ai-draft" \
  -d '{"description":"Hot-rolled steel bracket, powder coated","mode":"tree","unit":"1 piece","weight_kg":0.4,"region":"TUR","product_id":'$PID'}' \
  | jq -r .job)
while :; do
  curl -s "${H[@]}" "$B/api/pcf/ai-draft/job/$JOB" > job.json
  S=$(jq -r .state job.json); [ "$S" = running ] || break
  sleep "$(jq -r '.retry_after_s // 2' job.json)"
done; echo "draft: $S"

# 4 · accept the tree into the product. assumptions_confirmed:true is REQUIRED whenever the description left
#     something (material, mass, country…) to the AI — omit it and this 400s with reason assumptions_unconfirmed
[ "$S" = done ] && jq --argjson pid "$PID" --arg job "$JOB" \
    '{product_id:$pid, job:$job, on_existing:"append", assumptions_confirmed:true, tree:.result}' job.json \
  | curl -s "${H[@]}" -X POST "$B/api/pcf/ai-draft/accept" -d @- | jq '{added, assumptions}'

# 5 · calculate
curl -s "${H[@]}" -X POST "$B/api/pcf/product/$PID/calculate" -d '{"reason":"e2e script"}' \
  | jq '{version, total_co2e, band_low, band_high, accuracy_pct}'

# 6 · exports — csv, pact and openLCA all answer on the free plan too (figures identical; pact/openLCA carry a
#     preview/watermark mark instead of a 402 — the EXTENDED csv and the full-value openLCA need Premium, see
#     "Where the free plan stops" below)
curl -s "${H[@]}" -o pcf.csv "$B/api/pcf/product/$PID/export.csv"
curl -s "${H[@]}" "$B/api/pcf/product/$PID/pact.json" | jq '{preview, specVersion}'
curl -s "${H[@]}" -o pcf-openlca.zip -D - "$B/api/pcf/product/$PID/export/openlca.zip" | grep -i x-climly-preview

# 7 · delete the account. DELETE /api/me needs the SESSION cookie — an API key alone answers
#     403 {"session_required": true} — plus a confirmation body (password, or confirm_email for a
#     Google-only account that never set one; add "totp" if two-factor is on)
curl -s "${H[@]}" -X DELETE "$B/api/me" -d '{"password":"a-long-enough-passphrase-1"}' | jq .
rm -f "$JAR" job.json

One call: a product footprint without storing it

POST /api/pcf/calculate {"product"?: {name, country, year, weight_kg, functional_unit, includes_packaging}, "lines": [{factor_uid, qty, qty_unit, stage?, description?, waste_pct?, heating_value_basis?, confirm_negative?}]} — session or X-API-Key; Premium or an active trial (the free plan answers 402 with the upgrade step; it can still create its product and calculate it). The whole bill of materials goes in one request and the answer comes back in the same response. Nothing is stored: no product, line, version or verification page is created ("saved": false). It is the same engine and the same line rules as PCF Studio: qty is per declared unit of the product and is converted into the factor's unit (unit table); well-to-tank and grid-loss companion lines are added exactly as POST …/lines adds them (listed with companion_of_index); a record that is withdrawn, superseded, expired or deprecated is refused with the reason and how to re-match it; someone else's private factor answers as not found. The figures are identical to creating the product and calculating it. At most 100 lines (413 too_many_lines); each line counts as one request against the calculation rate limit (X-RateLimit-* headers), and each account can make 30 calls per minute (429 rate_limited with Retry-After).

Errors. 400 invalid_line, unit_family_mismatch, missing_unit, invalid_factor_id or unknown_field, each with line_index (0-based); 403 factor_withdrawn or licence_restricted with line_index — a record whose licence does not allow its figure to be redistributed gets no figure, only its identity and licence, as in estimate. Your own licensed data (bring your own data) is counted in the total, but its lines carry customer_licensed and value_note instead of the factor value and line kg, as in PDF and PACT files. The result is a screening figure, not a declaration: for a pinned version you can share, create a product and send the same lines to POST /api/pcf/product/{id}/lines (same fields).

curl -s -X POST "__BASE__/api/pcf/calculate" -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d '{"product": {"name": "Steel bracket", "country": "TUR", "year": 2026, "functional_unit": "1 piece", "weight_kg": 0.4},
       "lines": [{"factor_uid": "EF-ADEME-7a7be26135", "qty": 420, "qty_unit": "g", "stage": "material", "description": "Steel sheet", "waste_pct": 5},
                 {"factor_uid": "EF-EMBER-d5dc8f6518", "qty": 1.2, "qty_unit": "kWh", "stage": "manufacturing", "description": "Press and paint line"},
                 {"factor_uid": "EF-DEFRA-9efc94b7ad", "qty": 0.2, "qty_unit": "tkm", "stage": "transport", "description": "Truck to customer"}]}' \
  | jq -c '{saved, total_co2e, band_low, band_high, data_quality_pct, stages}, (.lines[] | {index, companion_of_index, description, kg_co2e, share_pct})'
{"saved":false,"total_co2e":1.622726,"band_low":1.213214,"band_high":2.126438,"data_quality_pct":71.8,"stages":{"material":0.9751,"manufacturing":0.6222,"transport":0.0254}}
{"index":0,"companion_of_index":null,"description":"Steel sheet","kg_co2e":0.975051,"share_pct":60.09}
{"index":1,"companion_of_index":null,"description":"Press and paint line","kg_co2e":0.570876,"share_pct":35.18}
{"index":2,"companion_of_index":null,"description":"Truck to customer","kg_co2e":0.020721,"share_pct":1.28}
{"index":null,"companion_of_index":1,"description":"↳ grid losses — Press and paint line","kg_co2e":0.05136,"share_pct":3.17}
{"index":null,"companion_of_index":2,"description":"↳ well-to-tank — Truck to customer","kg_co2e":0.004718,"share_pct":0.29}

Authentication

Two credentials exist — a session cookie (set by /api/login or /api/register) and an API key (X-API-Key header, from the Account page). Most endpoints accept either one interchangeably. A handful of account-security actions accept the session only, on purpose: a leaked API key alone cannot delete the account, change its password, open an org, or rotate the key itself.

either — products · lines · match · calculate · exports (csv/pdf/pact/openLCA/reviewer-pack) · ai-draft · ai-match · ai-bom · compare · publish · templates · params · versions/diff/history · explain · companions · cbam-reconcile under /api/pcf/…, plus /api/map/bulk and the core factor API — session or X-API-Key, whichever is present (current_user())

session only — POST /api/me/password · /api/mfa/setup|enable|disable · GET /api/mfa/qr.svg · POST /api/org · /api/org/invite · /api/org/leave · DELETE /api/org/member/{uid} · POST /api/me/api-key · POST /api/me/api-key/reveal · POST /api/me/sessions/revoke · POST /api/me/terms/accept · DELETE /api/me · POST /api/pcf/product/{id}/reviewer-seat · POST /api/pcf/reviews/accept — an API key alone answers 403 {"session_required": true} (own heading: Account deletion and sessions)

signed-in, either kind — GET /api/openapi.json · GET /api/pcf/openapi.json: neither credential → 401 {"reason": "login_required"}

anonymous — the read-only factor API (/api/factors, /api/factor/{uid}, /api/value, /api/spread, /api/calc, /api/cbam/lookup), /api/register, /api/login, /api/reset/request|confirm, GET /api/public/pcf/{public_id}, GET /api/registry and POST /api/public/supplier-pcf (a supplier's own submission link)

Registering: POST /api/register {email, password, age_confirmed: true, accept_terms: true, terms_version?}. The two confirmations are required and must be JSON true — they are the sign-up form's two unticked boxes ("I am 18 or older", "I accept the Terms of Service"). Missing or not true → 400 with reason: "age_required" or "terms_required", missing (the field names) and fields. terms_version is optional; if you send it and the terms have changed since, the answer is 409 {"reason": "terms_version_changed", "terms_version"}. The recorded version is the published version of the Terms (GET /api/authcfg → terms.version, with its permanent address in terms.version_url). After a change, GET /api/me → terms.needs_acceptance is true when the version you accepted is older; accept with POST /api/me/terms/accept {accept_terms: true, terms_version} (session only; an outdated terms_version → 409 terms_version_changed). When the server confirms sign-ups by e-mail, POST /api/register instead answers 200 {"ok": true, "check_email": true, "message"} for every address, with no session cookie and no API key: the account is created when its owner opens the link in the e-mail (valid 24 hours, usable once), and an address that already has an account gets a log-in reminder by e-mail instead of a 409.

The session cookie is named __Host-fb_session and marked Secure wherever the server runs with HTTPS enforced (production, and any HTTPS test deployment) — a browser or a curl cookie jar keeps and resends it automatically as long as the base URL is https://; it will not be sent, or even stored, against a plain http:// URL. A local test server (no HTTPS) sets the unprefixed fb_session instead, without Secure — that is what the scripts on this page talk to. You never read or construct the cookie's value yourself; a cookie jar (curl -c -b) is all you need.

Rate limits — PCF Studio and account endpoints

The factor database's own limits (search, export, CBAM) are in the page-wide Rate limits section near the bottom. These apply to PCF Studio and the account/auth endpoints that the end-to-end script above uses:

12/5m POST /api/register · 60/5m POST /api/login (plus a per-account lockout — 5 wrong passwords in a row, independent of IP) · 5/5m POST /api/reset/request · 20/5m POST /api/reset/confirm — per IP address; over the limit, POST /api/register answers 429 {"error", "reason": "rate_limited", "attempts_left": 0, "retry_after_s"} with a Retry-After header (seconds until the oldest attempt in the window expires); login and the reset endpoints answer 429 {"error": "Too many attempts — try again later"} with no Retry-After header and no remaining-attempts count today

20/5m POST /api/pcf/ai-draft · 40/5m /api/pcf/ai-match, /api/pcf/ai-bom — per IP, on top of per-account allowances: AI Draft (tree or flat) 10/day free · 100/day Premium with one tree building at a time; ai-match, ai-bom and ai-draft/node 20 per 10 minutes, then 60/day free · 300/day Premium, each feature counted separately (read what is left today with GET /api/me/quota); 429 over the 5-minute window, 503 while the model itself is unavailable (that attempt is refunded, not charged)

GET /api/me/quota — today's AI allowance for your account (session or X-API-Key; 401 without either), read-only and free to call: {plan, day_utc, resets_at, ai_draft_used, ai_draft_limit, ai_draft_remaining, ai_draft_running, ai_pcf_used: {ai_match, ai_bom, ai_node}, ai_pcf_limit, ai_pcf_remaining, ai_pcf_window, products_used, products_limit, supplier_invites: {used, limit, per, max_on_one_product}}; products_limit and supplier_invites.limit are null when your plan has no limit (the supplier-invitation limit counts per product). Days run in UTC; drafts served from an approved template are not counted. The site-wide daily capacity can still answer 429 before your own limit is reached.

120/min GET /api/pcf/match (manual search, including ?for=tree) — per IP (IPv6: per /64 prefix), its own bucket

60/5m POST /api/map/bulk — shares its window with the factor database's /api/export.csv and /api/cbam/lookup (same IP bucket; IPv6: per /64 prefix)

10/hour per network signed, no-account reviewer-pack links (reviewer-link) · 30/hour per product signed-in reviewer-pack downloads (owner or verifier seat) · 60/hour per product export/openlca.zip — each answers 429 with Retry-After: 3600

10/hour POST /api/public/supplier-pcf (anonymous supplier submissions) · 20/hour POST /api/cbam/invite · 20/5m POST /api/pcf/reviews/accept · 10/min POST /api/org/join · 20/5m POST /api/org/invite — all per IP

Where the free plan stops (402)

The free plan's figures are never watered down — a free export carries the same numbers as Premium, just marked as a preview (see Exports). These are the endpoints and limits that answer 402 instead:

402 always on free — GET …/export.csv?full=1 (alias ?extended=1) · GET …/reviewer-pack.zip without ?preview=1 (the signed reviewer-link copy and a verifier seat's copy follow the product owner's plan; a signed-in download follows the downloader's own plan, so a free-plan organisation member gets 402 on a Premium owner's product; the 402 body carries reason: "premium_required" and a preview_url) · POST …/reviewer-link

402 past a free allowance (not Premium-only — raising the number, not removing a gate, is what Premium buys here) — POST /api/pcf/products past 1 product (component: true sub-products don't count, up to 5) · POST …/duplicate?as=scenario past 3 scenario copies per product · POST /api/map/bulk past 20 lines per request · POST …/line/{id}/supplier-invite past 2 invited lines per product — see the note below, this one is not a Premium-only feature despite how an earlier version of this page read

never 402 — report.pdf, pact.json, the simple export.csv, export/openlca.zip and reviewer-pack.zip?preview=1 all answer on free (preview-marked, see Exports); GET /api/pcf/openapi.json needs sign-in but no plan

GET /api/pcf/openapi.json — OpenAPI schema of the /api/pcf endpoints plus /api/map/bulk and the supplier submission endpoint /api/public/supplier-pcf (supplier flow; marked as needing no sign-in), for signed-in users (session or X-API-Key); without either it returns 401 with reason: "login_required". Products, lines, calculate (?compact=1) and bulk mapping carry real request and answer examples (examples, produced against a copy of the database); the calculation endpoints have their own schema at /api/calc/openapi.json. The rest of the API has no published schema; this page is its contract

Request bodies: the schema now carries a requestBody for ai-draft, ai-draft/accept, /api/map/bulk and POST /api/public/supplier-pcf (field names, types and the same limits the server checks). The server still answers invalid input with 400 {"error": …}, not the generic 422 schema, and the English examples on this page stay the reference for behaviour.

POST /api/pcf/products — create a product {name, country?, year?, functional_unit?, weight_kg?, includes_packaging?, company_name?, fossil_carbon_content_kg?, fossil_carbon_content_basis?} → {id, public_id, pact_setup} (PACT fields)

PACT fields at setup. A PACT v3 file needs three facts that only you can give, so you can set them when you create the product (or later with PUT): fossil_carbon_content_kg (kg of fossil carbon per declared unit, with fossil_carbon_content_basis — your evidence; never estimated by Climly), company_name (the PACT companyName: up to 200 characters, never an e-mail address — 400 {"reason": "invalid_field", "field": "company_name"}; null clears it, and then your organisation's name is used) and the product mass (weight_kg, or a mass functional unit). Create, GET and PUT answers carry pact_setup {ready, needs, badge, company_name_source, note}: needs lists the missing PACT field names in the order the PACT file reports them, and badge reads, for example, PACT v3 required fields: missing fossilCarbonContent, companyName. The company name does not enter the calculation, the ETag or the out-of-date check — it is read when you export; the fossil carbon content applies from the next calculation. After a calculation, GET …/pact.json answers X-Climly-PACT-Required-Fields: complete when no PACT v3 required field is missing (otherwise missing), and pact_conformance carries the same badge wording (PACT v3 required fields: complete, or missing …). This is a field-completeness check, not a PACT conformance claim.

GET /api/pcf/products · /api/pcf/product/{id} — list · one product with its lines, latest result, etag, stale, pact_conformance and pact_setup · PUT /api/pcf/product/{id} — edit metadata (optional If-Match, details), including {company_name} and {fossil_carbon_content_kg, fossil_carbon_content_basis} (PACT fields), co-product allocation {co_products: [{name, basis_qty, unit, mass_kg (economic basis)}], allocation_basis: "mass"|"economic", allocation_note, allocation_product_qty} (details), the declared boundary and end-of-life scenario {declared_boundary, eol_scenario} (details) and the study fields {study} (details) · DELETE /api/pcf/product/{id}

GET /api/pcf/match?q=…&stage=material&region=TUR&unit=kg — factor candidates for a line (deterministic matcher; kind= filters) → {items: [{uid, activity, …, match_score}]}

Naming note: a candidate's score is in match_score — there is no separate score field here (for=tree mode nests a mirrored explain.score alongside it, for the "why this factor" reasoning). The candidate list is also named differently depending which surface you're reading: a top-level items array here, but match: {candidates: […]} per row in the BOM dry run below.

Limits and auto_accept: q up to 200 characters, unit up to 24, stage one of the bulk-mapping stages below, region a country/region code — otherwise 400 with reason query_too_long / invalid_stage / invalid_unit / invalid_region; 120 requests per minute per IP, IPv6 per /64 prefix (429). Each candidate carries auto_accept: true when it passes the flat-draft gate — match score ≥ 6 (the response's top-level auto_gate), at least half of the query's words found in the record, a compatible unit family, no guard, route or out-of-domain flag. Electricity records: if region (or a country name in the query) is given, the record must be from that region; with no region (or GLO) an electricity record is never auto-accepted, except a world-average record. In the material and packaging stages the record's family must also be named in your line: the head noun of the record's name (the last word before its first qualifier, e.g. cans in "Metal: steel cans") must appear in the search, so steel does not auto-accept a steel-can record and eggs does not auto-accept a dish that contains eggs. Treat auto_accept as "safe to pre-fill", not as verified. assumption (e.g. "no unit given — kWh assumed") and stage_note say what the matcher assumed.

Why not automatic (check_reason, class_conflict): a candidate with auto_accept: false carries check_reason, a plain sentence saying why (unit conflict, another country's grid or fuel record, a different product family, score below the threshold…). When the record's class contradicts the line it also carries class_conflict and class_conflict_rule — one of food_vs_material, coating_vs_material, packaging_vs_part, reused_vs_new, precursor_vs_fibre, fuel_vs_material, electricity_vs_material (for example a lacquer for "polyurethane foam", steel cans for "steel tube frame", fried squid for "glaze frit"). Such a candidate is never accepted automatically and is listed as weak in for=tree; you can still pick it yourself. The rule does not apply when your line names that class ("tinplate can", "re-used wood"). ?for=tree&accept=1 adds the decision used by Match all: auto_accept and check_reason on every strong candidate, and proposal: {uid, safe, reason} — the first candidate that is safe to accept, otherwise the first strong one to check. Nothing is saved by this call.

POST /api/pcf/product/{id}/lines — add lines {lines: [{stage, description, qty, qty_unit, factor_uid?, qty_expr?, waste_pct?, child_product_id?, line_type?, transport_leg?}], replace?} — line_type is "input" (default) or "scrap_input" (scrap or recycled input, burden-free, no factor); transport_leg (transport lines only) is "inbound", "outbound" or null — a label for the EN 15804 module (details) ·PUT/DELETE /api/pcf/line/{line_id} (PUT takes an optional If-Match; {"reviewed": true} marks an AI-chosen factor as checked by you; unknown fields and unit-family mismatches → 400, details)

POST /api/pcf/product/{id}/lines/import — bill of materials from CSV or .xlsx, nested sub-assemblies, row-by-row validation, ?dry_run=1 preview with factor suggestions — details · GET …/structure.csv · …/structure.xlsx — re-importable structure export · templates: .xlsx · .csv

GET /api/pcf/templates · /api/pcf/templates/{template} — sector BOM templates (structure only) · POST /api/pcf/product/{id}/lines/from-template {template, include?, qty?}

GET/POST/PUT/DELETE /api/pcf/product/{id}/params[/{name}] — named parameters for qty_expr · GET …/sensitivity — ±20% quantity sweep, or ?mode=method for method choices (details)

POST /api/pcf/ai-draft — AI process-tree draft {description, mode: "tree", unit?, weight_kg?, region?, product_id?} → 202 {job, poll, retry_after_s, expected_s, expected_basis, progress} (add ?sync=1 to wait for the tree in the same request). retry_after_s is only the polling interval; expected_s is how long a draft usually takes, in seconds: the median of the last 20 finished drafts on the server (expected_basis says so, or says when no draft has finished yet and the figure comes from drafts timed in user testing). product_id does not import the product's saved weight or country — pass weight_kg and region in the body, or the draft treats them as missing at the assumption gate

Common mistake: there is no POST /api/pcf/product/{id}/ai-draft. A POST there answers 405 with reason: "wrong_path" and hint: "use POST /api/pcf/ai-draft", plus the right method, path and body under use. Starting a draft is always the standalone POST /api/pcf/ai-draft above (pass product_id in the body, don't nest the path under the product); polling is the separate GET …/ai-draft/job/{job} below, not the same path either.

GET /api/pcf/ai-draft/job/{job} — poll: running (progress {step, done, total, message}: done of total stages finished and a plain-English message, plus the partial tree, retry_after_s and expected_s) · done (result = the tree) · error · interrupted (server restarted and it could not resume — start again; allowance refunded). job/current = your latest draft · DELETE dismisses a finished draft

POST /api/pcf/ai-draft/accept — write a draft into a product {product_id, tree, job?, on_existing?: "replace"|"append", assumptions_confirmed?} (flat drafts: {product_id, lines}) · POST /api/pcf/ai-draft/node — open one input into its own inputs. Inputs without a factor are already written to the product as cut-off lines: the answer says so in cutoff_lines_note, and each item in cutoffs carries reason and reason_text (reason codes) — give those lines a factor instead of adding the input again

assumptions_confirmed: required (true) whenever the draft's source description left something — material, mass or country — to the AI to assume; omitted or false → 400 {"reason": "assumptions_unconfirmed", "assumptions": [{key, label, value, status}]} naming each one. See the end-to-end script above for where it goes in the body, and Draft assumptions for what the result shows afterwards.

POST /api/pcf/product/{id}/calculate — calculate {reason?, force?} → new pinned version (headline, 95% band, precision score, breakdown); unchanged inputs → {unchanged: true, version} and no new version. The first field of the answer is completeness_banner (what is outside the total), and the score is data_quality_pct — details

POST /api/pcf/product/{id}/calculate?compact=1 — the same calculation with a short answer (the full answer is 25–45 KB): {compact: true, completeness_banner, id, product_id, version, created_at, engine_version, total_co2e, band_low, band_high, data_quality_pct, quality_tier, unmatched_lines, unchanged, forced, reason, etag, declared_unit, unit, declarable, stale, method_warnings, full_result} — every value is copied from the full answer of the same call (nothing is recomputed); full_result is the GET …/result?version=N path for the breakdown. The answer carries X-Climly-Compact: 1; compact other than 1/0 is 400 and creates no version.

curl -s -X POST "$B/api/pcf/product/$PID/calculate?compact=1" -H "X-API-Key: $KEY" -H "Content-Type: application/json" -d '{"reason": "first calculation"}'
{
  "compact": true,
  "completeness_banner": {
    "unmatched_lines": 0,
    "excluded_mass_pct": 0,
    "declarable": true,
    "nested_cutoffs": [],
    "text": "Every input has an emission factor · within the 5% cut-off threshold",
    "cutoffs_on_product": [],
    "mass_share_unknown": 0,
    "excluded_share_pct": 0.0,
    "threshold_pct": 5.0,
    "stamp": null,
    "score_warning": null,
    "reason_codes": {},
    "basis": "excluded_mass_pct: share of the declared input mass on lines and sub-assembly inputs without an emission factor (cut-offs), from the completeness check's own per-item shares — energy inputs and cut-offs whose share is not stated are counted in mass_share_unknown, not in the figure. excluded_share_pct is the PACT exemptedEmissionsPercent figure (headline + known gap); declarable follows it (5% threshold) and the other completeness rules."
  },
  "id": 1201,
  "product_id": 412,
  "version": 1,
  "created_at": "2026-11-13 09:00:00",
  "engine_version": "pcf-2.2",
  "total_co2e": 1.506636,
  "band_low": 1.132014,
  "band_high": 1.965871,
  "data_quality_pct": 72.3,
  "quality_tier": "good",
  "unmatched_lines": 0,
  "unchanged": false,
  "forced": false,
  "reason": "first calculation",
  "etag": "\"3f0c2a9b1d4e5f60718a\"",
  "declared_unit": "1 piece",
  "unit": "kg CO2e per declared unit",
  "declarable": true,
  "stale": false,
  "method_warnings": [],
  "full_result": "/api/pcf/product/412/result?version=1"
}

GET /api/pcf/product/{id}/export.csv · ?full=1 (alias ?extended=1) · /report.pdf · /pact.json · /reviewer-pack.zip — exports

GET /api/pcf/product/{id}/export/openlca.zip — the product as an openLCA 2 JSON-LD archive (processes, flows, flow properties, unit groups, categories and a ready product system); free plan: structure and amounts only, Premium: with factor values — details

GET /api/pcf/product/{id}/export/simapro.csv — Beta — test the import in your SimaPro before relying on it. The emission is not mapped to a SimaPro method flow (such as “Carbon dioxide, fossil”): the value is Climly CO2e in a custom flow, and the file repeats this note in its header and in the product process comment. The product as a SimaPro CSV processes file (semicolon, Windows-1252): one unit process plus one background process per factor record or pinned sub-assembly; Premium: values and Lognormal uncertainty (SD² = squared geometric SD), free plan: structure and amounts only, a greenhouse-gas input written as 1 (X-Climly-Preview: 1). Only Climly's own open records, no ecoinvent data; a record whose licence does not allow republication carries no value. Same access as the openLCA export (members of the owning organisation; other organisations 404, anonymous 401; 400 before the first calculation; 60 per hour per product, then 429). Format source and what we could not verify: method 9.18. Zero-emission lines, greenhouse-gas lines as SimaPro substances, product parameters and category types are carried: what the files carry. ILCD and EPD formats are next, not available yet. ?summary=1 on this URL or on export/openlca.zip answers JSON instead of the file, with what the file carries: lines_total, lines_with_values, library_refs and withheld (n, share_pct of the headline), not_exported, carried_co2e, total_co2e; the file itself is unchanged.

GET /api/pcf/product/{id}/export/epd-readiness.zip — This is not an EPD. Use it as input for an EPD programme operator and third-party verification. A ZIP for the LCA practitioner and the programme operator: README.txt, epd-readiness.json (schema climly-epd-readiness-0.1: product and declared unit, EN 15804 module table, every EN 15804+A2 indicator by module, line to module mapping, electricity, data quality, sources, gaps), indicators.csv, lines-by-module.csv, sources.csv. Climly fills only GWP-total, GWP-fossil, GWP-biogenic and GWP-luluc (module labels as in EN 15804 module labels); every other indicator is "not calculated by Climly" with no value. Premium: GWP values; lines with customer-licensed or licence-restricted data carry no value. Free plan: structure, modules and quantities only (X-Climly-Preview: 1). Optional ?operator= environdec (The International EPD System), epd-turkey, ibu or generic (default): the README, next_steps, programme_operator and the PCR, programme and verification gaps then give that operator’s steps (application, PCR source, verification, registration and publication, each with the operator’s own page); a step to confirm ends with “check with the operator”. Indicators and values are the same for every operator; an unknown operator is 400 invalid_operator. Same access, limits and errors as the SimaPro export. Rule: method 9.18.

GET /api/pcf/product/{id}/versions · /diff?from=1&to=2 · /history?limit=50&offset=0 — versions, what changed (lines, factors, product details, excluded lines), paginated audit trail with who made each change

GET /api/pcf/product/{id}/result?version=N — one calculated result (latest by default) with stale, ai_accepted, pact_conformance, latest and engine_current; 404 {"reason": "no_result"} before the first calculation

POST /api/pcf/compare — two products or versions side by side {a, b, a_version?, b_version?}, as a paired Monte Carlo on the two pinned results: {method: "paired_mc", n, seed, p_b_lower, difference_band, verdict, …} with verdict one of “B is lower than A (95%)”, “A is lower than B (95%)”, “not shown to differ at 95%”; the answer names the engine of each side (engine {current, a, b}), whether each side is declarable (declarable {a, b}) and, when one side is screening-level or calculated before completeness was assessed, a verdict_note that is also appended to verdict; a product with an unreviewed AI recipe adds stamp (details)

POST /api/pcf/product/{id}/publish {"confirm": true} — publish the latest calculation as a self-declared statement and pin it as public version N; without confirm → 400 {"reason": "confirm_required", "summary"}. ?unpublish=1 withdraws it; add "unlisted": true to publish without a registry listing · POST /api/pcf/product/{id}/listing {"unlisted": true|false} — change the registry listing of a published statement (the link, QR code, verification page and public API keep working; no new public version, no figure changes) · GET /api/public/pcf/{public_id}?v=N — the public verification view of published version N with badge (no line detail; name, functional unit and weight are frozen at calculation time, so editing the product never changes a published version); 404 before the first publication; a withdrawn version answers a withdrawal notice · GET /api/registry — the latest published, declarable version of each listed statement (an unpublished recalculation never appears) — details

POST /api/pcf/demo — one-click example product (organic cotton T-shirt), calculated; only for an account with no products yet → {id, public_id, total_co2e, data_quality_pct, accuracy_pct}

POST /api/pcf/product/{id}/duplicate?as=scenario {name?} — linked what-if copy: lines, parameters and assumption notes (AI-drafted intermediates are shared, not copied); uses no product slot (free plan: 3 per product) → {id, public_id, name, scenario_of} — compare it with /api/pcf/compare once calculated

GET /api/pcf/product/{id}/explain?version=N — plain-language reading of a result: PEF data quality rating per criterion (dqr), the band in words (band), up to three actions that narrow it, warnings [{code, text}], the parameter sweep and the source disagreement for the largest line. Read-only

POST /api/pcf/product/{id}/companions — add the missing well-to-tank / grid-loss companion lines (the product and its AI-drafted intermediates) → {added, unavailable} · POST /api/pcf/product/{id}/eol-fossil-co2 {line_id?} — add the offered end-of-life fossil CO2 line (declared fossil carbon × incinerated share × 44/12). Neither runs by itself; recalculate afterwards

GET /api/pcf/carbon-content?material=PA6 — stoichiometric fossil-carbon content of a polymer, kg C per kg (404 with the list of known materials otherwise — nothing is estimated); write it to the product with PUT {fossil_carbon_content_kg, fossil_carbon_content_basis}

Approved records first. Every AI suggestion (ai-match, flat and tree drafts, ai-draft/node) says why it was chosen in suggestion_basis {code, label, text}: own_record "Your own record" (your licensed data or private factor, always tried first) · verified_record "Verified record" · approved_derived "Approved derived record" · closest_approved "Closest approved match" (no record names the input exactly; check it fits) · ai_estimate "AI estimate — no approved record" (a tree input opened into an AI recipe, only when no approved record fits). Only Valid records are suggested; Expired, Superseded, Withdrawn and Deprecated records never are. A tree input is either matched or expanded: before the AI is asked for a recipe, the closest approved record of the same material is tried (why_not_expanded on the node; "force": true on ai-draft/node asks for the recipe instead)

POST /api/pcf/ai-match {description, stage?, region?} — one AI-suggested factor for a line, with ai_reason and suggestion_basis (why this record); put it on the line with match_type: "ai_suggested" — it stays out of the total until you confirm it · POST /api/pcf/ai-bom {name, weight_kg?, country?} — AI default process lines. Both count against the daily AI allowance (429 over it, 503 while the model is unavailable)

GET /api/pcf/product/{id}/reviewer-pack.zip?v=N (public version N) or ?rv=K (calculation version K; default the latest) — the pack is pinned to one calculation: statement.pdf, pact.json, export.csv, factors.csv, history.json, params.json, metadata.json, methodology.txt (the method summary of the engine that produced that result), checklist.md (the 20-item ISO 14067 / ISO/TS 14071 review checklist with facts read from that calculation — details), derived_factors.csv (only when a Climly-derived factor is pinned: formula, terms, inputs and the recomputed value) and a README. factors.csv ends with record_version, source_released, record_status and calc_method. Headers X-Climly-Calculation-Version and X-Statement-SHA256; the PDF's fingerprint is logged, so /api/public/pcf/{public_id}/pdf/{sha256} confirms it. Send ?v or ?rv, not both (400). In history.json account numbers are replaced by a per-pack label (actor: "actor 1") next to the masked e-mail; at most the newest 2000 entries are included (entries_total gives the full count). The signed public link allows 10 downloads per hour per network (then 429); within 24 hours, and while the product is unchanged, it serves the same pack (same statement.pdf and SHA-256) again instead of issuing a new PDF. Signed-in downloads allow 30 per hour per product (then 429 {"reason": "rate_limited"}). Repeat downloads of the same calculation are logged in the audit trail once per day. PACT companyIds is an opaque urn:climly:company:… derived from the product owner's organization (or account), the same whoever exports

Reviewer pack preview (free plan): GET …/reviewer-pack.zip?preview=1 (with ?v or ?rv as above) answers 200 with X-Climly-Preview: 1 and a file name starting pcf-reviewer-pack-PREVIEW-: the same pack for the same calculation, with statement.pdf carrying the preview watermark, pact.json flagged "preview": true, the simple export.csv (the extended CSV is Premium) and a README that opens with the preview notice; methodology.txt, factors.csv, derived_factors.csv (when a Climly-derived factor is pinned), history.json, params.json, metadata.json and study.json are included unchanged. The figures are identical. The preview PDF's fingerprint is logged as a preview. Premium ignores preview and always gets the pack without watermark (X-Climly-Preview: 0); without preview=1 the free plan still gets 402.

POST /api/pcf/product/{id}/reviewer-link {version?} | {public_version?} (one of them, not both — 400) — signed reviewer-pack link, valid 14 days, no account needed (Premium, owner only), pinned to that calculation (default the latest; recalculating later does not change what the link serves) → {url, expires_at, days, calculation_version} · POST /api/pcf/line/{line_id}/supplier-invite — 30-day, one-submission link for your supplier's own PCF value and evidence, owner or org admin only → {url, expires_at, days} (the whole supplier flow)

Plan correction: supplier-invite is not Premium-only, despite an earlier version of this list — the free plan includes 2 invited lines per product (402 {"reason": "free_supplier_invites", "limit": 2} past that; re-inviting the same line is always free); Premium removes the per-product limit. See Where the free plan stops.

POST/DELETE /api/pcf/product/{id}/result/{version}/review {note?} — internal peer review sign-off of one result version by an organisation admin other than the owner (not an ISO 14071 critical review) · withdraw it with DELETE

Supplier data: invite, submission, the buyer's line

Ask a supplier for their own footprint of one input, and the value lands on that line of your bill of materials once you confirm it. The supplier needs no account. Three steps:

  1. Invite (buyer). POST /api/pcf/line/{line_id}/supplier-invite with your session or X-API-Key — product owner or organisation admin only, no body → {url, expires_at, days} (the free plan adds free_invites {limit, used, left, per}: 2 invited lines per product). Send url to the supplier. Its t parameter is the credential: signed, valid for 30 days, good for one submission, and it stops working if you lose write access to the product.
  2. Submit (supplier, no sign-in). GET /api/public/supplier-pcf?t=… shows what is asked {description, stage, qty, qty_unit, product_name, requester, expires_at, already_submitted, starter_product}; POST /api/public/supplier-pcf with the body below sends the value → {ok: true, message, starter_product}. value is kg CO2e per unit; use a unit the line's qty_unit converts to (kg and t are one family; kg and piece are not — a line whose units do not match is left out of the total at calculation, like any unit mismatch). source_url (http or https) and source_name are required; supplier_name, supplier_email and uncertainty_pct (0–100, default 15) are optional. Errors: 400 invalid value, unit, evidence or optional field · 403 invalid or expired link · 409 link already used (the free plan also allows one submission per line per 30 days) · 410 invitation revoked or no longer active · 429 more than 10 submissions per hour from one network. The page at /supplier-pcf?t=… sends the same body.
  3. Written to the buyer's line. The value becomes a private factor of the product owner (factor_uid EF-PRIV-…, unit kg CO2e / <unit>, with the evidence URL and source name; visible only to the owner) and the invited line is set to that factor with match_type: "supplier" and match_confirmed: false; the line's audit trail records via: "supplier_invite", and you get an e-mail when mail delivery is on. Until you confirm it, the line stays out of the total. Read it with GET /api/pcf/product/{id}, confirm with PUT /api/pcf/line/{line_id} {"match_confirmed": true}, then recalculate. After that the line counts as supplier-specific data (PACT primaryDataShare).

Example body for step 2 (t is the t= value of the invite link):

{
  "t": "<the t= value of the invite link>",
  "value": 4.2,
  "unit": "kg",
  "source_url": "https://example.com/epd/acme-aluminium-housing-2025.pdf",
  "source_name": "Acme Aluminium EPD 2025, S-P-01234",
  "supplier_name": "Acme Aluminium",
  "uncertainty_pct": 10
}
export B="__BASE__" KEY="fb_your_api_key"
H=(-H "X-API-Key: $KEY" -H "Content-Type: application/json")
# 1 · buyer: invite the supplier for line $LINE of product $PID
URL=$(curl -s "${H[@]}" -X POST "$B/api/pcf/line/$LINE/supplier-invite" | jq -r .url)
T=${URL##*t=}
# 2 · supplier (no sign-in): read the request, then send the value (body above, saved as supplier.json with "t": "$T")
curl -s "$B/api/public/supplier-pcf?t=$T" | jq '{description, qty_unit, product_name, already_submitted}'
curl -s -X POST "$B/api/public/supplier-pcf" -H "Content-Type: application/json" -d @supplier.json | jq .
# 3 · buyer: the line now points at the supplier's factor, unconfirmed — confirm it and recalculate
curl -s "${H[@]}" "$B/api/pcf/product/$PID" | jq ".lines[] | select(.id==$LINE) | {factor_uid, match_type, match_confirmed}"
curl -s "${H[@]}" -X PUT "$B/api/pcf/line/$LINE" -d '{"match_confirmed": true}' | jq .
curl -s "${H[@]}" -X POST "$B/api/pcf/product/$PID/calculate" -d '{}' | jq '{version, total_co2e}'

Your own supplier electricity factor (market-based)

If you buy certified or contracted electricity (YEK-G, GoO, I-REC, a PPA, or your supplier's disclosed mix), you can use your own factor on an electricity line instead of the grid average. The value is your declaration: Climly does not verify the factor or the certificate. The line's grid factor stays next to it as the location-based reference on every output (screen, PDF, CSV, PACT, reviewer pack) and is not in the headline. Method.

  1. Set it. PUT /api/pcf/line/{line_id}/market-electricity (JSON, owner or organisation admin) with {"value": 0.05, "instrument": "goo", "period": "2025", "note": "optional"}. value is kg CO2e per kWh, from 0 to 2; 0 only for yek_g, goo, i_rec or ppa (the answer then carries a warning); supplier_mix and other need a value above 0. period must contain a year. The line must be in kWh (or MWh) and matched to a grid electricity factor first. → {ok, factor_uid: "EF-PRIV-…", market_electricity, warning}; the line now points at that private factor with match_type: "supplier". Setting it again makes a new factor (the earlier one is kept for earlier versions). Errors: 400 value, instrument, period or unknown field · 404 line not found or not yours · 409 not an electricity line · 415 body is not JSON.
  2. Attach the certificate (optional). PUT /api/pcf/line/{line_id}/market-electricity/certificate?filename=… with the raw file as the body and Content-Type application/pdf, image/png or image/jpeg, at most 10 MB. The content must really be that type (415 otherwise; 413 too large). The file is kept outside the public site; the product owner and the owner's organisation can download it with GET on the same path, and it is included in the reviewer pack (certificates/ plus market_electricity.json). Anyone else gets 404.
  3. Recalculate. The result line carries market_based (label, instrument, period, certificate SHA-256, location_based_reference with the grid factor and its kg CO2e) and the result carries scope2_market_based (market-based kg, location-based reference kg, headline if location-based). PACT: comment and extensions[0].data.scope2MarketBased; your note is not in the PDF or PACT file. DELETE /api/pcf/line/{line_id}/market-electricity puts the line back on its grid factor.
export B="__BASE__" KEY="fb_your_api_key"
H=(-H "X-API-Key: $KEY")
curl -s "${H[@]}" -H "Content-Type: application/json" -X PUT "$B/api/pcf/line/$LINE/market-electricity" \
  -d '{"value": 0.05, "instrument": "goo", "period": "2025", "note": "GoO cancellation 2025-0172"}' | jq .
curl -s "${H[@]}" -H "Content-Type: application/pdf" -X PUT --data-binary @goo-2025.pdf \
  "$B/api/pcf/line/$LINE/market-electricity/certificate?filename=goo-2025.pdf" | jq .certificate
curl -s "${H[@]}" -H "Content-Type: application/json" -X POST "$B/api/pcf/product/$PID/calculate" -d '{}' | jq '{version, total_co2e}'

Bring your own data: licensed database results and EPD comparison

Climly can calculate with your own background data: results from your database licence (Sphera MLC, ecoinvent, Carbon Minds and others), supplier PCFs and EPDs. They become private factors of your account (Premium), labelled customer-licensed: <database> <version>, and come first in factor matching as "Your licensed data". They are never returned to anyone else by Explorer, /api/factors, /api/export.csv, /f/, /api/factor, /api/calc/* or the MCP server. The PDF statement and PACT name the database and version but leave the per-line value out; SimaPro and openLCA exchange files keep the background value withheld; the public verification page shows stage totals only. A verifier seat and a review link show each licensed line's database, version and share of the total (whole percent), not its per-unit value or line emission; totals stay visible. Climly does not verify your licence or the data.

  1. Import. POST /api/byod/import, multipart/form-data with the header X-Climly-Import: 1: file plus format (climly_csv - template at GET /api/byod/template.csv; simapro_csv - an impact assessment result export or system processes; ilcd - ILCD / ILCD+EPD process datasets, XML or ZIP), database_name, database_version, licence_holder (defaults to your organisation), system_boundary (cradle_to_gate, gate_to_gate, cradle_to_grave), gwp_set (AR6, AR5, AR4, EF3.1, EF3.0; may come from the file), reference_unit (when the file does not state it), licence_source (ecoinvent, sphera, epd, other; when left out it follows database_name), licence_confirmed=true (the confirmation text of that source, in GET /api/byod/options licence_sources: "I confirm my organisation holds a licence that permits use of this data in Climly for our own calculations", plus, for Sphera, that only figures published in an EPD are uploaded); the confirmation, its time and text are stored with the import (consent in GET /api/byod/batches), optional evidence (PDF/PNG/JPG, at most 10 MB), dry_run=1 and partial=1. At most 500 rows per file and 5 MB. Each row is checked: the unit must be a CO2e mass per a unit the engine knows (kg CO2e / kg, g CO2e / kWh is converted), the value above 0, the boundary and GWP set known; a SimaPro unit process is refused (direct emissions only). Duplicates of your records (same database, version, name, region and unit) are skipped. A row error saves nothing (422 with the report) unless partial=1. Errors: 400 missing licence confirmation, metadata, header or unreadable file · 402 free plan · 413 too many rows or too large · 415 not multipart or evidence of the wrong type.
  2. Review. GET /api/byod/records and GET /api/byod/batches (your account only); GET /api/byod/batches/{id}/evidence; DELETE /api/byod/batches/{id} deletes an import (earlier results keep their pinned values). Factor matching (/api/pcf/match) marks your records with licensed_data; a result line carries customer_licensed and the result customer_licensed (lines, databases).
  3. Compare with an EPD. PUT /api/pcf/product/{id}/epd-comparison (JSON) with {"epd_number", "valid_until": "YYYY-MM-DD", "declared_unit": "1 kg", "gwp_total", "gwp_fossil"?, "gwp_set"?, "programme"?} - the EPD's A1-A3 figures. The answer puts the EPD next to Climly's latest result (material, packaging, transport and manufacturing stages, converted to the EPD's declared unit) with the difference in %, the status consistent (within +/-10%) or review, and where the difference may come from (lines on public data versus your licensed data, GWP set, boundary, biogenic carbon). GET repeats it ("set": true; with no EPD entered it answers 200 with "set": false), DELETE removes it. This is a comparison, not a verification: Climly is not an independent verifier.

Verifier workflow: line evidence, findings, verification statement

Evidence files on activity-data lines, a finding loop between a verifier with a seat (POST /api/pcf/product/{id}/reviewer-seat) and the preparer, and the verifier's statement bound to one calculation version. Nothing here changes a figure or opens a calculation version. Climly does not perform or review the verification. Method.

  1. Evidence (preparer). POST /api/pcf/line/{line_id}/evidence?kind=invoice with the raw file as the body, the download name in an X-Filename header and an optional short note in an X-Note header (percent-encoded UTF-8; they stay out of web server logs — ?filename= and ?note= are still accepted); Content-Type application/pdf, image/png, image/jpeg, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet or text/csv, at most 10 MB, 20 per line. kind: invoice · meter_reading · delivery_note · bom_source · supplier_data · other. → 201 {evidence: {id, line_id, kind, name, type, size, sha256, uploaded_at, download}}. Errors: 400 kind or empty file · 413 too large · 415 type not allowed or content does not match (macro spreadsheets, HTML as CSV) · 404 line not found or not yours · 409 limit · 413 evidence_limit when a product's evidence would exceed 200 MB in total · 429 more than 60 uploads an hour. GET /api/pcf/line/{line_id}/evidence, GET /api/pcf/product/{id}/evidence (lists), GET /api/pcf/evidence/{evidence_id} (download, attachment), DELETE /api/pcf/evidence/{evidence_id} (write access). The reviewer pack of the owner and of a verifier seat adds evidence.json and evidence/; a pack shared through a review link carries no evidence, findings or verifier statement.
  2. Seat reads. GET /api/pcf/reviews/{seat_id}/evidence and GET /api/pcf/reviews/{seat_id}/evidence/{evidence_id} — the verifier's own addresses; the owner addresses answer 404 to a verifier.
  3. Findings (verifier). POST /api/pcf/reviews/{seat_id}/findings {"type": "major_nonconformity" | "minor_nonconformity" | "clarification_request" | "observation", "text": "…", "line_id"?: N, "version"?: K} → 201 with status: "open". POST …/findings/{finding_id}/close, …/not-resolved, …/reopen with {"text"?: "…"}. GET /api/pcf/reviews/{seat_id}/findings → {items: [{id, type, status, line_id, version, text, messages, orphaned, can_act}], counts, statement_blocked}. A change that the status does not allow answers 409 {"reason": "invalid_transition"}. A finding whose verifier is no longer assigned (seat revoked or account deleted) carries orphaned: true and orphaned_note “opened by a verifier who is no longer assigned”; another active verifier seat on the product can close it, mark it not resolved or reopen it with a note (400 {"reason": "note_required"} without text), and the audit trail records both seats. The product owner cannot close findings.
  4. Answers (preparer). GET /api/pcf/product/{id}/findings · POST /api/pcf/product/{id}/findings/{finding_id}/response {"text": "…"} (write access; open or responded → responded).
  5. Statement (verifier). POST /api/pcf/reviews/{seat_id}/statement {"organization": "…", "assurance_level": "limited" | "reasonable", "standards": ["ISO 14067:2018", "ISO 14064-3:2019"], "scope"?: "…", "statement_date": "YYYY-MM-DD", "version"?: K, "pdf_base64": "…", "filename"?: "…", "attestation": true} (PDF at most 7 MB; it must open and have at least one page, otherwise 415 {"reason": "invalid_file"} — Climly does not check its content) → 201 {statement: {id, text, detail, calculation_version, engine_version, fingerprint, statement_pdf, attestation: {text, at}}}. attestation must be true — the verifier's confirmation that the statement gives an unmodified conclusion and is theirs to issue (its text: attestation_text in GET /api/pcf/reviews/{seat_id}/statement); otherwise 400 {"reason": "attestation_required"}. 409 with reason major_open, major_not_resolved or findings_open while a finding of the seat is open or a major nonconformity raised from any verifier seat on the product is open or not resolved; 409 statement_exists for a second statement on the same version; 409 self_verification when the verifier is the product owner, a member of the owner's organisation or an alias of their address (also on invitation and acceptance); 400 when organization names Climly. Standards accepted: ISO 14067:2018, ISO 14064-3:2019, ISO/TS 14071:2014, ISO 14044:2006, ISO 14025:2006, GHG Protocol Product Standard, PACT Methodology v3. DELETE /api/pcf/reviews/{seat_id}/statement/{id} withdraws it; the public page then stops showing it, without a withdrawal notice. Revoking the seat, or deleting the verifier's account, withdraws the seat's statements the same way. Owner view: GET /api/pcf/product/{id}/verification (latest_covered); the owner removes a statement from the public page with DELETE /api/pcf/product/{id}/verification/{statement_id} (kept as withdrawn by the owner, not deleted; withdrawn_by in the owner's and the seat's view).
  6. Public. When the bound version is the one shown, GET /api/public/pcf/{public_id} carries verification {status: "verified", heading, text, organization, assurance_level, standards, statement_date, calculation_version, fingerprint, statement_pdf: {url, sha256}, disclaimer, report: {text, url}} (heading “Verifier's statement”), badge.kind: "verifier_statement_uploaded" with badge.text “Verification statement uploaded (not checked by Climly)” and badge.detail “Body named by the uploader: … (… assurance, date).” (text only), and a conformance_statement that says a statement from that body is attached and not checked by Climly. Until November 2026 the kind was called "third_party_verified" and the text read “Verified by …”; read the old name as "verifier_statement_uploaded". On a later version it carries verification.status: "version_differs" (text “No verification statement for this version. …”) and the self-declared badge. report is the “Report a problem with this verification” link to the contact form. A product with no statement, or whose statements were all withdrawn, carries no verification key; a statement on a calculation version that is not published is not shown on any public page. The statement PDF: GET /api/public/pcf/{public_id}/verification/{id}.pdf (only while that version is published).
  7. Publishing gate. POST /api/pcf/product/{id}/publish answers 409 {"reason": "study_incomplete", missing, required, product_missing, recalculate_needed} when one of the nine required study fields is empty, or holds only a placeholder (“x”, “n/a”, “tbd”, fewer than three letters or digits), in the calculation being published; the confirm-less summary carries study_gate {ok, required, missing, placeholder?, minimal?} (minimal: declared but only a few words — it does not block). It answers 409 {"reason": "withdrawn_factor", withdrawn_factors: {count, lines, note}} when the calculation cites a factor that was withdrawn on licence or permission grounds; the summary then carries withdrawn_factors. Expired or superseded factors only warn. It answers 409 {"reason": "study_out_of_date", fields} when a study field drafted from an earlier calculation would now read differently (see draft-basis below); the summary then carries study_out_of_date {fields, note}. The summary also lists direct_emission_checks when a direct emission line looks like a yearly amount (gas mass above the product mass, a gas with GWP100 of 100 or more above 1% of the product mass, or one line at 50% or more of the headline); it does not block. Confirming the version that is already the latest public version is not blocked by these checks.
export B="__BASE__" KEY="fb_your_api_key"
H=(-H "X-API-Key: $KEY")
curl -s "${H[@]}" -H "Content-Type: application/pdf" -H "X-Filename: gas-bill-2025-03.pdf" \
  --data-binary @gas-bill-2025-03.pdf "$B/api/pcf/line/$LINE/evidence?kind=invoice" | jq .evidence
curl -s "${H[@]}" "$B/api/pcf/product/$PID/findings" | jq '.items[] | {id, type, status, text}'
curl -s "${H[@]}" -H "Content-Type: application/json" -X POST "$B/api/pcf/product/$PID/findings/$FID/response" \
  -d '{"text": "Gas bill for March attached to the line"}' | jq .status

A longer walkthrough: import, versions, compare, publish

New here? The shorter end-to-end script above covers register-to-delete in seven steps. This one assumes an API key already exists and goes deeper: CSV import, version diffs, comparing two products and publishing a statement. Copy into a terminal (bash/zsh; jq for brevity). Our test suite checks on every release that this script still calls each endpoint it documents. On the free plan the second product (step 9) is refused with 402 — the free plan includes one product.

export B="__BASE__" KEY="fb_your_api_key"
H=(-H "X-API-Key: $KEY" -H "Content-Type: application/json")

# 1 · create a product
PID=$(curl -s "${H[@]}" -X POST "$B/api/pcf/products" \
  -d '{"name":"Steel bracket","country":"TUR","year":2026,"functional_unit":"1 piece","weight_kg":0.4}' | jq -r .id)

# 2 · find a factor and add a line (factor values come only from the database)
FUID=$(curl -s "${H[@]}" "$B/api/pcf/match?q=steel&stage=material&unit=kg&region=TUR" | jq -r '.items[0].uid')
curl -s "${H[@]}" -X POST "$B/api/pcf/product/$PID/lines" \
  -d '{"lines":[{"stage":"material","description":"Steel sheet","qty":0.42,"qty_unit":"kg","factor_uid":"'$FUID'"}]}'

# 3 · or import a CSV bill of materials (template: /api/pcf/bom-template.csv)
printf 'stage,description,qty,qty_unit,waste_pct,factor_uid\nmanufacturing,Grid electricity,0.8,kWh,0,\n' > bom.csv
curl -s -H "X-API-Key: $KEY" -H "Content-Type: text/csv" --data-binary @bom.csv "$B/api/pcf/product/$PID/lines/import"

# 4 · AI process-tree draft: starts in the background (202), poll until done
JOB=$(curl -s "${H[@]}" -X POST "$B/api/pcf/ai-draft" \
  -d '{"description":"Hot-rolled steel bracket, powder coated","mode":"tree","unit":"1 piece","region":"TUR"}' | jq -r .job)
while :; do
  curl -s "${H[@]}" "$B/api/pcf/ai-draft/job/$JOB" > job.json
  S=$(jq -r .state job.json); [ "$S" = running ] || break
  sleep "$(jq -r '.retry_after_s // 2' job.json)"
done; echo "draft: $S"

# 5 · accept the tree into the product (only when it finished)
[ "$S" = done ] && jq --argjson pid "$PID" --arg job "$JOB" '{product_id:$pid, job:$job, on_existing:"append", tree:.result}' job.json \
  | curl -s "${H[@]}" -X POST "$B/api/pcf/ai-draft/accept" -d @- | jq '{added, subassemblies: [.subassemblies[]?.name]}'

# 6 · calculate (twice, so there are two versions)
curl -s "${H[@]}" -X POST "$B/api/pcf/product/$PID/calculate" -d '{"reason":"first run"}' | jq '{version, total_co2e, band_low, band_high, accuracy_pct}'
curl -s "${H[@]}" -X POST "$B/api/pcf/product/$PID/calculate" -d '{"reason":"re-run"}' | jq .version

# 7 · versions and what changed between them
curl -s "${H[@]}" "$B/api/pcf/product/$PID/versions" | jq '.items[] | {version, total_co2e, reason}'
curl -s "${H[@]}" "$B/api/pcf/product/$PID/diff?from=1&to=2" | jq '{total_delta, lines}'

# 8 · exports (free: CSV + watermarked PDF/PACT preview; Premium: full CSV, clean PDF/PACT)
curl -s -H "X-API-Key: $KEY" -o pcf.csv "$B/api/pcf/product/$PID/export.csv"
curl -s -H "X-API-Key: $KEY" -o pcf-full.csv -w "full CSV: %{http_code}\n" "$B/api/pcf/product/$PID/export.csv?full=1"
curl -s -H "X-API-Key: $KEY" -o statement.pdf -D - "$B/api/pcf/product/$PID/report.pdf" | grep -i x-climly-preview
curl -s -H "X-API-Key: $KEY" "$B/api/pcf/product/$PID/pact.json" | jq '{preview, specVersion, pcf: .pcf.pcfExcludingBiogenicUptake}'

# 9 · compare with a second product (Premium: the free plan includes one product)
PID2=$(curl -s "${H[@]}" -X POST "$B/api/pcf/products" -d '{"name":"Steel bracket (supplier B)","country":"TUR","year":2026,"functional_unit":"1 piece"}' | jq -r .id)
curl -s "${H[@]}" -X POST "$B/api/pcf/product/$PID2/lines" \
  -d '{"lines":[{"stage":"material","description":"Steel sheet","qty":0.5,"qty_unit":"kg","factor_uid":"'$FUID'"}]}' > /dev/null
curl -s "${H[@]}" -X POST "$B/api/pcf/product/$PID2/calculate" -d '{}' > /dev/null
curl -s "${H[@]}" -X POST "$B/api/pcf/compare" -d '{"a":'$PID',"b":'$PID2'}' | jq '{difference_pct_b_vs_a, significant, verdict}'

# 10 · publish the statement and read its public verification view
PUB=$(curl -s "${H[@]}" "$B/api/pcf/product/$PID" | jq -r '.product.public_id // .public_id')
curl -s "${H[@]}" -X POST "$B/api/pcf/product/$PID/publish" | jq '{reason, summary}'   # 400 confirm_required + what will become public
curl -s "${H[@]}" -X POST "$B/api/pcf/product/$PID/publish" -d '{"confirm": true}' | jq '{public_version, badge, in_registry}'
curl -s "$B/api/public/pcf/$PUB" | jq '{name, total_co2e, version, preview, badge, conformance_statement}'

Exports

Free plan: the simple CSV, plus the PDF statement and PACT JSON as a preview: the PDF carries “PREVIEW — not for distribution” in the header band, next to the headline number and as a diagonal watermark repeated at three heights on every page, plus the footer “Premium removes the watermark”; the PACT file has a top-level "preview": true and "previewNote" (outside the PACT schema on purpose — a preview is not a data-exchange document). The figures are identical to Premium. The PDF response carries X-Climly-Preview: 1 and its SHA-256 in X-Content-SHA256; the public verification page of a free-plan statement shows the same preview stamp (decided by the PDFs issued for that calculation, not by the owner's current plan — upgrading later does not clear it on a published version). Premium: PDF and PACT without the preview marks, the extended CSV and the reviewer pack. On the free plan the reviewer pack downloads as a watermarked preview with ?preview=1 (details).

CSV round-trip. In both CSVs the first six columns are the import contract — stage, description, qty, qty_unit, waste_pct, factor_uid — so an exported file can be posted unchanged to /lines/import. Summary rows (headline, biogenic, completeness, boundary, engine…) start with # and are skipped by the import. The match_type column is kept (an AI-estimated line stays AI-estimated, with its evidence-ladder multiplier). What does not travel in a result CSV: sub-assembly links (re-imported as unmatched lines — use the structure export to move a nested BOM) and parameters (a qty_expr whose parameters are not defined in the target product is dropped with a warning and the evaluated qty is used). Energy/transport lines get their well-to-tank / grid-loss companion lines on import (an exported companion line is linked, not duplicated). Every line left out of the total (unit mismatch, no confirmed factor, a cut-off without a factor) follows the data rows as a # excluded: <stage> row whose kg column reads EXCLUDED — <reason>; the import skips it. The last three columns carry each factor's licence, source URL and source reference.

simple stage · description · qty · qty_unit · waste_pct · factor_uid · factor_source · factor_year · factor_region · uncertainty_pct · match_type · boundary · kg_co2e_headline · license · source_url · source_ref

full stage · description · qty · qty_unit · waste_pct · factor_uid · factor_activity · factor_source · factor_value · factor_unit · match_type · uncertainty_pct · kg_co2e_headline · sigma · kg_co2e_fossil · kg_co2e_biogenic · kg_co2e_luluc · split_basis · boundary · companion_of · companion_kind · derived · credit · factor_year · factor_region · line_id · qty_expr · sub_assembly · uncertainty_reasons · license · source_url · source_ref (+ a “# PEF DQR” summary row)

BOM import, structure export and templates

Files. POST /api/pcf/product/{id}/lines/import takes CSV (, ; TAB or |; decimal point or decimal comma — both detected, override with ?delimiter=semicolon / ?decimal=comma; UTF-8, or Windows-1254 from Turkish Excel) or .xlsx (sheet BOM or the first sheet, ?sheet= to pick another; legacy .xls → 415). Send the raw body or multipart field file. Columns are matched by header name (English, Turkish or German): level, parent, part_no, stage, description, qty, qty_unit, waste_pct, factor_uid, qty_expr, notes, match_type, confirmed; unknown columns are named in a warning; a file without a header row is read in the legacy order stage, description, qty, qty_unit, waste_pct, factor_uid. Ambiguous numbers (1,500 in a decimal-point file) are errors, never guesses.

Nested BOM in one import. With a level column (1, 2…, outline numbers 1.2.1 or SAP ..2), a row followed by deeper rows becomes a sub-assembly: a new component product (functional unit 1 <its unit>) holding those rows, linked from the parent line. A single level-0 first row is taken as the product itself and skipped. Alternatively a parent column holds the part_no of the parent row. Up to 4 sub-assembly levels. On the free plan the 5-component allowance applies. Parameters: an .xlsx Params sheet or CSV rows PARAM,name,value,unit,note,scope (scope = part_no of a sub-assembly; empty = the product you import into; a parameter used inside a sub-assembly is copied there — parameters are product-scoped). Calculate new sub-assemblies (deepest first, the response lists them in that order) before the product: a sub-assembly line counts once it has a result.

Validation and saving. Every row is validated with the same rules as POST …/lines. If any row has an error nothing is saved: 422 with errors: [{row, error}] (row = line number in the file, or Params!n). partial=1 saves the valid rows and skips rows with errors (and any rows below a rejected sub-assembly); file-level errors (component allowance, line limit) block even then. dry_run=1 saves nothing and returns detected (format, delimiter, decimal, encoding, sheet), columns, rows (each with depth, parent_row, errors, warnings) and summary.

Factor suggestions. In a dry run, each row without factor_uid gets match: {label, reason, best, candidates} from the same gated matcher as “find factor”. suggested = the record passed the checks, scored ≥ 6 and names every word of the description (or came from a defined generic term such as freight → HGV) — still check it; weak = a candidate exists but one of those fails, and reason says which; none = no usable record. Suggestions are never applied by themselves: send the ones you accept as multipart field choices = {"<row>": "<uid>"} with the same file (lines get match_type: deterministic). Up to 150 distinct inputs are looked up per dry run.

curl -s -H "X-API-Key: $KEY" -F file=@bom.xlsx "$B/api/pcf/product/$PID/lines/import?dry_run=1" | jq '.summary, .errors'
curl -s -H "X-API-Key: $KEY" -F file=@bom.xlsx -F 'choices={"3":"EF-PEECO-ae24861f6c"}' "$B/api/pcf/product/$PID/lines/import"
curl -s -H "X-API-Key: $KEY" -o structure.xlsx "$B/api/pcf/product/$PID/structure.xlsx"

Structure export. GET …/structure.csv / …/structure.xlsx: the nested BOM (level, part_no, stage, description, qty, qty_unit, waste_pct, factor_uid, qty_expr, match_type, confirmed, notes, plus factor_activity / factor_source / sub_assembly for reading) and the parameters. Posting it to /lines/import of an empty product rebuilds the same structure; sub-assemblies are created as new components. qty_source (ai = AI-drafted quantity, not yet reviewed · user = your quantity · empty = derived from match_type) and placeholder (1 = template or AI default quantity, not data) travel with each line, so a copy keeps the “AI-drafted, unreviewed” count and the placeholder warning of the original. companion_of_row + companion_kind (wtt, td, eol_fossil_co2) link a companion line to its main line by row number in the same file, and the import re-points the link to the new line — so the end-of-life fossil CO2 line stays attached to its incineration line and is not offered a second time. A note companion of line #N without a companion_of_row link (older exports) has the stale id removed, with a warning. sa_weight_kg, sa_country, sa_year, sa_functional_unit, sa_includes_packaging, sa_fossil_carbon_content_kg (+ sa_fossil_carbon_content_basis, required with it), sa_use_years, sa_grid_pathway on a sub-assembly row carry that component's own data, so the mass balance and completeness of the copy match the original. The product's own data travels as a Product sheet / CSV rows PRODUCT,field,value; the import fills only fields that are empty on the target product (weight, fossil carbon content, use-phase preset) and never overwrites — a different value is named in a warning (product_fields_set in the response). factor_license, factor_source_url and factor_source_ref carry each factor's licence and source for reading (the import ignores them). Lines the latest calculation left out of the total follow the data as # excluded: <stage> rows in the CSV and as an Excluded sheet in the .xlsx; the import skips both.

Sector templates. GET /api/pcf/templates lists hand-curated structures (olive oil 1 L bottle, wooden chair, denim jeans, PP bottle cap, steel bracket): stages, typical input names and units — no quantities and no factors; process steps (stamping, welding, galvanising, powder coating, moulding…) are their own manufacturing lines in the unit of the matching process record (m2 of coated area, m of weld), so their materials are not counted twice. POST …/lines/from-template {template, include?: [indexes], qty?: {"index": number}} creates the lines without factors; a line without your quantity gets the placeholder 1 and the note “Template placeholder - quantity 1 is NOT data”.

Results calculated before 2026-10-09 (older engine versions) export kg_co2e_gwp_total_legacy instead of kg_co2e_headline and no split columns. Methodology: /methodology-pcf.

Bulk mapping (spreadsheet columns)

POST /api/map/bulk {"lines": ["Grid electricity", "Diesel, HGV rigid", …], "stage"?: "material"|"packaging"|"manufacturing"|"transport"|"use"|"eol"|"spend", "region"?: "TUR"} (an unknown or missing stage — "energy", say — silently becomes "material", no 400; energy lines belong under "manufacturing" or "use") — matches up to 200 lines at once (a spreadsheet column, say), each against the same deterministic matcher as manual search. stage and region in the body are batch defaults. A line can be a string or an object {"q": "…", "unit"?: "kg", "region"?: "TUR", "stage"?: "material"} (only these four keys; q 1–200 characters): an object line is matched exactly like manual search with that unit and region (unit-family penalty, assumptions, auto_accept), and its best is set only when a candidate has auto_accept: true. Anything else — a number, null, a list, a nested object —, an unknown key, a line over 200 characters, an unknown per-line stage, an unrecognised unit or a region that is not a 2–3 letter code answers 400 {"reason": "invalid_line" | "unknown_key" | "query_too_long" | "invalid_stage" | "invalid_unit" | "invalid_region", "line_index"}; nothing is coerced to text. A unit written inside a string line (“1,000 kWh”) is still read out of it the same way manual search reads it. Free plan: 20 lines per request, object lines included (402 over — see above); Premium: up to 200 lines per request (413 {"reason": "too_many_lines"} over — split the list). Shares its IP rate-limit window with /api/export.csv and /api/cbam/lookup (60/5 minutes). Response: {items: [{line, stage, unit?, region?, candidates, best}], matched, note} — best is null below the same match-score threshold (6.0) manual search uses, and an electricity record is best only for the line's region (the body or line region, or a country named in the line; with no region only a world-average record); pick from candidates or fall back to ai-match per line.

curl -s -H "X-API-Key: $KEY" -H "Content-Type: application/json" -X POST "$B/api/map/bulk" \
  -d '{"lines":["Grid electricity","Diesel, HGV rigid","Steel sheet"],"region":"TUR"}' \
  | jq '.items[] | {line, best: .best.activity, score: .best.match_score}'

Edits, out-of-date results and conformance

Concurrent edits. GET /api/pcf/product/{id} returns etag (also sent as the ETag header). Send it back as If-Match on any write to the product — PUT /api/pcf/product/{id}, POST …/lines (including replace: true), PUT/DELETE /api/pcf/line/{line_id}, POST/PUT/DELETE …/params, POST …/lines/import (not on dry_run), POST …/lines/from-template, POST /api/pcf/ai-draft/accept (flat lines and process trees, including on_existing: "replace"), POST …/companions and POST …/eol-fossil-co2, POST …/publish (not when unpublishing) and DELETE /api/pcf/product/{id}: if someone saved the product after you read it, the write is refused with 409 {"error", "reason": "stale_write", "current_etag"} — reload, re-apply your change and send the new etag. The status is 409 rather than the generic 412 Precondition Failed on purpose: the body names the reason and carries the current etag, so branch on reason, not on the status code. Successful writes return the new etag (field and ETag header), and so does POST …/calculate; a calculation itself never changes the etag. Without If-Match nothing is checked (the last write wins). Changing a product's functional_unit while other products use it as a sub-assembly in a unit of another family is saved, and the response adds warnings: {parent_lines_incompatible: [{line_id, product_id, product_name, description, qty_unit}], message} (those lines would be excluded at the next calculation; ids are null for products you cannot open).

Out-of-date results. The product payload and the result carry stale: {is_stale, result_version, result_at, changed_lines, reason, changed}. is_stale is true when lines, parameters or product details changed after the latest calculation, or a sub-assembly it uses changed: a newer result, a first result (the line was excluded for lack of one), new details (functional unit, weight, name) or edited lines; changed says which (lines, companion_lines — well-to-tank / grid-loss lines that followed their main line and are not counted in lines — params, metadata, sub_assemblies: [{child_product_id, name, change, pinned_version, latest_version, fields?, text}] with change one of newer_result, now_has_result, result_removed, details, lines). A parameter that no line's formula uses is named in reason as “added / changed / removed (not used by any line)”. POST …/publish pins the latest calculation and its response carries the same stale block; when that calculation is out of date it also returns warning — recalculate and publish again to show the current inputs. A repeat calculation (below) uses the same inputs, so the two never disagree. The PDF and the PACT file keep the calculated version until you recalculate; a published version never changes.

Repeat calculations. When the lines, parameters and product details are the same as at the latest calculation, POST …/calculate opens no new version and answers 200 {"unchanged": true, "version": N, "unchanged_note", …the existing result}. To record a new version anyway (for example after a database update), send ?force=1 or {"force": true} (the response then carries "forced": true; an unchanged answer carries "forced": false). A forced version without a reason is stored with the reason “forced recalculation (inputs unchanged)” or “forced recalculation”, so it is visible in …/versions and diffs. force takes a JSON boolean; null counts as absent, and the strings and numbers "true"/"false", "yes"/"no", 1/0 are also accepted (the query string takes 1/0, true/false, yes/no). Anything else is refused with 400 {"reason": "invalid_request"}.

PACT v3 required fields. The product payload and the result carry pact_conformance: {required_fields_complete, missing, note, declarable, badge} — missing lists the PACT v3 fields that cannot be filled yet (for example companyName, or fossilCarbonContent when no fossil carbon content is declared). GET …/pact.json answers with the header X-Climly-PACT-Required-Fields: complete|missing, and the file carries extensions[0].data.conformance.requiredFieldsComplete. Changed on 2026-10-25: the earlier names conformant, pactConformant and X-Climly-PACT-Conformant were removed, not kept as aliases, because Climly checks field completeness and does not certify PACT conformance.

AI-drafted quantities. The result and the public view carry ai_accepted: {lines, share_pct} — lines whose quantity an AI drafted and nobody edited; the PDF marks them “AI-drafted, unreviewed” and the PACT comment says so. Each breakdown line carries qty_source ("ai", "user" or null), and the count follows it — not the match type: picking another factor for such a line keeps it counted, and a scenario copy keeps the origin. Once you change the quantity yourself (PUT with a different qty or qty_expr; re-sending the same value, or a unit conversion sent together with a new factor_uid, does not count), qty_source becomes "user" and the next calculation no longer counts the line (an AI-typed line also carries ai_qty_edited: true; its evidence-ladder multiplier is unchanged). Draft assumptions: adding an AI draft whose description left the material, mass or country to the AI needs "assumptions_confirmed": true in POST /api/pcf/ai-draft/accept, otherwise 400 {"reason": "assumptions_unconfirmed", "assumptions": [{key, label, value, status}]}; the result's assumptions and placeholder_lines show what was assumed and which quantities are still placeholders.

Audit trail and diffs. GET …/history?limit=50&offset=0 (limit 1–500, default 200) → {items, total, limit, offset, next_offset}, newest first; next_offset is null on the last page. Each entry has actor: {user_id, email_masked} and target (line, product, param, review, publish, reviewer_pack); product-level entries carry a one-line summary. Besides line add / edit / delete it records product-detail and parameter changes, review approvals, reviewer packs and links, publishing and withdrawal. GET …/diff?from=1&to=2 adds metadata_changes: {fields: [{field, from, to}], params: [{name, from, to}], complete} (product details frozen with each calculation), excluded_changes: {added, removed, reason_changed, count_from, count_to, complete} and completeness_change (declarable before → after).

Errors on line writes. A field the endpoint does not know is refused instead of ignored: 400 {"error": "unknown field(s): … accepted: …", "reason": "unknown_field", "line_index": i}. A quantity unit from a different family than the chosen factor's unit (kg against kWh, say) is refused when written: 400 {"error", "reason": "unit_family_mismatch", "line_index": i} — on POST …/lines, PUT /api/pcf/line/{line_id}, POST /api/pcf/ai-draft/accept (flat lines with line_index, process-tree nodes with node) and, row by row, in POST …/lines/import (a rejected / errors entry {row, error, reason: "unit_family_mismatch"}, also on dry_run). Other invalid lines answer "reason": "invalid_line" — among them a quantity above 1012 per functional unit (use a larger unit). If a quantity formula or parameter still makes the calculation overflow, POST …/calculate answers 400 {"reason": "quantity_too_large", "lines": [descriptions]} and saves nothing. On POST …/lines, line_index is the position of the offending line in the lines array you sent (0 = first); on PUT /api/pcf/line/{line_id} the error carries line_id instead. A malformed request (a missing or mistyped query or body field) answers 400 {"error": "Invalid request: query parameter 'from' is required", "reason": "invalid_request", "fields": [{in, name, problem}]}; a number too large to store (263 or more, e.g. ?offset=, ?rv=) also answers 400 {"reason": "invalid_request"}. Parameter writes (POST/PUT …/params) refuse unknown fields with 400 {"reason": "unknown_field"} like the line endpoints. DELETE /api/pcf/line/{line_id} answers 404 "Line not found" for a line you cannot access, as PUT does. The factor search (/api/pcf/match) adds divergence: {ratio, warning, n, sources, min, max, unit, text} to a candidate's explain (warning is true when sources for the same input differ by more than ×1.5). A candidate refused for a conflict the query names — a negation (“non-woven” against a woven record), another end-of-life route, air-freight haul class, or production route (EAF against BF-BOF steel) — carries a mismatch_note saying why. A same-named record in another unit family is shown blocked with unit_hint (for example m2 for powder coating) — change the line unit to use it. In an AI process tree, an input that is a process step is not opened into its chemistry: the node is cut off with reason process and a process_hint {uid, activity, unit, value, stage, same_unit_family, text} pointing to the process record to add as a manufacturing line. Candidates also carry own_data (your own private or supplier factor) and secondary_route (a scrap-based or recycled route offered for a generic name), and the region term of explain carries ladder_rank (0 the product's country · 1 global · 2 European average or neighbouring country · 3 another country); among equally good matches the lower rank is listed first. A candidate refused for another transport mode or distance band says so in mismatch_note (“different transport mode (air) than your line (rail)”).

Statements, allocation, module D and comparisons (engine pcf-2.0)

Engine version. Every result carries engine_version. Results calculated with an earlier engine stay exactly as they were (published and pinned versions never change); recalculating such a product adds one sentence to method_warnings: “engine changed <old> → <new>: …what changed”.

Publishing and the badge. POST …/publish needs {"confirm": true}; without it the answer is 400 {"reason": "confirm_required", "summary": {calculation_version, engine_version, declarable, stamp, stale, stale_reason, assumptions, assumptions_unconfirmed, ai_accepted, preview, badge, in_registry, conformance_statement}} so a client can show what will become public before confirming. A successful publish returns {public_version, calculation_version, badge, in_registry, summary, verify_path} (plus registry_note when the statement is not declarable, or is a free-plan preview, and therefore not listed). The older field listed now equals in_registry; public_page: true says the public page is open. When a published product (or the account) is deleted, its public address keeps answering the withdrawal notice and the PDF fingerprint check answers {"match": true, "status": "withdrawn"} for PDFs Climly issued. The public view GET /api/public/pcf/{public_id} carries badge: {text, kind, status}: kind is "self_declared" with text “SELF-DECLARED” only for a published, declarable version that is not a preview; otherwise kind is "none", text is null and note says it is not a declarable statement. status is "published", "preview" or "withdrawn". The view also carries conformance_statement (“Self-declared product carbon footprint, informed by ISO 14067 — not third-party verified, not an EPD (ISO 14025).”) and verification_url_label. A code that was never published answers 404 {"reason": "not_published"} — the latest calculation is never shown in its place. ?unpublish=1 withdraws every published version: the public view then answers 200 {"status": "withdrawn", "withdrawn_at", "version", "note"} — no figures, no company name, no personal data — and the statement leaves the registry. GET /api/registry lists published, declarable statements only; each item carries "declarable": true and "stamp": null. The PDF check GET /api/public/pcf/{public_id}/pdf/{sha256} adds status (published, preview — a free-plan preview frozen at publication, withdrawn, not_published) and a plain status_note.

Document ID and the document register (no sign-in). Every statement PDF Climly issues prints a document ID (16 characters, xxxx-xxxx-xxxx-xxxx) and a check address at the foot of each page; each issued PDF and PACT JSON is one entry in an append-only register in which every entry carries the hash of the entry before it. GET /api/public/document/{key} — key is the document ID, the 64-character content fingerprint (header X-Climly-Document-Fingerprint on the download) or the SHA-256 of the file exactly as received → {match, matched_by, file_confirmed, document, document_id, issued_at, calculation_version, preview_document, status, status_note, content_note, scope_note, log: {seq, entry_hash, intact}}; status is published, preview, withdrawn or not_published, and only a published statement adds statement: {product, public_version, url}. No figures, e-mail addresses or company names are returned; an unknown key answers {"match": false}, a malformed one 400. The same check with a page and an in-browser file hash: /document-check. GET /api/public/document-chain — the current head {entries, head: {seq, entry_hash, at}, schema, rule}. GET /api/public/document-chain/daily?limit=30 (1–400) — the head published once a day, newest first: {schema, days: [{day, head_seq, head_hash, entries, prev_record_hash, record_hash, recorded_at}], rule}; a daily record is never changed, and a missed day is not filled in later. A copy of a head kept outside Climly shows later whether the register was rewritten. The same daily heads are listed on /trust. Climly confirms that it issued a document and when; it does not check the figures in it.

Headline and the ISO 14067-style total. Results and the public view carry headline_rule — “Climly headline (0/0): fossil + LULUC; biogenic emissions and removals reported separately” — and iso14067_style_total, the headline plus biogenic emissions and removals, shown next to it. The headline figure is unchanged. iso14067_style_partial (bool) and iso14067_style_note say when that second figure is incomplete: material, packaging or end-of-life lines whose factors publish no fossil/biogenic split carry more than 5% of the headline (a sub-assembly line counts with its own unsplit share). The public view then also sets biogenic_split_partial with biogenic_split_note and returns a biogenic component of 0 as null (unknown, not zero); the PACT export leaves biogenicCarbonContent blank and its biogenicCO2Uptake understates the uptake in magnitude. In the PACT export, pcfExcludingBiogenicUptake = fossil + land-use change + biogenic emissions (combustion and the like), excluding only biogenic uptake; pcfIncludingBiogenicUptake = that value minus the uptake; biogenicCarbonContent and fossilCarbonContent come from what you declared.

Co-products and scrap. On the product, co_products: [{name, basis_qty, unit}] (up to 10) with allocation_basis "mass" (default; co-product quantities in kg, g or t per functional unit, and the product's own mass from weight_kg or a mass functional unit) or "economic" (declared only: every co-product value in one currency unit, each co-product's mass_kg per functional unit so the physical mass balance can be checked, allocation_product_qty = this product's own value, and allocation_note explaining why a physical basis is not used — all required). The engine applies the share product ÷ (product + co-products) and the result carries allocation: {share_pct, basis, description}; the PACT allocationRulesDescription is that description. A line with "line_type": "scrap_input" is a scrap or recycled input: burden-free (cut-off), declared — it needs no factor, enters with 0 kg CO2e and is not counted as a completeness gap; the result carries scrap_inputs: {lines, mass_kg, rule}, and the PDF, the public view and PACT declare it.

Module D. A line whose factor is an EN 15804 module D record carries "boundary": "module_d" and stays outside the headline, the biogenic figures, the band and the completeness check; the result carries module_d: {lines, kg_co2e, note}, shown as its own line on the PDF, the public view and in PACT. C1–C4 end-of-life records carry "boundary": "module_c" and stay in the end-of-life stage.

EN 15804 module labels (a label, not an EPD). GET …/result adds to every line of breakdown_json.lines en15804_module (A1–A5, B1–B7, C1–C4, D or null), module_basis (factor_record, companion, sub_assembly, stage_rule, user_declared or unassigned) and module_conflict, and to the result breakdown_json.en15804 {mapping_version, module_totals, declared_modules, not_declared, unassigned_lines, module_conflicts, epd_type_hint, headline_check, transport_legs_basis, note}. Order of the rules: the factor record's own module (module D → D; an end-of-life record naming C1–C4 → that module, with module_conflict: true outside the end-of-life stage) · a well-to-tank or grid-loss companion takes its main line's module · a sub-assembly line is A1 · otherwise the stage: material A1, packaging and manufacturing A3, transport with transport_leg inbound A2 / outbound A4, use B6 for electricity or energy and B1 otherwise, end-of-life scenario incineration / landfill / composting C4. A transport line without transport_leg and an end-of-life record without a C module stay null (unassigned) — nothing is guessed. module_totals splits each line's headline figure by module: the totals other than D add up to the headline (unassigned is a key of its own) and D stays outside it. The mapping is a candidate (en15804-map-0.1) until an LCA expert or an EPD programme operator confirms it; nothing about the figures changes, and the transport legs used are the ones saved when that version was calculated (setting or clearing a leg opens a new version on the next calculation, with the same figures).

AI-chosen factors. A line whose factor the AI chose keeps the AI evidence multiplier (×1.40) until you check the factor and send PUT /api/pcf/line/{line_id} {"reviewed": true} (recorded in the audit trail). Typing your own quantity labels the line “AI-matched factor, user quantity” and the multiplier stays; after review the label is “reviewed” and the multiplier no longer applies. ai_accepted.share_pct and the placeholder share now count well-to-tank / grid-loss companion lines and the AI or placeholder lines inside sub-assemblies; the PACT ipccCharacterizationShare is computed per factor record. Each result freezes the cut-off proxy it used (cutoff_proxy_uid), so a recalculation with the same lines uses the same proxy (a change is named in method_warnings). A sub-assembly's mass is read from the child's published result, otherwise its latest; the line note says which.

Comparisons. POST /api/pcf/compare samples both pinned results together (method: "paired_mc", n draws, fixed seed): a factor used by both products (same factor ID), and factors of the same source and category, take the same draw on both sides. The answer carries p_b_lower (share of draws where B is lower; p_a_lower the reverse), difference_band (the 95% band of B − A in kg CO2e per functional unit, described by difference_band_unit), difference_mean and shared_factors (factor groups drawn together), and verdict is “B is lower than A (95%)”, “A is lower than B (95%)” or “not shown to differ at 95%”. When a product contains an AI-drafted recipe nobody reviewed, the comparison still runs (200) and carries stamp: “Both products share the same unreviewed AI recipe; the comparison reflects your edits, not independent models.” (when only one side rests on an unreviewed AI recipe the stamp names it), plus ai_intermediates {a, b}.

Trial and single statement. POST /api/lead with service "premium" or "business" from a signed-in account with a verified e-mail address that has not had a trial starts a 7-day Premium trial at once and answers "trial": {"until", "days": 7}; an anonymous request, or one from an unverified address, answers "trial": null with a trial_note that says what to do. GET /api/me carries trial: {active, until, days_left, available, requires_verification, verification_path} (verification_path: "email", "google" or null when this site cannot verify an address yet). The service "single_statement" requests one statement without a subscription (reference price €490; we reply personally about the next step — no payment is taken on this site).

Boundary, end of life, study information, data quality and openLCA (engine pcf-2.1)

Engine version. Results calculated from 2026-10-16 carry engine_version: "pcf-2.1"; recalculating a product last calculated with pcf-2.0 adds “engine changed pcf-2.0 → pcf-2.1: …” to method_warnings. Results calculated from 2026-11-11 carry "pcf-2.1.1", a correction release of pcf-2.1 (blank rows, AI draft mass balance, Sm3 and invoice kWh natural gas, PACT declared unit — methodology §9, corrections from the November 2026 blind review); a version label can have three parts. Results calculated with "pcf-2.2" convert lines whose factor publishes a gas split to IPCC AR6 GWP100 and carry gwp_basis (class shares of the headline, unconverted share, gate_enabled — methodology §9, single GWP set); threshold_pct and exceeds_threshold appear in the public API, the PACT extension (gwpBasis) and the CSV only while gate_enabled is true. The public API and the PACT extension also carry ar6_consistent: false when the unconverted share is above 20%, with a mismatch_note that the PDF and the public page print too (the switch stays off: the note does not change the figure or whether it can be declared). Published and pinned results never change.

eol_scenario

Declared boundary and end-of-life scenario. PUT /api/pcf/product/{id} takes declared_boundary: "cradle_to_gate" (default) or "cradle_to_grave". A cradle-to-grave product sends eol_scenario: {"approach": "cut_off", "routes": [{"route": "incineration"|"landfill"|"recycling"|"reuse"|"composting", "share_pct": n}], "region": "TUR", "note": "…"}: shares add up to 100 (±0.5), each route at most once, region a three-letter ISO code (a two-letter code is converted), note up to 300 characters (kept with the result and the reviewer pack, never in the public view or the PACT file you share). Anything else answers 400 with an error sentence and the offending field. The product detail returns the stored declared_boundary and eol_scenario. Results carry declared_boundary, boundary_text (for example “Cradle-to-grave, EoL cut-off: 60% incineration / 40% landfill (TUR)” — the same line is printed on the PDF, the public view and in PACT) and eol: {approach, routes, region, kg_co2e, lines: [{description, route, share_pct, kg_co2e, factor_uid}]}. Recycling and reuse lines are burden-free (cut-off): declared, 0 kg CO2e, no credit. kg_co2e is in the headline for cradle-to-grave and not for cradle-to-gate. Results calculated before pcf-2.1 answer declared_boundary: null and boundary_text: null — no boundary is claimed for them after the fact. When the product declares cradle-to-grave but the result was calculated without the scenario, boundary_consistent is false, boundary_text says “Cradle-to-gate (…)” and eol carries applied: false with kg_co2e: null. The public view carries the same fields without eol.note; there eol.lines is the number of generated lines (line names stay confidential), and study_completeness is {filled, total} with study_information_text (“Study information: n/13 fields declared”). The sector templates (GET /api/pcf/templates/{template}) may carry an eol_scenario example with routes and share_pct: null — structure only. A cradle-to-gate result whose headline also holds use-phase or end-of-life lines entered by hand says so in boundary_text (“Cradle-to-gate declared — the headline also includes … lines entered by hand (n% of the headline)”) and carries boundary_hand_entered: {stages, lines, kg_co2e, use_co2e, eol_co2e, share_pct}; PACT adds a note. A sub-assembly that declares cradle-to-grave enters a parent without its end of life (the parent's own boundary decides). A cradle-to-grave parent also leaves out every end-of-life line of its sub-assemblies, whether a scenario or lines entered by hand, and warns “SUB-ASSEMBLY END OF LIFE”: the parent's scenario treats the whole product mass once. POST /api/pcf/compare answers 400 with reason: "boundary_mismatch" when the two results declare different boundaries; with the same declared boundary but different hand-entered use-phase or end-of-life shares it answers 200 with a verdict_note (“… cover different stages …”). POST /api/pcf/products stores fossil_carbon_content_kg (with its required fossil_carbon_content_basis) and the co-product fields under the same rules as PUT. fossil_carbon_content_kg above the product mass per declared unit answers 400 (field fossil_carbon_content_kg); so does a PUT that lowers weight_kg or changes functional_unit below a stored fossil carbon content (field weight_kg or functional_unit). A cradle-to-grave result is not declarable when the declared fossil carbon is 0 while plastics or synthetic fibre are incinerated, or when it exceeds the end-of-life mass; a declared value above 0 is always used for the incineration share, and the result says so when the line text names no fossil material.

curl -s -H "X-API-Key: $KEY" -H "Content-Type: application/json" -X PUT "$B/api/pcf/product/$PID" \
  -d '{"declared_boundary":"cradle_to_grave","eol_scenario":{"approach":"cut_off","routes":[
        {"route":"incineration","share_pct":60},{"route":"landfill","share_pct":40}],"region":"TUR"}}' \
  | jq '{declared_boundary, eol_scenario}'

study

Study information. PUT /api/pcf/product/{id} takes study: {goal, intended_audience, functional_unit_rationale, reference_flow, system_boundary_text, cutoff_criteria, allocation_text, time_representativeness, geo_representativeness, tech_representativeness, data_quality_statement, limitations, comparative_assertion} — free text (an empty string means not declared) and comparative_assertion true, false or null (not stated; it counts as declared only as true or false). The fields you send replace the stored ones and the others are kept; null or an empty string clears a field and study: null clears them all. Plain text only (HTML tags such as <b> answer 400; comparisons such as < 1% or a<b are fine), at most 30 line breaks per field (400 “too many line breaks”); invisible formatting characters are removed and a field with no visible letter or digit does not count as declared. At most 300 characters for the audience and the reference flow, 500 for the three representativeness fields, 2000 for the system boundary, data quality and limitations, 1000 for the rest. A PUT that stores a scenario it will not apply (cradle-to-gate) or a comparative assertion answers 200 with field_warnings. Results carry study_completeness: {filled, total: 13, missing: [field names]}; the public view and the PDF print “Study information: n/13 fields declared”, and the PDF prints the fields on its second page. A placeholder (“x”, “n/a”, “tbd”, fewer than three letters or digits) is saved but counts as not declared (field_warnings; results list it in study_completeness.placeholder, short declared text in minimal). Publishing needs the nine required fields (publishing gate above). With comparative_assertion: true the result carries a warning that a comparative assertion disclosed to the public requires a third-party critical review by a panel of interested parties (ISO 14067:2018; ISO 14044:2006, clause 6.3) — in study_warnings, which the public view carries too.

dqr

Data quality rating. Results carry dqr: {ter, ger, tir, p, score, basis}: technology, geography and time from 1 (best) to 4 (poorest), precision from 1 to 5, the weighted overall score and basis, the reasons in plain words. Technology follows the match: exact process or sector record 1, route-specific derived factor 2, class proxy 3, generic or foreign record 4 (method).

On the public view. GET /api/public/pcf/{public_id} adds to dqr the rating value (1 = excellent … 5 = poor), its PEF-style class (excellent, very good, good, fair, poor) with class_scale, class_sentence and note — the same reading the result screen, the explain endpoint and the PDF show, taken from the pinned version (older results carry class and value from the approximate mapping). It also carries band_narrowing: {actions: [{type, text, impact_pct, impact_basis}], summary, note}: the top actions that would narrow the 95% band (supplier_data, cutoff, region) without line names — the PDF statement names the line behind each action.

openLCA JSON-LD. GET /api/pcf/product/{id}/export/openlca.zip answers a zip in the openLCA 2 JSON-LD layout for the latest pinned calculation (end-of-life scenario lines included for cradle-to-grave): processes/<uuid>.json (@type: "Process", name, description, processType, location, exchanges — each with a flow reference, isInput, amount, unit, flowProperty and a description naming the Climly factor ID, source and licence), flows/ (product and elementary flows), flow_properties/, unit_groups/, locations/, categories/, lcia_categories/, lcia_methods/ and product_systems/, plus olca-schema.json and a README. The product is a unit process whose reference output is the functional unit; each factor record or pinned sub-assembly result is an LCI-result process linked as the default provider of its input. product_systems/ holds one ready product system: its reference process is the product's unit process, and each input is linked to its provider (processLinks), so in openLCA you open it and Calculate with "Climly PCF (climate change only)" — no "Create product system" step. A multi-level bill of materials is exported one level at a time: a sub-assembly is one LCI-result process (its pinned result per functional unit), not its own unit processes; export the sub-assembly to see its lines. Identifiers are name-based UUIDs (UUID v5 in a Climly namespace), so exporting the same product again updates the same datasets; the zip is byte-identical for the same calculation. Before the first calculation the endpoint answers 400. On the free plan the archive carries the structure and the amounts but no factor values and no result; the amount of a greenhouse-gas flow (such as the end-of-life stack CO2 line, which is itself an emission) is written as 1.0 with a note (X-Climly-Preview: 1, file name climly-openlca-PREVIEW-<public_id>.zip). Both plans carry the one-category impact method and the greenhouse-gas elementary flow (the Climly headline component); Premium adds the factor value on each background process (the elementary exchange) and the result in the description, so openLCA recomputes the headline. Premium also writes, on each climate-change exchange, a LOG_NORMAL_DISTRIBUTION uncertainty (geomMean = amount, geomSd from the effective Climly line uncertainty) and a dqEntry ("(TeR;GeR;TiR;P)") on every input and climate-change exchange, with the dq_systems/ file “Climly DQR (TeR / GeR / TiR / P)”; absent where the pinned line has none (method 9.18). A record whose republication permission is pending carries no value. Too many exports of one product in an hour answer 429 (method).

Other surfaces. GET /api/pcf/product/{id}/study returns the stored study fields with study_completeness, study_warnings, the declared boundary, the scenario and the field list with length limits (read access is enough). GET /api/pcf/product/{id}/study/draft drafts the twelve text fields from the latest calculation and saves nothing; each drafted text starts with [Draft - check and edit], and a field that still starts with that marker counts as not declared (completeness and the publishing check) until you remove it. Add ?version=N to draft from calculation vN. PUT /api/pcf/product/{id}/study/draft-basis {"basis": {field: version | null}} records which calculation a drafted field came from; GET …/study then lists out_of_date fields (drafted from an older calculation whose draft for that field reads differently now). A direct_emission line takes qty_basis (per_unit | per_year): the quantity is always kg of gas per functional unit; for a yearly release send qty_expr “annual kg/annual output”. GET /api/pcf/templates items say how many published typical ranges a template shows (typical_ranges, never entered as quantities) and carry its double_counting_note. The PACT export carries the boundary line at the start of boundaryProcessesDescription, its dqi from dqr, and declaredBoundary, boundaryText, eol, studyCompleteness and dqr in the Climly extension; for a cradle-to-grave result its notes say that the figures include end of life. Both CSVs add # summary rows for the declared boundary, the end-of-life scenario, the study count and the data quality rating (the six import columns are unchanged), and the reviewer pack adds study.json.

What is outside the total, and the data quality name

Completeness banner. The answer of POST …/calculate starts with completeness_banner, and GET …/result carries the same object first: {unmatched_lines, excluded_mass_pct, declarable, nested_cutoffs, text, cutoffs_on_product, mass_share_unknown, excluded_share_pct, threshold_pct, stamp, score_warning, reason_codes, basis}. unmatched_lines is the number of lines on this product without an emission factor (the same number as the top-level unmatched_lines); excluded_mass_pct is the share of the declared input mass on lines and sub-assembly inputs without a factor, from the completeness check's own per-item shares (energy inputs and cut-offs whose share is not stated are counted in mass_share_unknown instead); declarable is false when the result is screening-level. nested_cutoffs lists the cut-offs inside sub-assemblies (AI-drafted intermediates or your components) with via, the path of sub-assembly names — they are excluded from this product's total too, so they are listed here, at the top, not only inside the sub-assembly. text is the same reading in one line, for example “5 input(s) without an emission factor (4 on this product, 1 inside sub-assemblies) · 93.8% of the declared input mass is outside the total · NOT DECLARABLE (screening-level)”. The banner only reads the pinned result; it changes no figure. excluded_share_pct is the figure the PACT export carries as exemptedEmissionsPercent (known gap ÷ headline + gap, with the mass-share fallback); above threshold_pct (5%) the result is not declarable.

Cut-off reason codes. Each cut-off in the banner, and each item in the cutoffs list of POST /api/pcf/ai-draft/accept, carries reason and reason_text; reason_codes in the banner repeats the sentences for the codes that occur. A code describes why the AI draft could not give the input a factor — not how important the input is:

data_quality_pct (renamed from accuracy_pct). The calculate, result and explain answers, the product list (GET /api/pcf/products), the demo answer (POST /api/pcf/demo), the public statement (GET /api/public/pcf/{public_id}) and the public registry (GET /api/registry) carry the precision score as data_quality_pct. The CSV export adds a data_quality_pct cell after accuracy_pct in its headline summary row, and the PACT exports add dataQualityPct next to accuracyScore (extensions[0].data.legacyDqi; with ?spec=2, extensions.factorbench). It is the same number as before — only the name changed, because the score measures precision (how tight the 95% band is), not accuracy. Deprecation: accuracy_pct (and accuracyScore in PACT) stays in the same answers and files as an alias for 90 days, until at least 2027-01-18; deprecated_fields in the calculate, result, product list and public statement answers says so. Read data_quality_pct in new integrations. quality_tier_text is one sentence that puts the score and its class (quality_tier) next to the PEF data quality rating and its class (dqr), and says what each measures, so the two never read as a contradiction (for example “fair” next to “good”); GET …/explain carries the same sentence as dqr.class_sentence and as quality_tier_text. When the excluded share is above the 5% threshold, the banner's score_warning and an explain warning with code: "score_not_completeness" say “High score is not completeness: …” — the score describes only the lines inside the total (method log).

Sensitivity: quantities and method choices (view only)

GET /api/pcf/product/{id}/sensitivity — read access to the product is enough. Both views read the latest calculation and write nothing: the result, its version list and the product stay exactly as they are, and no version is opened. The figures are a what-if view, not a declared result.

status is calculated (headline_delta_pct = 100 × delta_co2e ÷ total_co2e, rounded to 0.01; alternative_total = total_co2e + delta_co2e), not_applicable (the product has no such choice: no grid electricity line, no end-of-life scenario with an incineration or landfill route, no co-products) or not_available (the choice exists but the open database or the declaration lacks what the alternative needs); the last two carry headline_delta_pct: null and a note. A product without a calculation answers 200 {mode: "not_calculated", items: []}; any other mode answers 400 with reason: "invalid_mode".

Contributions, status and side-by-side comparison (read-only)

Three GET endpoints that lay out a result you already have. They read the frozen line results of a calculated version and recalculate nothing, write nothing and open no version. Authenticate as in Authentication (session or API key). Access: read access to the product is enough (owner, or a team seat that can read it); a product you cannot read answers 404, no session 401. A product without a calculated result answers 404 {"error": "No calculated result — calculate the product first"}. Names of sub-assemblies you no longer have access to are masked in all three responses, as in /result.

GET /api/pcf/product/{id}/hotspots?version=N — the lines inside the headline sorted by kg CO2e, each with its share and the cumulative share, and the same split by life-cycle stage (latest version unless ?version is given). The row sum equals the headline (reconciles: true, up to rounding).

{
  "product_id": 12, "version": 3, "total_co2e": 4.82, "lines_sum_co2e": 4.82, "reconciles": true,
  "n_lines": 2, "top80_n": 1,
  "rows": [
    {"rank": 1, "line_id": 41, "description": "Steel sheet", "stage": "material", "stage_label": "Raw materials",
     "qty": 1.2, "qty_unit": "kg", "factor_uid": "…", "factor_activity": "…", "co2e": 3.9, "share_pct": 80.9, "cum_pct": 80.9},
    {"rank": 2, "line_id": 42, "description": "Grid electricity", "stage": "manufacturing", "co2e": 0.92,
     "share_pct": 19.1, "cum_pct": 100.0}
  ],
  "stages": [{"stage": "material", "label": "Raw materials", "co2e": 3.9, "share_pct": 80.9}, …],
  "basis": "…"
}

GET /api/pcf/product/{id}/status?version=N — what is left before the result can be declared, grouped by importance: blocker (needed to declare) → improve (worth fixing) → info (good to know), with one fix_next step. declarable is the completeness check's own decision, unchanged (true, false, or null when not assessed); this endpoint only orders and words it.

{
  "product_id": 12, "version": 3, "declarable": false,
  "headline": "Screening result — 1 step before you can declare it",
  "counts": {"blocker": 1, "improve": 1, "info": 0},
  "fix_next": {"severity": "blocker", "code": "…", "title": "…", "why": "…", "action": "lines", "line_id": 41},
  "groups": [{"severity": "blocker", "title": "…", "items": [{"severity": "blocker", "code": "…", "title": "…", "why": "…",
              "action": "lines", "line_id": 41}]}, …],
  "technical": {"banner_text": "…", "reasons": […], "excluded_share_pct": 7.4}
}

GET /api/pcf/scenarios/compare?ids=12,34 or ?ids=12,12@3,40 — 2 or 3 calculated results side by side (product id, optionally @version; without a version the latest result). Totals, the split by life-cycle stage and the lines that differ, each with the difference against the first column (absolute and %). Read access to every listed product is required: if you cannot read one of them the answer is that product's 404. Errors: 400 for fewer than 2 or more than 3 ids, a malformed id, or the same result twice; 409 when a listed product has no calculated result. same_functional_unit says whether the columns share a functional unit. This is a layout of frozen numbers; for a statistical verdict on two results use POST /api/pcf/compare.

curl -H "Authorization: Bearer $KEY" "$B/api/pcf/scenarios/compare?ids=12,12@3"
{
  "columns": [{"id": 12, "name": "Chair", "version": 4, "total_co2e": 4.82, "band": [4.1, 5.6], "declarable": true,
               "scenario_of": null, "functional_unit": "1 piece"}, {"id": 12, "version": 3, "total_co2e": 5.10, …}],
  "totals": {"values": [4.82, 5.10], "delta": [0.0, 0.28], "delta_pct": [0.0, 5.81]},
  "stages": [{"stage": "material", "label": "Raw materials", "values": [3.9, 4.1], "delta": [0.0, 0.2], "delta_pct": [0.0, 5.13]}, …],
  "lines": [{"description": "Steel sheet", "stage": "material", "status": "changed", "values": [3.9, 4.1], "delta": [0.0, 0.2],
             "delta_pct": [0.0, 5.13], "qty": ["1.2 kg", "1.2 kg"], "factor": ["…", "…"]}],
  "unchanged_lines": 5, "same_functional_unit": true, "basis": "…"
}

Verifier seats (read-only)

A product owner can give an outside verifier a read-only seat on one product. The verifier sees the calculation results, the audit trail, the published (pinned) versions and the reviewer pack, and cannot change anything. Seats are part of a pilot until 2027-04-16; seats opened during the pilot keep working after that date.

POST /api/pcf/product/{id}/reviewer-seat {"email": "..."} — owner only, signed-in browser session (an API key alone is not accepted) → {seat_id, status: "invited", email_masked, pilot}; when e-mail delivery is not active the answer also carries a one-time accept_url for you to pass on. The invitation works once, for that address only, for 30 days; at most 5 active seats per product (409 seat_limit), one per address (409 seat_exists); while e-mail delivery is active, invitations are sent only from an account with a verified address (403 email_unverified) · GET /api/pcf/product/{id}/reviewer-seats — the product's seats · DELETE /api/pcf/product/{id}/reviewer-seat/{seat_id} — revoke (access ends at once; the seat's verification statements are withdrawn, statements_withdrawn). The owner and members of the owner's organisation cannot hold a seat (409 self_verification).

POST /api/pcf/reviews/accept {"token": "..."} — the verifier accepts while signed in with the invited address (an account with a verified address is matched on sign-in) · GET /api/pcf/reviews — products shared with you · GET /api/pcf/reviews/{seat_id} · /history · /reviewer-pack.zip?v=N | ?rv=K — read-only views; a verifier seat has no write access: every product endpoint that changes data refuses it.

POST /api/pcf/reviews/{seat_id}/comments {text, line_id?, version?, checklist_item?} — the one thing a verifier can write: a finding on the product, stored on its own (1–2000 characters; version defaults to the latest calculation; line_id must be a line of that calculation or a current line; checklist_item is C01…C20; unknown fields → 400; 60 per hour). The product, its lines and its results do not change; the audit trail records that a comment was added (not its text) · GET /api/pcf/reviews/{seat_id}/comments — the verifier's view · GET /api/pcf/product/{id}/review-comments — the owner's view (and organisation members who can read the product) → {items: [{id, seat_id, author, line_id, version, checklist_item, text, created_at}], total} · GET /api/pcf/review-checklist — the 20-item ISO 14067 / ISO/TS 14071 review checklist ({version, groups, items: [{id, group, heading, item, evidence}], note}), the same list as checklist.md in the reviewer pack. It is an aid for the reviewer; Climly does not review or approve the result.

CBAM reconciliation

A PCF product can carry an optional 8-digit CN code: PUT /api/pcf/product/{id} with {"cn_code": "7208 39 00"} (spaces and dots allowed, stored as 8 digits; only CBAM goods are accepted, otherwise 400; null clears it). The CN code is a label: it does not enter the calculation, the ETag or the out-of-date check.

GET /api/pcf/product/{id}/cbam-reconcile?rv=K&period_id=P — owner only. The PCF headline of one calculation (cradle-to-gate, fossil, land-use change and stage totals; per tonne only when the declared unit is a mass) next to the specific embedded emissions (direct, indirect, chargeable) of your own CBAM installation periods for the same CN code, with reconciliation notes. Read-only and one-way: nothing is computed or written, and no difference or ratio is given, because the boundaries differ — CBAM covers direct emissions and indirect emissions from electricity, while the PCF also counts upstream materials, transport and other stages. The PCF block repeats the calculation's boundary_text: when a cradle-to-gate product also has use-phase or end-of-life lines entered by hand, the headline includes them, and boundary_hand_entered gives their share of the headline. Without a CN code the answer is 400 no_cn_code.

Use my CBAM installation data on a PCF line

GET /api/pcf/line/{id}/cbam-installation — the line's current choice and your calculated CBAM periods with the SEE of each good (factor_value = SEE direct + SEE indirect, t CO2e per t = kg CO2e per kg).

PUT /api/pcf/line/{id}/cbam-installation — JSON {"period_id": P, "cbam_product_id": G, "evidence_note": "Monitoring plan v2 + verifier report 2026-03", "boundary_acknowledged": true} (optional "see_version" for an earlier SEE calculation, "cn_code" instead of cbam_product_id, "source": "cbam_period"). One-way: the line's source becomes cbam_period:P and its factor the good's SEE direct + SEE indirect, pinned as a private factor (match type own_cbam); the CBAM period is not changed. The line's quantity must be a mass (409 not_mass_line); the period must have an SEE calculation (409 see_not_calculated); evidence_note (10-300 characters) and boundary_acknowledged: true are required (400). Product owner and owner of the CBAM period only: another account's period or line answers 404; without the CBAM exporter suite 402. Recalculate to apply it: the line then carries cbam_installation (source, SEE snapshot and its SHA-256, boundary note, expected_but_missing), the result carries breakdown.cbam_bridge, and the completeness check lists the stages outside the CBAM boundary as expected but missing (CBAM boundary) items (declared cut-offs, not quantified, never added). cbam-reconcile shows the same block under pcf.cbam_bridge. Supports If-Match like the other line edits. DELETE /api/pcf/line/{id}/cbam-installation returns the line to its previous factor.

CBAM installations, periods and evidence (exporter suite)

These endpoints need the CBAM exporter suite (plan or the 30-day invitation trial; otherwise 402) and act only on your own installations: another account's installation, period or evidence file answers 404, without a session 401.

GET /api/cbam/installations — every installation of yours with its periods, newest year first; each period carries latest_version (its latest SEE calculation, or null) and its product count.

POST /api/cbam/installation/{id}/periods — {"year": 2027, "copy_from": <period id>?} opens a new reporting period (2023 to next year + 1; one per year, else 409 period_exists). copy_from (a period of the same installation) copies its products and inputs as a starting point; results, evidence references and shared packs are not copied. → 201 {period_id, year, copied}.

PUT /api/cbam/installation/{id} — {"name"?, "country"?, "city"?, "unlocode"?, "contact"?} (JSON only). Only the fields sent change; an empty string clears city, UN/LOCODE or contact. country is ISO3, unlocode 2 letters + 3 characters (stored as "TR IST"). The next SEE calculation pins the new data; earlier versions keep what they were calculated with.

POST /api/cbam/period/{id}/evidence · POST /api/cbam/installation/{id}/evidence?kind=&filename=&note= — raw body: PDF, PNG, JPG, XLSX (no macros) or CSV with the matching Content-Type, at most 10 MB, the content must match the type (415 otherwise, 413 when too large). kind: monitoring_plan · invoice · meter_reading · production_record · supplier_see · contract · verification_report · other. → 201 {evidence: {id, level, kind, name, type, size, sha256, reference, download}}. At most 60 files per period and 200 MB per installation. Files are stored outside the public site, visible only to the installation owner, and deleted with the period, the installation or the account (DELETE /api/cbam/period/{id}, DELETE /api/cbam/installation/{id}, DELETE /api/me). Put the file's reference in an input's evidence field to close the missing-evidence warning at the next calculation; evidence never changes a figure.

GET /api/cbam/period/{id}/evidence (this period + installation level) · GET /api/cbam/installation/{id}/evidence (all) · GET /api/cbam/evidence/{id} (download, attachment) · DELETE /api/cbam/evidence/{id}.

POST /api/cbam/period/{id}/inputs — each input may carry cn_code and origin (ISO3). A precursor with see_source: "default_value" and no see_value is filled with the official default value of its CN code: the Annex I table value (IR (EU) 2025/2621 as corrected by IR (EU) 2026/1740), direct-emissions column, without the declarant's year mark-up, for the origin (default: the installation's country) or else the Commission's "Other Countries" row; the record's ID is kept in ef_uid and pinned with the calculation. The answer lists them in default_values_filled. Without a CN code 400 default_value_needs_cn; no default value found 400 default_value_not_found. A value you type is kept as it is. GET /api/cbam/precursor-dv?cn=7202 11&origin=TUR previews the same value.

Account deletion and sessions

DELETE /api/me needs a signed-in browser session and a JSON body that confirms the deletion: {"password": "..."}, or for an account opened with Google that never set a password {"confirm_email": "your address"}; add "totp" when two-factor authentication is on. A missing confirmation (also a request with no body) answers 400 reauth_required (with method and mfa_required), a wrong one 403 reauth_failed; repeated wrong confirmations share the password-change limit and lead to 429. An account opened with Google that sets a password later (password reset) confirms with the password from then on. GET /api/me tells you which confirmation applies in delete_reauth. A browser session ends after 7 days without activity and at the latest 30 days after sign-in; API keys are not affected. POST /api/me/sessions/revoke (session only, JSON body {}) signs out every other browser and device at once; the calling browser receives a fresh session cookie and stays signed in, and the API key keeps working.

Your API key. GET /api/me never carries the full key: it gives api_key_masked (for example fb_…a1b2) and api_key_last4. To read the full key, send POST /api/me/api-key/reveal from a signed-in browser session with the same confirmation as account deletion ({"password": "..."} or {"confirm_email": "..."}, plus "totp" when two-factor authentication is on) → 200 {"api_key": "fb_…", "api_key_last4": "…"} with Cache-Control: no-store. The same 400 reauth_required, 403 reauth_failed and 429 answers apply; an API key alone answers 403 {"session_required": true}. POST /api/me/api-key (session only) replaces the key and returns the new one once. Scripts that already hold a key keep sending it as X-API-Key; nothing changes for them.

Password reset

POST /api/reset/request {"email": "…"} — always answers 200 {"ok": true, …} whether or not the address has an account (so a caller can't use it to check who is registered). When it exists, a 30-minute link (/account?reset_token=…) is e-mailed. On a server with no outgoing mail configured — including this test deployment — the answer instead carries "delivered": false and a plain-language "message" telling the caller to use the Account page (while still signed in) or the contact form instead; a configured server answers "delivered": true. POST /api/reset/confirm {"token": "…", "password": "…"} — 400 {"reason": "weak_password"} (same rule as registration, below) or 400 "Invalid or expired reset link"; on success every existing session is signed out and the API key is replaced, so a reset doubles as "I think my account was compromised".

Password rule (registration and reset both): 10–1024 characters, at least three distinct characters, not on the common-password list (checked with leading/trailing digits and symbols stripped, so "2026!sunshine" is still caught), and must not contain the account's own e-mail address or its local part → 400 {"reason": "weak_password", "error": "…"} naming which rule failed. Over the rate limit (above) the answer is the generic 429 with no further detail.

AI assistants — MCP server

A read-only MCP server (search_factors · get_factor · calculate · cbam_default_value, private factors never exposed) is planned; we do not give a date. Today, any MCP-capable or tool-using assistant can already call the plain REST API above directly — no server to install.

Spreadsheets instead? See Excel & Sheets.

Rate limits

(PCF Studio's own limits — AI drafting, bulk mapping, reviewer packs, register/login/reset — are under Rate limits — PCF Studio and account endpoints above.)

/api/factors search/list: 300 requests per minute per IP address without an account, 600 per minute per account with a session or X-API-Key. The calculation endpoints /api/calc, /api/calc/estimate and /api/calc/batch share one counter with the same limits (each batch item counts as one request). These endpoints answer every request — 200, 400 or 429 — with X-RateLimit-Limit (requests per window), X-RateLimit-Remaining (left after this one) and X-RateLimit-Reset (seconds until the oldest counted request leaves the 60-second sliding window, i.e. when Remaining next goes up; not a timestamp). /api/value and /api/spread are unmetered. /api/export.csv, /api/map/bulk and /api/cbam/lookup are capped at 60 requests / 5 minutes per IP address. Without an account, /api/factor/<uid> (single-factor detail) is capped at 25 requests / day per IP address, and each successful POST /api/calc/estimate (it returns the factor's full details) counts toward the same daily cap (401 {"reason": "login_required"} beyond it) — a free account or API key removes that cap. Over any limit you get 429 with {"error": "…"} and a Retry-After header (seconds); back off and retry after that.

Record status

Every row of /api/factors and /api/factor/{uid} carries status_label: valid (status verified or derived: current records), expired (an EPD whose validity date has passed; the figure stays visible), superseded (a newer edition replaces it), withdrawn (licence or permission ended; the figure is not returned) or deprecated (retired without a successor). Filter with status=current (or valid): valid records only, the same set as /api/stats active and the Explorer headline; status=expired, status=superseded, status=withdrawn; status=deprecated = superseded + withdrawn + retired. Without status every record except withdrawn ones is listed, as before. A new or changed bill-of-materials line accepts only valid records (verified, or a Climly-derived recipe); lines that already cite an older record keep it, with a re-match warning.

Filters: unknown values

/api/factors and /api/export.csv filter on source, region (ISO3 or ISO2), category (exact, case-sensitive), gas, scope, status and year. A filter value that no public factor carries — a typo, a lower-case category, an unknown source — keeps the earlier behaviour by default: 200 with an empty list, and the value is named in an X-Climly-Warning header (and, on /api/factors, in a warnings list in the body), so existing Excel Power Query and Apps Script refreshes keep working. Add strict=1 to get 400 {"reason": "unknown_filter_value", "fields": [{"name", "value", "problem", "accepted" | "accepted_examples" | "did_you_mean" | "note"}]} instead, so a mistake is never read as "no factors". A known value that simply has no match in combination with your other filters (or a year with no data) answers 200 with total: 0 and no warning. Parameters that are ignored — an unknown parameter name, an unknown sort, order or use, a year that is not a whole number — also keep working but are named in the warning header; with strict=1 they answer 400 {"reason": "unknown_parameter"}. The API key belongs in the X-API-Key header: ?api_key= is an unknown parameter.

curl -s "__BASE__/api/factors?category=electricity&limit=1&strict=1"
→ 400 {"error": "Unknown filter value: category='electricity'. …", "reason": "unknown_filter_value",
       "fields": [{"in": "query", "name": "category", "value": "electricity", "problem": "no public factor has this value",
                   "did_you_mean": ["Electricity"], "note": "category is an exact, case-sensitive match"}]}
curl -si "__BASE__/api/factors?category=electricity&limit=1"
→ 200 {"total": 0, …, "warnings": ["category 'electricity' matches no public factor - empty result (add strict=1 …)"]}
   X-Climly-Warning: category 'electricity' matches no public factor - empty result (add strict=1 to get a 400 …)

Rules of the road

Every record carries its own licence + attribution string — cite Climly and the publisher. Factor IDs are permanent: pin the EF-… ID, not the value. Deprecated factors stay resolvable with a superseded_by pointer. Bulk redistribution of paid databases is not possible here — we don't host any. Records withdrawn on licence grounds (since 2026-10-25: exiobase2022 and pe_ecoprofile) are status=deprecated with a "WITHDRAWN" note and "withdrawn": true on /api/factor/{id}; they are left out of /api/factors and /api/export.csv unless you pass status=deprecated, still resolve by ID for citation, and must not be redistributed or used in a new calculation. For these withdrawn records, /api/factor/{id} and /f/{id} show only the identity, source name, withdrawal date and reason — the figure itself (value, uncertainty and any derived figures) is not returned.

Request a quote