With the Impacts endpoints you can create your impact with different sources, triggers and metadata.

Impact Object

PropertyTypeDescription
impactPurchases(ImpactPurchase | ImpactPurchaseByValue)[]The impactPurchases array contains your spending on various impacts such as trees, plastic or CO2.
estimationIdstringThe id of the estimation that was used to calculate the impact. You can use it to connect an impact with an estimation.
projectIdstringThe id of the project where the impact is made.
metadataMetadata[]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.

PropertyTypeDescription
typestringType can be trees, plastic or carbon.
amountnumberAmount means the number of trees, plastic bottles or kg of CO2.

ImpactPurchaseByValue Object

The ImpactPurchase represents a spending on a specific purpose.

PropertyTypeDescription
typestringType can be trees, plastic or carbon.
valuenumberValue of the impacts to be purchased in the account’s currency.

Metadata Object

With the Metadata object, you can differentiate your Impacts later.

PropertyTypeDescription
keystringMinimum 1, maximum 40 characters.
valuestringMinimum 1, maximum 500 characters.

Reserved Metadata keys

With the following reserved keys, you can optionally decorate the impact you're creating in order to help segment your impacts or configure how the impacts should be billed.

  • customerEmail: the email of your customer who triggered the impact creation. This email will be used for post purchase email sending if it is enabled.
  • customerFirstName: the first name of your customer who triggered the impact creation.
  • customerLastName: the last name of your customer who triggered the impact creation.
  • customerId: the unique identifier of your customer who triggered the impact creation.
  • merchantId: the unique identifier of the merchant on whose behalf you create the impact.
  • customerEmailType: the custom type for the impact action. This name will appear on the impact emails sent out (if it is enabled) as well as within the customers impact wallet. If left blank we will simply use "impact action".