Greenspark Reports API
The Reports API from Greenspark — 15 operation(s) for reports.
Documentation
Documentation
https://docs.getgreenspark.com/docs
APIReference
https://docs.getgreenspark.com/reference
The Reports API from Greenspark — 15 operation(s) for reports.
openapi: 3.0.0
info:
title: Greenspark Climate Account Reports API
version: 2.3.0
description: 'Greenspark Impact-as-a-Service Climate API: create carbon-offset, tree-planting, plastic-recovery and other climate impacts, fetch impact/project data, carbon estimations, reporting, email templates and embeddable impact widgets. Reconstructed by API Evangelist from the provider''s per-endpoint OpenAPI definitions published on docs.getgreenspark.com.'
contact:
name: Greenspark Support
email: support@getgreenspark.com
url: https://www.getgreenspark.com
servers:
- url: https://api.getgreenspark.com
description: Production
- url: https://sandbox.getgreenspark.com
description: Sandbox
- url: https://demo-api.getgreenspark.com
description: Demo
security:
- ApiKeyAuth: []
tags:
- name: Reports
paths:
/v1/reports/{reportId}/{cursor}:
get:
deprecated: true
description: Deprecated — returns 404 at runtime. Use v2 fetchRawReportV2 (GET /v2/reports) with cursor pagination.
operationId: fetchAReportPage
parameters:
- name: reportId
required: true
in: path
description: The id of a previously generated report.
schema:
example: 671766d9-65d5-4e5f-aa75-00782d3b7f9e
type: string
- name: cursor
required: true
in: path
description: The cursor identifies the next page within a report.
schema:
example: BHI6BU2ZQMAQAAASA4EAAEEAQCAAKGQEBBSBAZBAWCXBK===
type: string
responses:
'200':
description: The report page has been successfully queried.
content:
application/json:
schema:
$ref: '#/components/schemas/RawReport'
'400':
description: Bad request.
'401':
description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard after registration (separate key per environment).
'403':
description: Requires premiumBusiness, premiumBusinessYearly, or enterpriseBusiness subscription.
'404':
description: Not found.
'422':
description: 422 Unprocessable Entity when API quota is exhausted (MAX_API_CALLS_REACHED).
security:
- access-key: []
summary: Fetch a Report Page
tags:
- Reports
/v1/reports/average-spend-per-impact:
get:
description: Fetch the Array of average spending on impacts per currency.
operationId: fetchAverageSpendPerImpact
parameters:
- name: sourceId
required: false
in: query
description: The id of the source associated with the impact.
schema:
example: 631b035dcd13c4ad66c6d496
type: string
- name: triggerId
required: false
in: query
description: The id of the trigger associated with the impact.
schema:
example: 281f045dcd23c4ae26c6d498
type: string
- name: startDate
required: false
in: query
description: The beginning of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: endDate
required: false
in: query
description: The end of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: metadata
required: false
in: query
description: You can filter the data by the provided key-value pairs as Metadata.
schema:
example: key1,value1;key2,value2
type: string
- name: sourceType
required: false
in: query
description: The source type of the impact, one of "one-time", "subscription".
schema:
example: one-time
type: string
enum:
- one-time
- subscription
responses:
'200':
description: The report has been successfully queried.
content:
application/json:
schema:
type: array
items:
type: object
properties:
value:
type: number
description: The spending on impacts.
example:
- value: $0.5
'400':
description: Bad request.
'401':
description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard after registration (separate key per environment).
'403':
description: Requires premiumBusiness, premiumBusinessYearly, or enterpriseBusiness subscription.
'404':
description: Not found.
'422':
description: 422 Unprocessable Entity when API quota is exhausted (MAX_API_CALLS_REACHED).
security:
- access-key: []
summary: Fetch Average Spend Per Impact
tags:
- Reports
/v1/reports/carbon-by-interval:
get:
deprecated: true
description: Fetch the Array of spending on impacts of carbon per month.
operationId: fetchCarbonByInterval
parameters:
- name: sourceId
required: false
in: query
description: The id of the source associated with the impact.
schema:
example: 631b035dcd13c4ad66c6d496
type: string
- name: triggerId
required: false
in: query
description: The id of the trigger associated with the impact.
schema:
example: 281f045dcd23c4ae26c6d498
type: string
- name: startDate
required: false
in: query
description: The beginning of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: endDate
required: false
in: query
description: The end of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: metadata
required: false
in: query
description: You can filter the data by the provided key-value pairs as Metadata.
schema:
example: key1,value1;key2,value2
type: string
- name: sourceType
required: false
in: query
description: The source type of the impact, one of "one-time", "subscription".
schema:
example: one-time
type: string
enum:
- one-time
- subscription
responses:
'200':
description: The report has been successfully queried.
content:
application/json:
schema:
type: array
items:
type: object
properties:
type:
type: string
description: The type of the spending.
amount:
type: number
description: The amount of the spending.
month:
type: string
description: The month when your impacts were created.
example:
- type: carbon
amount: 5
month: 2022-09
- type: carbon
amount: 3
month: 2022-08
'400':
description: Bad request.
'401':
description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard after registration (separate key per environment).
'403':
description: Requires premiumBusiness, premiumBusinessYearly, or enterpriseBusiness subscription.
'404':
description: Not found.
'422':
description: 422 Unprocessable Entity when API quota is exhausted (MAX_API_CALLS_REACHED).
security:
- access-key: []
summary: Fetch Carbon By Interval
tags:
- Reports
/v1/reports/impact-amount-by-type-per-source:
get:
description: Fetch the Array of spending on impacts on a single type and source.
operationId: fetchImpactAmountByTypePerSourceReport
parameters:
- name: sourceId
required: false
in: query
description: The id of the source associated with the impact.
schema:
example: 631b035dcd13c4ad66c6d496
type: string
- name: triggerId
required: false
in: query
description: The id of the trigger associated with the impact.
schema:
example: 281f045dcd23c4ae26c6d498
type: string
- name: startDate
required: false
in: query
description: The beginning of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: endDate
required: false
in: query
description: The end of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: metadata
required: false
in: query
description: You can filter the data by the provided key-value pairs as Metadata.
schema:
example: key1,value1;key2,value2
type: string
- name: sourceType
required: false
in: query
description: The source type of the impact, one of "one-time", "subscription".
schema:
example: one-time
type: string
enum:
- one-time
- subscription
responses:
'200':
description: The report has been successfully queried.
content:
application/json:
schema:
type: array
items:
type: object
properties:
source:
type: string
description: The name of the source.
type:
type: string
description: The type of the spending.
amount:
type: number
description: The amount of the spending.
example:
- source: API
type: carbon
amount: 30
- source: Source1
type: trees
amount: 265
'400':
description: Bad request.
'401':
description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard after registration (separate key per environment).
'403':
description: Requires premiumBusiness, premiumBusinessYearly, or enterpriseBusiness subscription.
'404':
description: Not found.
'422':
description: 422 Unprocessable Entity when API quota is exhausted (MAX_API_CALLS_REACHED).
security:
- access-key: []
summary: Fetch Impact Amount By Type Per Source Report
tags:
- Reports
/v1/reports/impact-amount-by-type-per-trigger:
get:
description: Fetch the Array of spending on impacts on a single type and trigger.
operationId: fetchImpactAmountByTypePerTriggerReport
parameters:
- name: sourceId
required: false
in: query
description: The id of the source associated with the impact.
schema:
example: 631b035dcd13c4ad66c6d496
type: string
- name: triggerId
required: false
in: query
description: The id of the trigger associated with the impact.
schema:
example: 281f045dcd23c4ae26c6d498
type: string
- name: startDate
required: false
in: query
description: The beginning of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: endDate
required: false
in: query
description: The end of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: metadata
required: false
in: query
description: You can filter the data by the provided key-value pairs as Metadata.
schema:
example: key1,value1;key2,value2
type: string
- name: sourceType
required: false
in: query
description: The source type of the impact, one of "one-time", "subscription".
schema:
example: one-time
type: string
enum:
- one-time
- subscription
responses:
'200':
description: The report has been successfully queried.
content:
application/json:
schema:
type: array
items:
type: object
properties:
trigger:
type: string
description: The name of the trigger.
type:
type: string
description: The type of the spending.
amount:
type: number
description: The amount of the spending.
example:
- trigger: TRIGGER1
type: carbon
amount: 30
- trigger: TAILORED_IMPACT
type: trees
amount: 265
'400':
description: Bad request.
'401':
description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard after registration (separate key per environment).
'403':
description: Requires premiumBusiness, premiumBusinessYearly, or enterpriseBusiness subscription.
'404':
description: Not found.
'422':
description: 422 Unprocessable Entity when API quota is exhausted (MAX_API_CALLS_REACHED).
security:
- access-key: []
summary: Fetch Impact Amount By Type Per Trigger Report
tags:
- Reports
/v1/reports/impacts-by-interval:
get:
description: Fetch the Array of spending on impacts per month.
operationId: fetchImpactsByInterval
parameters:
- name: sourceId
required: false
in: query
description: The id of the source associated with the impact.
schema:
example: 631b035dcd13c4ad66c6d496
type: string
- name: triggerId
required: false
in: query
description: The id of the trigger associated with the impact.
schema:
example: 281f045dcd23c4ae26c6d498
type: string
- name: startDate
required: false
in: query
description: The beginning of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: endDate
required: false
in: query
description: The end of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: metadata
required: false
in: query
description: You can filter the data by the provided key-value pairs as Metadata.
schema:
example: key1,value1;key2,value2
type: string
- name: sourceType
required: false
in: query
description: The source type of the impact, one of "one-time", "subscription".
schema:
example: one-time
type: string
enum:
- one-time
- subscription
responses:
'200':
description: The report has been successfully queried.
content:
application/json:
schema:
type: array
items:
type: object
properties:
type:
type: string
description: The type of the spending.
amount:
type: number
description: The amount of the spending.
projectId:
type: string
description: The project of the spending.
month:
type: string
description: The month when your impacts were created.
example:
- type: trees
amount: 10
projectId: c6e4b1bf-843e-4859-bc85-c3b764f507e6
month: 2022-09
- type: water
amount: 29
projectId: 6b0add6d-246f-4a22-a072-3469eb65b225
month: 2022-09
'400':
description: Bad request.
'401':
description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard after registration (separate key per environment).
'403':
description: Requires premiumBusiness, premiumBusinessYearly, or enterpriseBusiness subscription.
'404':
description: Not found.
'422':
description: 422 Unprocessable Entity when API quota is exhausted (MAX_API_CALLS_REACHED).
security:
- access-key: []
summary: Fetch Impacts By Interval
tags:
- Reports
/v1/reports/plastic-by-interval:
get:
deprecated: true
description: Fetch the Array of spending on impacts of plastic per month.
operationId: fetchPlasticByInterval
parameters:
- name: sourceId
required: false
in: query
description: The id of the source associated with the impact.
schema:
example: 631b035dcd13c4ad66c6d496
type: string
- name: triggerId
required: false
in: query
description: The id of the trigger associated with the impact.
schema:
example: 281f045dcd23c4ae26c6d498
type: string
- name: startDate
required: false
in: query
description: The beginning of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: endDate
required: false
in: query
description: The end of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: metadata
required: false
in: query
description: You can filter the data by the provided key-value pairs as Metadata.
schema:
example: key1,value1;key2,value2
type: string
- name: sourceType
required: false
in: query
description: The source type of the impact, one of "one-time", "subscription".
schema:
example: one-time
type: string
enum:
- one-time
- subscription
responses:
'200':
description: The report has been successfully queried.
content:
application/json:
schema:
type: array
items:
type: object
properties:
type:
type: string
description: The type of the spending.
amount:
type: number
description: The amount of the spending.
month:
type: string
description: The month when your impacts were created.
example:
- type: plastic
amount: 1
month: 2022-09
- type: plastic
amount: 2
month: 2022-08
'400':
description: Bad request.
'401':
description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard after registration (separate key per environment).
'403':
description: Requires premiumBusiness, premiumBusinessYearly, or enterpriseBusiness subscription.
'404':
description: Not found.
'422':
description: 422 Unprocessable Entity when API quota is exhausted (MAX_API_CALLS_REACHED).
security:
- access-key: []
summary: Fetch Plastic By Interval
tags:
- Reports
/v1/reports:
get:
deprecated: true
description: Deprecated — returns 404 at runtime. Use v2 fetchRawReportV2 (GET /v2/reports).
operationId: fetchRawReport
parameters:
- name: sourceId
required: false
in: query
description: The id of the source associated with the impact.
schema:
example: 631b035dcd13c4ad66c6d496
type: string
- name: triggerId
required: false
in: query
description: The id of the trigger associated with the impact.
schema:
example: 281f045dcd23c4ae26c6d498
type: string
- name: startDate
required: false
in: query
description: The beginning of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: endDate
required: false
in: query
description: The end of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: metadata
required: false
in: query
description: You can filter the data by the provided key-value pairs as Metadata.
schema:
example: key1,value1;key2,value2
type: string
- name: sourceType
required: false
in: query
description: The source type of the impact, one of "one-time", "subscription".
schema:
example: one-time
type: string
enum:
- one-time
- subscription
- name: impactType
required: false
in: query
description: Type can be trees, plastic or carbon. As a result only the impacts containing the provided impact type will be returned. If they contain other impact types as well, those won't be filtered out.
schema:
type: string
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
responses:
'200':
description: The report has been successfully queried.
content:
application/json:
schema:
$ref: '#/components/schemas/RawReport'
'400':
description: Bad request.
'401':
description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard after registration (separate key per environment).
'403':
description: Requires premiumBusiness, premiumBusinessYearly, or enterpriseBusiness subscription.
'404':
description: Not found.
'422':
description: 422 Unprocessable Entity when API quota is exhausted (MAX_API_CALLS_REACHED).
security:
- access-key: []
summary: Fetch Raw Report
tags:
- Reports
/v2/reports:
get:
description: Canonical raw impact export. Paginate with the cursor query parameter when the response includes a non-null cursor. Row metadata may contain merchant-defined key/value pairs.
operationId: fetchRawReportV2
parameters:
- name: sourceId
required: false
in: query
description: The id of the source associated with the impact.
schema:
example: 631b035dcd13c4ad66c6d496
type: string
- name: triggerId
required: false
in: query
description: The id of the trigger associated with the impact.
schema:
example: 281f045dcd23c4ae26c6d498
type: string
- name: startDate
required: false
in: query
description: The beginning of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: endDate
required: false
in: query
description: The end of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: metadata
required: false
in: query
description: You can filter the data by the provided key-value pairs as Metadata.
schema:
example: key1,value1;key2,value2
type: string
- name: sourceType
required: false
in: query
description: The source type of the impact, one of "one-time", "subscription".
schema:
example: one-time
type: string
enum:
- one-time
- subscription
- name: impactType
required: false
in: query
description: Type can be trees, plastic or carbon. As a result only the impacts containing the provided impact type will be returned. If they contain other impact types as well, those won't be filtered out.
schema:
type: string
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
- name: cursor
required: false
in: query
description: The cursor identifies the next page within a report.
schema:
example: BHI6BU2ZQMAQAAASA4EAAEEAQCAAKGQEBBSBAZBAWCXBK===
type: string
responses:
'200':
description: The report has been successfully queried.
content:
application/json:
schema:
$ref: '#/components/schemas/RawReportV2'
'400':
description: Bad request.
'401':
description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard after registration (separate key per environment).
'403':
description: Requires premiumBusiness, premiumBusinessYearly, or enterpriseBusiness subscription.
'404':
description: Not found.
'422':
description: 422 Unprocessable Entity when API quota is exhausted (MAX_API_CALLS_REACHED).
security:
- access-key: []
summary: Fetch Raw Report v2
tags:
- Reports
/v1/reports/total-impact-by-sources:
get:
description: Fetch the Array of impacts amount per source.
operationId: fetchTotalImpactBySources
parameters:
- name: sourceId
required: false
in: query
description: The id of the source associated with the impact.
schema:
example: 631b035dcd13c4ad66c6d496
type: string
- name: triggerId
required: false
in: query
description: The id of the trigger associated with the impact.
schema:
example: 281f045dcd23c4ae26c6d498
type: string
- name: startDate
required: false
in: query
description: The beginning of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: endDate
required: false
in: query
description: The end of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: metadata
required: false
in: query
description: You can filter the data by the provided key-value pairs as Metadata.
schema:
example: key1,value1;key2,value2
type: string
- name: sourceType
required: false
in: query
description: The source type of the impact, one of "one-time", "subscription".
schema:
example: one-time
type: string
enum:
- one-time
- subscription
responses:
'200':
description: The report has been successfully queried.
content:
application/json:
schema:
type: array
items:
type: object
properties:
source:
type: string
description: The name of the source.
total:
type: number
description: The amount of impacts.
example:
- source: Source1
total: 1272
- source: Api
total: 305
'400':
description: Bad request.
'401':
description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard after registration (separate key per environment).
'403':
description: Requires premiumBusiness, premiumBusinessYearly, or enterpriseBusiness subscription.
'404':
description: Not found.
'422':
description: 422 Unprocessable Entity when API quota is exhausted (MAX_API_CALLS_REACHED).
security:
- access-key: []
summary: Fetch Total Impact By Sources
tags:
- Reports
/v1/reports/total-impact-by-triggers:
get:
description: Fetch the Array of impacts amount per trigger.
operationId: fetchTotalImpactByTriggers
parameters:
- name: sourceId
required: false
in: query
description: The id of the source associated with the impact.
schema:
example: 631b035dcd13c4ad66c6d496
type: string
- name: triggerId
required: false
in: query
description: The id of the trigger associated with the impact.
schema:
example: 281f045dcd23c4ae26c6d498
type: string
- name: startDate
required: false
in: query
description: The beginning of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: endDate
required: false
in: query
description: The end of the date filter interval.
schema:
example: '2022-09-01'
type: string
- name: metadata
required: false
in: query
description: You can filter the data by the provided key-value pairs as Metadata.
schema:
example: key1,value1;key2,value2
type: string
- name: sourceType
required: false
in: query
description: The source type of the impact, one of "one-time", "subscription".
schema:
example: one-time
type: string
enum:
- one-time
- subscription
responses:
'200':
description: The report has been successfully queried.
content:
application/json:
schema:
type: array
items:
type: object
properties:
trigger:
type: string
description: The name of the trigger.
total:
type: number
description: The amount of impacts.
example:
- trigger: Tailored Impact
total: 305
- trigger: Trigger1
total: 270
- trigger: Trigger1
total: 2
- trigger: Trigger1
total: 1
'400':
description: Bad request.
'401':
description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard after registration (separate key per environment).
'403':
description: Requires premiumBusiness, premiumBusinessYearly, or enterpriseBusiness subscription.
'404':
description: Not found.
'422':
description: 422 Unprocessable Entity when API quota is exhausted (MAX_API_CALLS_REACHED).
security:
- access-key: []
summary: Fetch Total Impact By Triggers
tags:
- Reports
/v1/reports/total-impact-by-type:
get:
description: Fetch the Array of spending on impacts on a single type.
operationId: fetchTotalImpactByTypeReport
parameters:
- name: sourceId
required: false
in: query
description: The id of the source associated with the impact.
schema:
example: 631b035dcd13c4ad66c6d496
type: string
- name: triggerId
required: false
in: query
description:
# --- truncated at 32 KB (51 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/greenspark/refs/heads/main/openapi/greenspark-reports-api-openapi.yml