With the Reporting endpoints you can fetch detailed reports about the Impacts you have created.
RawReport Object
This represents a report with raw data about your Impacts.
| Property | Type | Description |
|---|---|---|
| rows | RawReportRow[] | One item in the array represents an Impact. |
| maxResults | number | Maximum number of rows per page. |
| cursor | string | Present if the results are spread across multiple pages. Use the cursor to fetch the next reports page. If null, it indicates that there is no further pagination. |
RawReportRow Object
This represents an Impact in the report.
| id | string | The id of the impact. |
| createdAt | string | Creation date of the impact. |
| totalPrice | number | Total amount of money spent on the impact. |
| currency | string | The currency of the spent money on the impact. |
| sourceName | string | The name of the source associated with the impact. |
| sourceId | string | The id of the source associated with the impact. |
| triggerName | string | The name of the trigger associated with the impact. |
| triggerId | string | The id of the trigger associated with the impact. |
| impactPurchases | ImpactPurchase[] | The impactPurchases array contains your spending on various impacts such as trees, plastic or CO2. |
| metadata | Metadata[] | In the metadata array you can store up to 10 custom key-value pairs. Reserved metadata keys don't count toward this limit. You can use them to associate data from within your application with your impact. |
| status | 'paid' | 'unpaid' | The payment status of the impact. |
ImpactPurchase Object
The impactPurchase object contains your spending on a specific impact such as trees, plastic or CO2.
| Property | Type | Description |
|---|---|---|
| type | string | Type can be trees, plastic, carbon, kelp, water or bees. |
| amount | number | Amount means the number of trees, plastic bottles, kelp, kg of CO2, days of water supplied or bees protected. |
| price | number | Amount of money spent on the impact purchase. |
| purchaseIds | string[] | null | The ids of the purchases made for the impact. |
| projectId | string (optional) | The id of the project where the impact is made. |
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 100 characters. |
Filtering by metadata
You can filter reports by metadata with the metadata query parameter. It accepts up to 50 key-value pairs in the format key1,value1;key2,value2. Separate key and value with a comma and pairs with a semicolon. To use a comma, semicolon or backslash inside a key or value, escape it with a backslash (for example name,Smith\, John).