Skip to content

create_database_exchange

Create an exchange linking to Ecoinvent database.

Parameters

Parameter Type Required Description
activity_id string Yes Parent activity UUID
amount float Yes Quantity (+consumed, -credits)
exchange_type string Yes "technosphere" or "biosphere"
input_database string Yes Database version (MUST match project)
input_activity_code string No Ecoinvent activity code
input_biosphere_code string No Biosphere flow code

Critical

Database version MUST match project database. Mixing versions causes errors.

Example

Prompt: Add 50 kWh of solar electricity input to activity xyz789 from Ecoinvent

Workflow

  1. Search for Ecoinvent activity/biosphere flow
  2. Get code from search results
  3. Create exchange with code