Scenario modelling is enabled per organization. When it is off, every route on this page answers
403
SCENARIO_MODELLING_DISABLED. Ask your Dcycle contact to enable it.How it works
- Create a scenario from a saved LCA. It is an LCA of its own: its
scenario_idis also anlca_id, so its blocks are read with the usual LCA routes. - Add a design change. It becomes the active one: every edit you write from then on is logged under it.
- Edit the scenario with the regular LCA write routes (listed below), on the
scenario’s id. A scenario only changes values: adding or removing blocks or rows answers
409SCENARIO_EDIT_NOT_SUPPORTED. Replacing one row’s material by another (a swap) is allowed. - Compare.
POST .../scenario/comparisonrecalculates both LCAs when needed and answers each impact category’s baseline and scenario totals, what each design change contributes, and theother_effectsno design change explains. The contributions andother_effectsadd up to the difference. - Keep or discard it. Saving a scenario turns it into an LCA of the portfolio, linked to its baseline. Discarding deletes a draft.
x-api-key and x-organization-id.
Endpoints
Edits a scenario accepts
These writes, sent to a scenario, are logged as edits of the active design change. Pass?design_change_id={change_id} to log one under another design change without activating it.
A material block save sends the block’s full row list, as
GET /lca/{lca_id}/block_materials/{block_id} returns
it. Send each row back with its id (the relation id) and change only the values you mean to change. To swap a
material, replace that row by the new resource with the same quantity and unit_id and no id:
Example
Comparison response
array
Per impact category:
baseline and scenario are each LCA’s total over every stage (the canvas Total Impact).object
Impact category → what the design change adds to the scenario over the baseline. A material counts for the design
change that edited it last; the rest of a block counts for its last block-level edit.
object
Impact category → the part of the difference no design change explains (for example an emission factor updated
since the copy). The contributions and the other effects add up to
scenario - baseline.string
On the
GET: edits when the scenario changed since this comparison, baseline_changed when only the baseline
did, null while it is current.Errors
Related
- MCP: scenario modelling: the same workflow from an AI assistant
- CLI: scenarios: the same workflow from the terminal with
dcy lca scenario - Delete LCA: deletes a saved scenario