With the Impacts endpoints you can create your impact with different sources, triggers and metadata.
Impact Object
Property | Type | Description |
---|---|---|
impactPurchases | ImpactPurchase[] | The impactPurchases array contains your spending on various impacts such as trees, plastic or CO2. |
metadata | Metadata[] | The metadata array holds up to 50 key-value pair objects. You can use them to differentiate your Impacts later. For example you might want to associate impacts created in your application with your users by simply passing their unique user id. Later you can use this to filter results and display the correct impact to your users. |
ImpactPurchase Object
The ImpactPurchase represents a spending on a specific purpose.
Property | Type | Description |
---|---|---|
type | string | Type can be trees, plastic or carbon. |
amount | number | Amount means the number of trees, plastic bottles or kg of CO2. |
Metadata Object
WIth the Metadata object, you can differentiate your Impacts later.
Property | Type | Description |
---|---|---|
key | string | Minimum 1, maximum 40 characters. |
value | string | Minimum 1, maximum 500 characters. |