Skip to main content
← LCA API A scenario answers “what would this design change do to my product’s impact?”. It is a draft copy of a baseline LCA. You group your edits in named design changes (for example “Recycled PET” or “Local sourcing”), calculate the difference with the baseline, and get it split per design change. The baseline is never modified.
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

  1. Create a scenario from a saved LCA. It is an LCA of its own: its scenario_id is also an lca_id, so its blocks are read with the usual LCA routes.
  2. Add a design change. It becomes the active one: every edit you write from then on is logged under it.
  3. 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 409 SCENARIO_EDIT_NOT_SUPPORTED. Replacing one row’s material by another (a swap) is allowed.
  4. Compare. POST .../scenario/comparison recalculates both LCAs when needed and answers each impact category’s baseline and scenario totals, what each design change contributes, and the other_effects no design change explains. The contributions and other_effects add up to the difference.
  5. Keep or discard it. Saving a scenario turns it into an LCA of the portfolio, linked to its baseline. Discarding deletes a draft.
All routes take the same headers as the rest of the LCA API: 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