openapi: 3.0.0
info:
title: Greenspark Climate 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: []
paths:
/v1/email/domains:
post:
deprecated: true
description: Deprecated — redirects to v2. Use addDomainV2.
operationId: addDomain
parameters: []
responses:
'200':
description: Domain has been successfully added.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomDomainDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Add Domain
tags:
- Email
get:
deprecated: true
description: Deprecated — redirects to v2. Use fetchDomainsV2.
operationId: fetchDomains
parameters: []
responses:
'200':
description: Domains has been successfully queried.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CustomDomainDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Fetch Domains
tags:
- Email
/v2/email/domains:
post:
description: Add your domain and receive the DNS records that must be added to your domain.
operationId: addDomainV2
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CustomDomainRequestBody'
responses:
'200':
description: Domain has been successfully added.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomDomainDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Add Domain
tags:
- Email
get:
description: Fetch your previously added domains.
operationId: fetchDomainsV2
parameters: []
responses:
'200':
description: Domains has been successfully queried.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CustomDomainDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Fetch Domains
tags:
- Email
/v1/email/templates:
post:
deprecated: true
description: Deprecated — redirects to v2. Use addTemplateV2. Add your notification template for
email sending. If you do not want a customizable property to be custom, you should provide the
default value for that property.
operationId: addTemplate
parameters: []
responses:
'200':
description: Notification template has been successfully added.
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationTemplateResponseDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Add Template
tags:
- Email
get:
deprecated: true
description: Deprecated — redirects to v2. Use fetchTemplatesV2.
operationId: fetchTemplates
parameters: []
responses:
'200':
description: Templates has been successfully queried.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/NotificationTemplateResponseDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Fetch Templates
tags:
- Email
/v2/email/templates:
post:
description: Add your notification template for email sending. If you do not want a customizable
property to be custom, you should provide the default value for that property. You can get the
default values for every template type from the templates-defaults endpoint.
operationId: addTemplateV2
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationTemplateRequestDto'
responses:
'200':
description: Notification template has been successfully added.
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationTemplateResponseDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Add Template
tags:
- Email
get:
description: Fetch templates for email sending.
operationId: fetchTemplatesV2
parameters: []
responses:
'200':
description: Templates has been successfully queried.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/NotificationTemplateResponseDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Fetch Templates
tags:
- Email
/v2/widgets/by-percentage-of-revenue-widget:
post:
summary: By percentage of revenue widget v2
description: Fetching a widget that describes a given store’s by percentage of revenue impact settings.
operationId: by-percentage-of-revenue-widget-v2
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- integrationSlug
- color
properties:
integrationSlug:
type: string
description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
default: YOUR-SHOP-NAME
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black" | "grey" | "transparent"'
default: green
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
default: false
style:
type: string
description: 'Select if you want the default style (displayed above) or if you want
a simplified version. Current options include: "default" | "simplified"'
default: default
popupTheme:
type: string
description: Selects the color theme for the popup. Only applies if `withPopup` is set
to `true`
default: light
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/v2/widgets/by-percentage-widget:
post:
summary: By percentage widget v2
description: Fetching a widget that describes a given store’s by percentage impact settings.
operationId: by-percentage-widget-v2
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- integrationSlug
- color
properties:
integrationSlug:
type: string
description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
default: YOUR-SHOP-NAME
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black" | "grey" | "transparent"'
default: green
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
default: false
style:
type: string
description: 'Select if you want the default style (displayed above) or if you want
a simplified version. Current options include: "default" | "simplified"'
default: default
popupTheme:
type: string
description: Selects the color theme for the popup. Only applies if `withPopup` is set
to `true`
default: light
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/widgets/by-percentage-widget:
post:
summary: By percentage widget
description: Fetching a widget that describes a given store’s by percentage impact settings.
operationId: by-percentage-widget
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- shopUniqueName
- color
properties:
shopUniqueName:
type: string
description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
default: YOUR-SHOP-NAME
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black"'
default: green
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
default: false
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/v2/widgets/cart-widget:
post:
summary: Cart widget v2
description: Fetching a widget that describes the impact made by the products placed in the cart.
operationId: cart-widget-v2
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- integrationSlug
- color
- order
properties:
integrationSlug:
type: string
description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
default: YOUR-SHOP-NAME
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black" | "grey" | "transparent"'
default: green
order:
type: object
description: Specify the order data to show the correct impact totals in the widget.
properties:
currency:
type: string
description: 'This is the order''s currency. For example: "USD" | "GBP" | "EUR"
| "AUD" | "NZD"'
default: USD
totalPrice:
type: integer
description: Specify the total price of the order as a number in cents.
default: 100
format: int32
lineItems:
type: array
description: These are all of the products that a customer has in their cart.
items:
properties:
productId:
type: string
description: Specify the product id of the item in the cart.
default: PRODUCT ID OF CART ITEM
quantity:
type: integer
description: Specify the quantity of the product in the cart.
default: 1
format: int32
type: object
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
default: false
style:
type: string
description: 'Select if you want the default style (displayed above) or if you want
a simplified version. Current options include: "default" | "simplified"'
default: default
popupTheme:
type: string
description: Selects the color theme for the popup. Only applies if `withPopup` is set
to `true`
default: light
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/widgets/cart-widget:
post:
summary: Cart widget
description: Fetching a widget that describes the impact made by the products placed in the cart.
operationId: cart-widget
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- shopUniqueName
- color
- order
properties:
shopUniqueName:
type: string
description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
default: YOUR-SHOP-NAME
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black"'
default: green
order:
type: object
description: Specify the order data to show the correct impact totals in the widget.
properties:
currency:
type: string
description: 'This is the order''s currency. For example: "USD" | "GBP" | "EUR"
| "AUD" | "NZD"'
default: USD
totalPrice:
type: integer
description: Specify the total price of the order as a number in cents.
default: 100
format: int32
lineItems:
type: array
description: These are all of the products that a customer has in their cart.
items:
properties:
productId:
type: string
description: Specify the product id of the item in the cart.
default: PRODUCT ID OF CART ITEM
quantity:
type: integer
description: Specify the quantity of the product in the cart.
default: 1
format: int32
type: object
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
default: false
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
x-readme:
code-samples:
- language: curl
code: "curl --request POST \\\n --url 'https://api.getgreenspark.com/widgets/cart-widget?lng=en'\
\ \\\n --header 'accept: text/html' \\\n --header 'content-type: application/json'\
\ \\\n --header 'x-api-key: \"YOUR-API-KEY\"' \\\n --data '\n{\n \"shopUniqueName\"\
: \"YOUR-SHOP-NAME\",\n \"color\": \"green\",\n \"order\": {\n \"currency\": \"USD\"\
,\n \"totalPrice\": 100,\n \"lineItems\": [\n\t\t\t{\n \t\"productId\": \"YOUR-PRODUCT-ID\"\
,\n \"quantity\": 1\n\t\t\t}\n\t\t]\n },\n \"withPopup\": false\n}\n'"
samples-languages:
- curl
tags:
- Widgets
/v1/impacts/sources/{sourceId}/triggers/{triggerId}:
post:
description: Creates an impact associated with a source and a trigger. Not executable via ReadMe
MCP execute-request in the current version (read-only MCP). Use get-endpoint output to build integrations
in your application.
operationId: createImpact
parameters:
- name: sourceId
required: true
in: path
description: The id of the source associated with the impact.
schema:
example: 631b035dcd13c4ad66c6d496
type: string
- name: triggerId
required: true
in: path
description: The id of the trigger associated with the impact.
schema:
example: 281f045dcd23c4ae26c6d498
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ImpactDto'
responses:
'201':
description: The impact has been successfully created.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ImpactPurchaseDetail'
'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 growthBusiness, growthBusinessYearly, premiumBusiness, premiumBusinessYearly,
or enterpriseBusiness subscription.
'404':
description: Not found.
security:
- access-key: []
summary: Create Impact
tags:
- Impacts
/v1/impacts/batch:
post:
description: Run multiple create impact call in a batch, equivalent to calling create impact multiple
times with different parameters. Not executable via ReadMe MCP execute-request in the current
version (read-only MCP). Use get-endpoint output to build integrations in your application.
operationId: createImpactBatch
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateImpactBatchRequestBody'
responses:
'201':
description: Every impacts in the batch call has been successfully created.
content:
application/json:
schema:
$ref: '#/components/schemas/BatchImpactPurchaseResponses'
'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.
security:
- access-key: []
summary: Create Impact in Batch
tags:
- Impacts
/v1/impacts:
post:
description: Creates an impact associated with an account id. Not executable via ReadMe MCP execute-request
in the current version (read-only MCP). Use get-endpoint output to build integrations in your
application.
operationId: createTailoredImpact
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ImpactDto'
responses:
'201':
description: The impact has been successfully created.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ImpactPurchaseDetail'
'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.
security:
- access-key: []
summary: Create One-time Impact
tags:
- Impacts
/v1/email/domains/{domainId}:
delete:
deprecated: true
description: Deprecated — redirects to v2. Use deleteDomainV2.
operationId: deleteDomain
parameters:
- name: domainId
required: true
in: path
description: The id of the custom domain object.
schema:
example: 63c5857475784b9acf05c919
type: string
responses:
'200':
description: Domains has been successfully deleted.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomDomainDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Delete Domain
tags:
- Email
/v2/email/domains/{domainId}:
delete:
description: Delete your domain.
operationId: deleteDomainV2
parameters:
- name: domainId
required: true
in: path
description: The id of the custom domain object.
schema:
example: 63c5857475784b9acf05c919
type: string
responses:
'200':
description: Domains has been successfully deleted.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomDomainDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Delete Domain
tags:
- Email
/v1/email/templates/{templateId}:
delete:
deprecated: true
description: Deprecated — redirects to v2. Use deleteTemplateV2.
operationId: deleteTemplate
parameters:
- name: templateId
required: true
in: path
description: The id of the notification template.
schema:
example: 853b035dcd13c4ad66c6d618
type: string
responses:
'200':
description: Template has been successfully deleted.
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationTemplateResponseDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Delete Template
tags:
- Email
put:
deprecated: true
description: Deprecated — redirects to v2. Use updateTemplateV2. Update your notification template
for email sending.
operationId: updateTemplate
parameters:
- name: templateId
required: true
in: path
description: The id of the notification template.
schema:
example: 853b035dcd13c4ad66c6d618
type: string
responses:
'200':
description: Notification template has been successfully updated.
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationTemplateResponseDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Update Template
tags:
- Email
/v2/email/templates/{templateId}:
delete:
description: Delete your template.
operationId: deleteTemplateV2
parameters:
- name: templateId
required: true
in: path
description: The id of the notification template.
schema:
example: 853b035dcd13c4ad66c6d618
type: string
responses:
'200':
description: Template has been successfully deleted.
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationTemplateResponseDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Delete Template
tags:
- Email
put:
description: Update your notification template for email sending. If you do not want a customizable
property to be custom, you should provide the default value for that property. You can get the
default values for every template type from the templates-defaults endpoint.
operationId: updateTemplateV2
parameters:
- name: templateId
required: true
in: path
description: The id of the notification template.
schema:
example: 853b035dcd13c4ad66c6d618
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationTemplateRequestDto'
responses:
'200':
description: Notification template has been successfully updated.
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationTemplateResponseDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Update Template
tags:
- Email
/v1/email/templates/{templateId}/disable:
post:
description: Disable your notification template to stop sending emails.
operationId: disableTemplate
parameters:
- name: templateId
required: true
in: path
description: The id of the notification template.
schema:
example: 853b035dcd13c4ad66c6d618
type: string
responses:
'200':
description: Notification template has been successfully disabled.
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationTemplateResponseDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Disable Template
tags:
- Email
/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/estimations/transaction/mcc:
post:
operationId: fetchCarbonEstimateOfATransactionByMCC
summary: Fetch Carbon Estimate of a Transaction by MCC
description: Estimating the carbon footprint of a transaction based on a Merchant Category Code
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EstimationsByMCCRequestBody'
responses:
'200':
description: The estimated carbon footprint has been successfully fetched.
content:
application/json:
schema:
$ref: '#/components/schemas/Estimation'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a premium or enterprise plan.
'404':
description: Not found.
'429':
description: Too Many Requests
tags:
- Estimations
security:
- access-key: []
/v1/estimations/transaction/category-type:
post:
operationId: fetchCarbonEstimateOfATransactionByOpenBankingCategoryTypes
summary: Fetch Carbon Estimate of a Transaction by Open Banking Category Types
description: Estimating the carbon footprint of a transaction based on Open Banking Category Types
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EstimationsByCategoryTypeRequestBody'
responses:
'200':
description: The estimated carbon footprint has been successfully fetched.
content:
application/json:
schema:
$ref: '#/components/schemas/Estimation'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a premium or enterprise plan.
'404':
description: Not found.
'429':
description: Too Many Requests
tags:
- Estimations
security:
- access-key: []
/v1/estimations/transaction/mcc/bulk:
post:
operationId: fetchCarbonEstimateOfMultipleTransactionsByMCC
summary: Fetch Carbon Estimate of Multiple Transactions by MCC
description: Estimating the carbon footprint of multiple transactions based on a Merchant Category
Code
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BulkEstimationsByMCCRequestBody'
responses:
'200':
description: The estimated carbon footprints has been successfully fetched.
content:
application/json:
schema:
$ref: '#/components/schemas/Estimation'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a premium or enterprise plan.
'404':
description: Not found.
'429':
description: Too Many Requests
tags:
- Estimations
security:
- access-key: []
/v1/estimations/transaction/category-type/bulk:
post:
operationId: fetchCarbonEstimateOfMultipleTransactionsByOpenBankingCategoryTypes
summary: Fetch Carbon Estimate of Multiple Transactions by Open Banking Category Types
description: Estimating the carbon footprint of multiple transactions based on Open Banking Category
Types
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BulkEstimationsByCategoryTypeRequestBody'
responses:
'200':
description: The estimated carbon footprint has been successfully fetched.
content:
application/json:
schema:
$ref: '#/components/schemas/Estimation'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a premium or enterprise plan.
'404':
description: Not found.
'429':
description: Too Many Requests
tags:
- Estimations
security:
- access-key: []
/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/email/templates-defaults:
get:
deprecated: true
description: Deprecated — redirects to v2. Use fetchTemplatesDefaultsV2.
operationId: fetchTemplatesDefaults
parameters: []
responses:
'200':
description: Template defaults has been successfully queried.
content:
application/json:
schema:
example:
variables:
type: order, feedback, newsletter subscription, impact action
firstName: John
lastName: Smith
impactsTextPresent: plant 3 trees, recover 7 plastic bottles and offset 5 kgs of CO2
impactsTextPast: planted 3 trees, recover 7 plastic bottles and offset 5 kgs of CO2
sellerName: Greenspark
templates:
- accountId: ''
isCustom: false
type:
name: Customer invitation
template: invitation
trigger:
- byLoyaltyPoints
- offsetByPercentageOrder
- offsetBySpend
- offsetByStoreRevenue
- offsetPerOrder
- offsetPerProduct
- byPercentageOfPaidInvoice
- byPercentageOfRevenue
- bySpendOfPaidInvoice
- byTieredSpendOfPaidInvoice
- perPaidInvoice
- offsetPerSubscription
- offsetPerReview
- perCompletedForm
- perSelectedAnswer
- customerCartContribution
isTriggerCustom: false
schedule: null
isScheduleCustom: false
settings:
from:
name: null
domain: null
alias: '{{{ sellerName }}} x Greenspark'
isAliasCustom: false
subject: Your {{{type}}} with {{{sellerName}}} {{{impactsTextPast}}}. Track your
impact here.
isSubjectCustom: false
preheader: Activate your Greenspark dashboard & grow your impact today.
isPreheaderCustom: false
schedule:
startDate: '2026-05-26T14:06:53.231Z'
endDate: null
isEndDateCustom: false
content:
headerImage: http://res.cloudinary.com/dlilerh6s/image/upload/v1670515295/templates/abgf9boicpxujispedpy.png
isHeaderImageCustom: false
body: '
Hi {{{ firstName }}},
Thanks so much for your
{{{sellerName}}} {{{ type }}}!
Did you know that {{{sellerName}}} has partnered with Greenspark to {{{ impactsTextPresent }}} in your
name?
Check out your unique digital certificate showcasing
the impact your {{{ type }}} has created below.
If you’d like to learn
about the story behind your impact, see where it’s taking place, and gain deeper
insight into what it means for the planet you can activate your personalised Greenspark
dashboard. It’s completely free as a gift from us to you. Follow the link below
to discover more!
Many thanks,
{{{sellerName}}} &
Greenspark
'
isBodyCustom: false
isFooterHidden: false
isFooterHiddenCustom: false
isTotalImpactHidden: false
isTotalImpactHiddenCustom: false
statuses:
- status: disabled
initiatedAt: '2026-05-26T14:06:53.231Z'
initiatedBy: system
- accountId: ''
isCustom: false
type:
name: Customer update
template: update
trigger:
- byLoyaltyPoints
- offsetByPercentageOrder
- offsetBySpend
- offsetByStoreRevenue
- offsetPerOrder
- offsetPerProduct
- byPercentageOfPaidInvoice
- byPercentageOfRevenue
- bySpendOfPaidInvoice
- byTieredSpendOfPaidInvoice
- perPaidInvoice
- offsetPerSubscription
- offsetPerReview
- perCompletedForm
- perSelectedAnswer
- customerCartContribution
isTriggerCustom: false
schedule: null
isScheduleCustom: false
settings:
from:
name: null
domain: null
alias: '{{{ sellerName }}} x Greenspark'
isAliasCustom: false
subject: Your {{{type}}} with {{{sellerName}}} {{{impactsTextPast}}}. Track your
impact here.
isSubjectCustom: false
preheader: Login to your Greenspark dashboard.
isPreheaderCustom: false
schedule:
startDate: '2026-05-26T14:06:53.231Z'
endDate: null
isEndDateCustom: false
content:
headerImage: http://res.cloudinary.com/dlilerh6s/image/upload/v1670515295/templates/abgf9boicpxujispedpy.png
isHeaderImageCustom: false
body: 'Hi {{{ firstName }}},
Thanks again
for your {{{ type }}}! {{{sellerName}}} have partnered with Greenspark to {{{ impactsTextPresent
}}} in your name. Login
to your dashboard to track the impact of your actions.
'
isBodyCustom: false
isFooterHidden: false
isFooterHiddenCustom: false
isTotalImpactHidden: false
isTotalImpactHiddenCustom: false
statuses:
- status: disabled
initiatedAt: '2026-05-26T14:06:53.231Z'
initiatedBy: system
- accountId: ''
isCustom: false
type:
name: Customer nudge
template: nudge
trigger: null
isTriggerCustom: false
schedule:
- 3
- 7
- 14
isScheduleCustom: false
settings:
from:
name: null
domain: null
alias: Greenspark Team
isAliasCustom: false
subject: Your Greenspark invitation is waiting!
isSubjectCustom: false
preheader: Claim your Greenspark dashboard.
isPreheaderCustom: false
schedule:
startDate: '2026-05-26T14:06:53.231Z'
endDate: null
isEndDateCustom: false
content:
headerImage: http://res.cloudinary.com/dlilerh6s/image/upload/v1670515295/templates/abgf9boicpxujispedpy.png
isHeaderImageCustom: false
body: 'Hi {{{ firstName }}},
Your Greenspark invitation is waiting.
Claim your dashboard to track your overall impact from your purchases, reviews
and newsletter signups with participating Greenspark retailers.
'
isBodyCustom: false
isFooterHidden: false
isFooterHiddenCustom: false
isTotalImpactHidden: false
isTotalImpactHiddenCustom: false
statuses:
- status: disabled
initiatedAt: '2026-05-26T14:06:53.231Z'
initiatedBy: system
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Fetch Templates Defaults
tags:
- Email
/v2/email/templates-defaults:
get:
description: Fetch templates defaults for email sending.
operationId: fetchTemplatesDefaultsV2
parameters: []
responses:
'200':
description: Template defaults has been successfully queried.
content:
application/json:
schema:
example:
variables:
type: order, feedback, newsletter subscription, impact action
firstName: John
lastName: Smith
impactsTextPresent: plant 3 trees, recover 7 plastic bottles and offset 5 kgs of CO2
impactsTextPast: planted 3 trees, recover 7 plastic bottles and offset 5 kgs of CO2
sellerName: Greenspark
templates:
- accountId: ''
isCustom: false
type:
name: Customer invitation
template: invitation
trigger:
- byLoyaltyPoints
- offsetByPercentageOrder
- offsetBySpend
- offsetByStoreRevenue
- offsetPerOrder
- offsetPerProduct
- byPercentageOfPaidInvoice
- byPercentageOfRevenue
- bySpendOfPaidInvoice
- byTieredSpendOfPaidInvoice
- perPaidInvoice
- offsetPerSubscription
- offsetPerReview
- perCompletedForm
- perSelectedAnswer
- customerCartContribution
isTriggerCustom: false
schedule: null
isScheduleCustom: false
settings:
from:
name: null
domain: null
alias: '{{{ sellerName }}} x Greenspark'
isAliasCustom: false
subject: Your {{{type}}} with {{{sellerName}}} {{{impactsTextPast}}}. Track your
impact here.
isSubjectCustom: false
preheader: Activate your Greenspark dashboard & grow your impact today.
isPreheaderCustom: false
schedule:
startDate: '2026-05-26T14:06:53.231Z'
endDate: null
isEndDateCustom: false
content:
headerImage: http://res.cloudinary.com/dlilerh6s/image/upload/v1670515295/templates/abgf9boicpxujispedpy.png
isHeaderImageCustom: false
body: 'Hi {{{ firstName }}},
Thanks so much for your
{{{sellerName}}} {{{ type }}}!
Did you know that {{{sellerName}}} has partnered with Greenspark to {{{ impactsTextPresent }}} in your
name?
Check out your unique digital certificate showcasing
the impact your {{{ type }}} has created below.
If you’d like to learn
about the story behind your impact, see where it’s taking place, and gain deeper
insight into what it means for the planet you can activate your personalised Greenspark
dashboard. It’s completely free as a gift from us to you. Follow the link below
to discover more!
Many thanks,
{{{sellerName}}} &
Greenspark
'
isBodyCustom: false
isFooterHidden: false
isFooterHiddenCustom: false
isTotalImpactHidden: false
isTotalImpactHiddenCustom: false
statuses:
- status: disabled
initiatedAt: '2026-05-26T14:06:53.231Z'
initiatedBy: system
- accountId: ''
isCustom: false
type:
name: Customer update
template: update
trigger:
- byLoyaltyPoints
- offsetByPercentageOrder
- offsetBySpend
- offsetByStoreRevenue
- offsetPerOrder
- offsetPerProduct
- byPercentageOfPaidInvoice
- byPercentageOfRevenue
- bySpendOfPaidInvoice
- byTieredSpendOfPaidInvoice
- perPaidInvoice
- offsetPerSubscription
- offsetPerReview
- perCompletedForm
- perSelectedAnswer
- customerCartContribution
isTriggerCustom: false
schedule: null
isScheduleCustom: false
settings:
from:
name: null
domain: null
alias: '{{{ sellerName }}} x Greenspark'
isAliasCustom: false
subject: Your {{{type}}} with {{{sellerName}}} {{{impactsTextPast}}}. Track your
impact here.
isSubjectCustom: false
preheader: Login to your Greenspark dashboard.
isPreheaderCustom: false
schedule:
startDate: '2026-05-26T14:06:53.231Z'
endDate: null
isEndDateCustom: false
content:
headerImage: http://res.cloudinary.com/dlilerh6s/image/upload/v1670515295/templates/abgf9boicpxujispedpy.png
isHeaderImageCustom: false
body: 'Hi {{{ firstName }}},
Thanks again
for your {{{ type }}}! {{{sellerName}}} have partnered with Greenspark to {{{ impactsTextPresent
}}} in your name. Login
to your dashboard to track the impact of your actions.
'
isBodyCustom: false
isFooterHidden: false
isFooterHiddenCustom: false
isTotalImpactHidden: false
isTotalImpactHiddenCustom: false
statuses:
- status: disabled
initiatedAt: '2026-05-26T14:06:53.231Z'
initiatedBy: system
- accountId: ''
isCustom: false
type:
name: Customer nudge
template: nudge
trigger: null
isTriggerCustom: false
schedule:
- 3
- 7
- 14
isScheduleCustom: false
settings:
from:
name: null
domain: null
alias: Greenspark Team
isAliasCustom: false
subject: Your Greenspark invitation is waiting!
isSubjectCustom: false
preheader: Claim your Greenspark dashboard.
isPreheaderCustom: false
schedule:
startDate: '2026-05-26T14:06:53.231Z'
endDate: null
isEndDateCustom: false
content:
headerImage: http://res.cloudinary.com/dlilerh6s/image/upload/v1670515295/templates/abgf9boicpxujispedpy.png
isHeaderImageCustom: false
body: 'Hi {{{ firstName }}},
Your Greenspark invitation is waiting.
Claim your dashboard to track your overall impact from your purchases, reviews
and newsletter signups with participating Greenspark retailers.
'
isBodyCustom: false
isFooterHidden: false
isFooterHiddenCustom: false
isTotalImpactHidden: false
isTotalImpactHiddenCustom: false
statuses:
- status: disabled
initiatedAt: '2026-05-26T14:06:53.231Z'
initiatedBy: system
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Fetch Templates Defaults
tags:
- Email
/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: 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.
example:
- type: carbon
amount: 30
- 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 Total Impact By Type Report
tags:
- Reports
/v1/reports/total-impacts-count:
get:
description: Fetch the total number of impacts.
operationId: fetchTotalImpactsCount
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: object
properties:
value:
type: number
description: The total number of impacts.
example:
- value: 116
'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 Impacts Count
tags:
- Reports
/v1/reports/total-spend-on-impacts:
get:
description: Fetch the Array of total spending on impacts per currency.
operationId: fetchTotalSpendOnImpacts
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: $58.27
'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 Spend On Impacts
tags:
- Reports
/v1/reports/trees-by-interval:
get:
deprecated: true
description: Fetch the Array of spending on impacts of trees per month.
operationId: fetchTreesByInterval
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: trees
amount: 10
month: 2022-09
- type: trees
amount: 29
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 Trees By Interval
tags:
- Reports
/v2/widgets/full-width-banner:
post:
summary: Full width banner v2
description: Fetching a banner which displays the user's top stats
operationId: full-width-banner-v2
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- options
properties:
options:
type: array
description: 'Add the following values to display the corresponding data on the banner
: "monthsEarthPositive" | "trees" | "plastic" | "carbon" | "kelp" | "straws" | "miles"
| "footballPitches"'
items:
type: string
imageUrl:
type: string
description: Customize the banner's background image with an URL
title:
type: string
description: If a title exists, it will be displayed at the top of the banner
description:
type: string
description: If a description exists, it will be displayed at the top of the banner
or, if a title also exists, it will be displayed below the title
callToActionUrl:
type: string
description: Adds a button with the "Learn more" call to action, that redirects the
user to the specified URL
textColor:
type: string
description: Changes the color of every text and icon content in the banner. Must be
an hexadecimal color.
buttonBackgroundColor:
type: string
description: If `callToActionUrl` is no empty, it sets the background color of the call
to action button. Must be an hexadecimal color.
buttonTextColor:
type: string
description: If `callToActionUrl` is no empty, it sets the background color of the call
to action button. Must be an hexadecimal color.
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
x-readme:
code-samples:
- language: text
code: "{\n\toptions: ['monthsEarthPositive', 'trees', 'carbon', 'plastic']\n}"
samples-languages:
- text
tags:
- Widgets
/widgets/full-width-banner:
post:
summary: Full width banner
description: Fetching a banner which displays the user's top stats
operationId: full-width-banner
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- options
properties:
options:
type: array
description: 'Add the following values to display the corresponding data on the banner
: "monthsEarthPositive" | "trees" | "plastic" | "carbon" | "straws" | "miles" | "footballPitches"'
items:
type: string
imageUrl:
type: string
description: Customize the banner's background image with an URL
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
x-readme:
code-samples:
- language: text
code: "{\n\toptions: ['monthsEarthPositive', 'trees', 'carbon', 'plastic']\n}"
samples-languages:
- text
tags:
- Widgets
/v1/accounts/community:
get:
description: Fetches the Greenspark community public profile. Callable via ReadMe MCP execute-request
when this route is enabled in ReadMe MCP route toggles.
operationId: getCommunityPublicAccount
parameters: []
responses:
'200':
description: The Greenspark community's public information is fetched.
content:
application/json:
schema:
$ref: '#/components/schemas/CommunityAccount'
'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).
'404':
description: Not found.
security:
- access-key: []
summary: Community Public Account
tags:
- Account
/v1/impacts/purchases/{purchaseId}:
get:
description: Public impact purchase ledger entry. Callable via ReadMe MCP execute-request when this
route is enabled in ReadMe MCP route toggles. [Read more about the domain object here.](https://greenspark.readme.io/reference/impacts)
operationId: getImpactPurchase
parameters:
- name: purchaseId
required: true
in: path
description: The id of the purchase.
schema:
example: 34d41293-6b84-40e7-9744-122e301590a2
type: string
responses:
'200':
description: Public ledger of impact purchases are successfully fetched.
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionPurchase'
'400':
description: Bad request.
'404':
description: Not found.
security:
- access-key: []
summary: Fetch Impact Purchase
tags:
- Impacts
/v1/impacts/purchases:
get:
description: Public impact purchase ledger. Callable via ReadMe MCP execute-request when this route
is enabled in ReadMe MCP route toggles. [Read more about the domain object here.](https://greenspark.readme.io/reference/impacts)
operationId: getImpactPurchases
parameters:
- name: origin
required: true
in: header
schema:
type: string
responses:
'200':
description: Public ledgers of impact purchases are successfully fetched.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/TransactionPurchase'
'400':
description: Bad request.
'404':
description: Not found.
security:
- access-key: []
summary: Fetch Impact Purchases
tags:
- Impacts
/v1/projects/{projectId}:
get:
description: Fetch detailed project information. Accepts all standard API key types. Callable via
ReadMe MCP execute-request when this route is enabled in ReadMe MCP route toggles.
operationId: getProject
parameters:
- name: projectId
required: true
in: path
description: The id of the project.
schema:
example: 34d41293-6b84-40e7-9744-122e301590a2
type: string
responses:
'200':
description: The project is successfully fetched.
content:
application/json:
schema:
$ref: '#/components/schemas/ProjectDetails'
'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 project by id
tags:
- Projects
/v1/project-categories:
get:
description: List impact project categories. Accepts all standard API key types. Callable via ReadMe
MCP execute-request when this route is enabled in ReadMe MCP route toggles.
operationId: getProjectCategories
parameters:
- name: type
required: false
in: query
description: The type of the impact which can by purchased by the project category.
schema:
example: carbon
type: string
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
responses:
'200':
description: The project categories are successfully fetched.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ProjectCategory'
'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 project categories
tags:
- Projects
/v1/projects:
get:
description: List impact projects available to the account. Accepts all standard API key types.
Callable via ReadMe MCP execute-request when this route is enabled in ReadMe MCP route toggles.
operationId: getProjects
parameters:
- name: country
required: false
in: query
description: Defines a country where the project is located.
schema:
example: India
type: string
- name: projectCategoryId
required: false
in: query
description: Defines the category that the project falls under. It links the project to its relevant
category.
schema:
example: 256d3c28-e9c3-4a47-a5a8-63b7634ac5bd
type: string
- name: type
required: false
in: query
description: The type of the impact which can by purchased by the project category.
schema:
example: carbon
type: string
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
- name: vintage
required: false
in: query
description: The year when the project started.
schema:
example: 2020
type: number
- name: currency
required: false
in: query
description: The currency in which the project prices are returned. Returns in the account's currency
for an authenticated call, otherwise in USD if it's not provided.
schema:
example: USD
type: string
- name: lng
required: false
in: query
description: The locale what the project is returned in.
schema:
example: en
type: string
- name: plan
required: false
in: query
description: The subscription plan to fetch the project prices for.
schema:
example: growthBusiness
type: string
enum:
- free
- ecommerce
- ECOMMERCE
- freeBusiness
- starterBusiness
- growthBusiness
- premiumBusiness
- enterpriseBusiness
- starterBusinessYearly
- growthBusinessYearly
- premiumBusinessYearly
- personal
- plasticHeroPersonal
- earthHero
- positiveFamilyAdult
- positiveFamilyChild
- positiveFamilyPet
- earthPositiveFamilyAdult
- earthPositiveFamilyChild
- earthPositiveFamilyPet
- name: statuses
required: false
in: query
description: Comma separated list of the project statuses. Default to approved.
schema:
example: active
type: string
enum:
- approved
- deprecated
responses:
'200':
description: The projects are successfully fetched.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Project'
'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 projects
tags:
- Projects
/v1/accounts/public/{publicAccountId}:
get:
deprecated: true
description: Deprecated — use getPublicAccountV2 (GET /v2/accounts/public/{publicAccountId}).
operationId: getPublicAccount
parameters:
- name: publicAccountId
required: true
in: path
description: The public id of an account.
schema:
type: string
responses:
'200':
description: The account's public information is fetched.
content:
application/json:
schema:
$ref: '#/components/schemas/PublicAccount'
'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).
'404':
description: Not found.
security:
- access-key: []
summary: Public Account
tags:
- Account
/v2/accounts/public/{publicAccountId}:
get:
description: Canonical public account endpoint. Returns impacts and comparisons by project. Accepts
all standard API key types. Callable via ReadMe MCP execute-request when this route is enabled
in ReadMe MCP route toggles.
operationId: getPublicAccountV2
parameters:
- name: publicAccountId
required: true
in: path
description: The public id of an account.
schema:
type: string
responses:
'200':
description: The account's public information is fetched.
content:
application/json:
schema:
$ref: '#/components/schemas/PublicAccountV2'
'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).
'404':
description: Not found.
security:
- access-key: []
summary: Public Account V2
tags:
- Account
/v2/widgets/per-order-widget:
post:
summary: Per order widget v2
description: Fetching a widget that describes a given store’s per order impact settings.
operationId: per-order-widget-v2
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- integrationSlug
- color
properties:
integrationSlug:
type: string
description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
default: YOUR-SHOP-NAME
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black" | "grey" | "transparent"'
default: green
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
default: false
style:
type: string
description: 'Select if you want the default style (displayed above) or if you want
a simplified version. Current options include: "default" | "simplified"'
default: default
popupTheme:
type: string
description: Selects the color theme for the popup. Only applies if `withPopup` is set
to `true`
default: light
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/widgets/per-order-widget:
post:
summary: Per order widget
description: Fetching a widget that describes a given store’s per order impact settings.
operationId: per-order-widget
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- shopUniqueName
- color
properties:
shopUniqueName:
type: string
description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
default: YOUR-SHOP-NAME
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black"'
default: green
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
default: false
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/v2/widgets/per-product-widget:
post:
summary: Per product widget v2
description: Fetching a widget that describes a given store’s impact settings for a selected product.
operationId: per-product-widget-v2
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- integrationSlug
- color
- productId
properties:
integrationSlug:
type: string
description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
default: YOUR-SHOP-NAME
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black" | "grey" | "transparent"'
default: green
productId:
type: string
description: Specify the ID of your product.
default: PRODUCT ID
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
default: false
style:
type: string
description: 'Select if you want the default style (displayed above) or if you want
a simplified version. Current options include: "default" | "simplified"'
default: default
popupTheme:
type: string
description: Selects the color theme for the popup. Only applies if `withPopup` is set
to `true`
default: light
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/widgets/per-product-widget:
post:
summary: Per product widget
description: Fetching a widget that describes a given store’s impact settings for a selected product.
operationId: per-product-widget
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- shopUniqueName
- color
- productId
properties:
shopUniqueName:
type: string
description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
default: YOUR-SHOP-NAME
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black"'
default: green
productId:
type: string
description: Specify the ID of your product.
default: PRODUCT ID
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
default: false
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/v2/widgets/spend-level-widget:
post:
summary: Spend level widget v2
description: Fetching a widget that describes a given store’s spend level impact settings.
operationId: spend-level-widget-v2
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- integrationSlug
- color
- currency
properties:
integrationSlug:
type: string
description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
default: YOUR-SHOP-NAME
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black" | "grey" | "transparent"'
default: green
currency:
type: string
description: 'This is the customer or shop currency. For example: "USD" | "GBP" | "EUR"
| "AUD" | "NZD"'
default: USD
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
default: false
style:
type: string
description: 'Select if you want the default style (displayed above) or if you want
a simplified version. Current options include: "default" | "simplified"'
default: default
popupTheme:
type: string
description: Selects the theme for the popup. Only applies if `withPopup` is set to
true
default: light
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/widgets/spend-level-widget:
post:
summary: Spend level widget
description: Fetching a widget that describes a given store’s spend level impact settings.
operationId: spend-level-widget
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- shopUniqueName
- color
- currency
properties:
shopUniqueName:
type: string
description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
default: YOUR-SHOP-NAME
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black"'
default: green
currency:
type: string
description: 'This is the customer or shop currency. For example: "USD" | "GBP" | "EUR"
| "AUD" | "NZD"'
default: USD
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
default: false
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/v1/email/templates/test:
post:
description: Add your notification template for email sending.
operationId: testTemplate
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TestNotificationTemplateRequestDto'
responses:
'200':
description: Test email has been successfully sent.
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Test Template
tags:
- Email
/v2/widgets/tiered-spend-level-widget:
post:
summary: Tiered spend level widget v2
description: Fetching a widget that describes a given store’s tiered spend level impact settings.
operationId: tiered-spend-level-widget-v2
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- integrationSlug
- color
- currency
properties:
integrationSlug:
type: string
description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
default: YOUR-SHOP-NAME
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black" | "grey" | "transparent"'
default: green
currency:
type: string
description: 'This is the customer or shop currency. For example: "USD" | "GBP" | "EUR"
| "AUD" | "NZD"'
default: USD
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
default: false
style:
type: string
description: 'Select if you want the default style (displayed above) or if you want
a simplified version. Current options include: "default" | "simplified"'
default: default
popupTheme:
type: string
description: Selects the color theme for the popup. Only applies if `withPopup` is set
to `true`
default: light
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/widgets/tiered-spend-level-widget:
post:
summary: Tiered spend level widget
description: Fetching a widget that describes a given store’s tiered spend level impact settings.
operationId: tiered-spend-level-widget
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- shopUniqueName
- color
- currency
properties:
shopUniqueName:
type: string
description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
default: YOUR-SHOP-NAME
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black"'
default: green
currency:
type: string
description: 'This is the customer or shop currency. For example: "USD" | "GBP" | "EUR"
| "AUD" | "NZD"'
default: USD
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
default: false
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/v2/widgets/stats-widget:
post:
summary: Top stats widget v2
description: Fetching a widget that shows the overall stats of a given Greenspark account. Please
note that any impacts with 0 value are automatically hidden from the widget.
operationId: top-stats-widget-v2
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- color
properties:
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black" | "grey" | "transparent"'
default: green
withPopup:
type: boolean
description: Adds a popup for the response, triggered by clicking on the widget
popupTheme:
type: string
description: Selects the color theme for the popup. Only applies if `withPopup` is set
to `true`
default: light
impactTypes:
type: array
description: Impacts to display in the top stats list. Available options are 'trees',
'plastic', 'carbon', 'kelp' and 'water'.
items:
type: string
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/widgets/stats-widget:
post:
summary: Top stats widget
description: Fetching a widget that shows the overall stats of a given Greenspark account. Please
note that any impacts with 0 value are automatically hidden from the widget.
operationId: top-stats-widget
parameters:
- name: lng
in: query
description: 'Set the widget''s language. Currently supported languages are: English (en), German
(de)'
schema:
type: string
default: en
requestBody:
content:
application/json:
schema:
type: object
required:
- color
properties:
color:
type: string
description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
| "white" | "black"'
default: green
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Widgets
/v1/email/domains/{domainId}/verify:
post:
deprecated: true
description: Deprecated — redirects to v2. Use verifyDomainV2.
operationId: verifyDomain
parameters:
- name: domainId
required: true
in: path
description: The id of the custom domain object.
schema:
example: 63c5857475784b9acf05c919
type: string
responses:
'200':
description: Domain has been successfully verified.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomDomainDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Verify Domain
tags:
- Email
/v2/email/domains/{domainId}/verify:
post:
description: Verify your domain based on the provided DNS records.
operationId: verifyDomainV2
parameters:
- name: domainId
required: true
in: path
description: The id of the custom domain object.
schema:
example: 63c5857475784b9acf05c919
type: string
responses:
'200':
description: Domain has been successfully verified.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomDomainDto'
'400':
description: Bad request.
'401':
description: Provide your API key.
'403':
description: Please upgrade to a growth, premium or enterprise plan.
'404':
description: Not found.
security:
- access-key: []
summary: Verify Domain
tags:
- Email
components:
schemas:
RecordDto:
type: object
properties:
valid:
type: boolean
description: The indicator of the DNS record validity.
example: false
type:
type: string
description: The type of the record that must be added to your domain.
example: cname
host:
type: string
description: The type of the record that must be added to your domain.
example: em43944.example.com
data:
type: string
description: The value of the record that must be added to your domain.
example: u250887955.wl0466.sendgrid.net
required:
- valid
- type
- host
- data
DnsDto:
type: object
properties:
mailCname:
description: Record that must be added to your domain.
allOf:
- $ref: '#/components/schemas/RecordDto'
dkim1:
description: Record that must be added to your domain.
allOf:
- $ref: '#/components/schemas/RecordDto'
dkim2:
description: Record that must be added to your domain.
allOf:
- $ref: '#/components/schemas/RecordDto'
required:
- mailCname
- dkim1
- dkim2
CustomDomainDto:
type: object
properties:
id:
type: string
description: The id of the custom domain object.
example: 63c5857475784b9acf05c919
domain:
type: string
description: The domain name.
example: example.com
dns:
description: This object contains the DNS records that must be added to your domain.
example:
mailCname:
valid: false
type: cname
host: em43944.example.com
data: u250887955.wl0466.sendgrid.net
dkim1:
valid: false
type: cname
host: s1._domainkey.example.com
data: s1.domainkey.u250887955.wl0466.sendgrid.net
dkim2:
valid: false
type: cname
host: s2._domainkey.example.com
data: s2.domainkey.u250887955.wl0466.sendgrid.net
allOf:
- $ref: '#/components/schemas/DnsDto'
valid:
type: boolean
description: The indicator of the DNS records validity.
example: false
required:
- id
- domain
- dns
- valid
CustomDomainRequestBody:
type: object
properties:
domain:
type: string
description: The domain name.
example: example.com
required:
- domain
TypeDto:
type: object
properties:
isScheduleCustom:
type: boolean
description: Boolean flag indicates customized schedule.
example: 'false'
isTriggerCustom:
type: boolean
description: Boolean flag indicates customized trigger.
example: 'false'
name:
type: string
description: Name of the template
example: Customer invitation template
schedule:
description: Sets how many days after an impact creation a signup nudging email is sent out
to your customer.
example: '[3, 7, 14]'
type: array
items:
type: string
template:
type: object
description: The type of the template.
example: invitation
trigger:
description: Choose the impact action which triggers your email to be sent out.
example: '["offsetPerOrder", "offsetPerProduct"]'
type: array
items:
type: string
required:
- isScheduleCustom
- isTriggerCustom
- name
- schedule
- template
- trigger
EmailDto:
type: object
properties:
domain:
type: string
description: The domain name used for sending emails based on this template.
example: get-greenspark.com
name:
type: string
description: The name part of the email address.
example: hello
required:
- domain
- name
ScheduleDto:
type: object
properties:
endDate:
format: date-time
type: string
description: The end date of the scheduled email sending.
example: '2023-03-08T13:26:33.969Z'
isEndDateCustom:
type: boolean
description: Boolean flag indicates customized schedule end date.
example: 'false'
startDate:
format: date-time
type: string
description: The start date of the scheduled email sending.
example: '2023-02-08T13:26:33.969Z'
required:
- endDate
- isEndDateCustom
- startDate
SettingsDto:
type: object
properties:
alias:
type: string
description: This is the name display for the specified sender email address.
example: Greenspark
from:
description: The email address used for sending emails.
allOf:
- $ref: '#/components/schemas/EmailDto'
isAliasCustom:
type: boolean
description: Boolean flag indicates customized alias.
example: 'false'
isPreheaderCustom:
type: boolean
description: Boolean flag indicates customized preheader.
example: 'false'
isSubjectCustom:
type: boolean
description: Boolean flag indicates customized subject.
example: 'false'
preheader:
type: string
description: The preheader is the text following the subject line when an email is previewed.
example: Activate your Greenspark dashboard & grow your impact today.
schedule:
description: You can choose to send your template continuously starting at the selected start
date or only during a specific date range.
allOf:
- $ref: '#/components/schemas/ScheduleDto'
subject:
type: string
description: Your subject line is one of the first things that your customers read and is a
key driver in successful open rates.
example: Your {{type}} with {{sellerName}} {{impactsTextPast}}. Track your impact here.
required:
- alias
- from
- isAliasCustom
- isPreheaderCustom
- isSubjectCustom
- preheader
- schedule
- subject
ContentDto:
type: object
properties:
body:
type: string
description: Use our pre-defined email body or customise it to fit your brand. Add dynamic data
by using the variables provided.
example: Thanks so much for your order!
headerImage:
type: string
description: Add your own logo to the top of the email or use our pre-defined header image.
If you use your own header image please ensure it is maximum 1370 x 700, or has a 2:1 aspect
ratio.
example: http://res.cloudinary.com/dlilerh6s/image/upload/v1670515295/templates/abgf9boicpxujispedpy.png
isBodyCustom:
type: boolean
description: Boolean flag indicates customized body.
example: 'false'
isFooterHidden:
type: boolean
description: Hide our email footer explaining the benefits of Greenspark.
example: 'false'
isFooterHiddenCustom:
type: boolean
description: Boolean flag indicates customized hidden footer setting.
example: 'false'
isHeaderImageCustom:
type: boolean
description: Boolean flag indicates customized header image.
example: 'false'
isTotalImpactHidden:
type: boolean
description: Hide your total impact so far within your emails.
example: 'false'
isTotalImpactHiddenCustom:
type: boolean
description: Boolean flag indicates customized hidden total impact setting.
example: 'false'
required:
- body
- headerImage
- isBodyCustom
- isFooterHidden
- isFooterHiddenCustom
- isHeaderImageCustom
- isTotalImpactHidden
- isTotalImpactHiddenCustom
NotificationTemplateResponseDto:
type: object
properties:
id:
type: string
description: The id of the template.
example: 63e3a30d093df17fa11c1fbe
isCustom:
type: boolean
description: Boolean flag indicates customized template.
example: 'false'
type:
$ref: '#/components/schemas/TypeDto'
settings:
$ref: '#/components/schemas/SettingsDto'
content:
$ref: '#/components/schemas/ContentDto'
required:
- id
- isCustom
- type
- settings
- content
TypeRequestBody:
type: object
properties:
name:
type: string
maxLength: 200
description: Name of the template
example: Customer invitation template
template:
type: string
enum:
- invitation
- update
- nudge
description: The type of the template.
example: invitation
trigger:
description: Choose the impact action which triggers your email to be sent out.
example: '["offsetPerOrder", "offsetPerProduct"]'
type: array
items:
type: string
schedule:
description: Sets how many days after an impact creation a signup nudging email is sent out
to your customer.
example: '[3, 7, 14]'
type: array
items:
type: integer
maximum: 365
minimum: 0
required:
- name
- template
- trigger
- schedule
EmailRequestBody:
type: object
properties:
name:
type: string
maxLength: 200
description: The name part of the email address.
example: hello
domain:
type: string
maxLength: 200
description: The domain name used for sending emails based on this template.
example: get-greenspark.com
required:
- name
- domain
ScheduleRequestBody:
type: object
properties:
startDate:
format: date-time
type: string
description: The start date of the scheduled email sending.
example: '2023-02-08T13:26:33.969Z'
endDate:
format: date-time
type: string
description: The end date of the scheduled email sending.
example: '2023-03-08T13:26:33.969Z'
required:
- startDate
- endDate
SettingsRequestBody:
type: object
properties:
from:
description: The email address used for sending emails.
allOf:
- $ref: '#/components/schemas/EmailRequestBody'
alias:
type: string
maxLength: 200
description: This is the name display for the specified sender email address.
example: Greenspark
subject:
type: string
maxLength: 200
description: Your subject line is one of the first things that your customers read and is a
key driver in successful open rates.
example: Your {{type}} with {{sellerName}} {{impactsTextPast}}. Track your impact here.
preheader:
type: string
maxLength: 200
description: The preheader is the text following the subject line when an email is previewed.
example: Activate your Greenspark dashboard & grow your impact today.
schedule:
description: You can choose to send your template continuously starting at the selected start
date or only during a specific date range.
allOf:
- $ref: '#/components/schemas/ScheduleRequestBody'
required:
- from
- alias
- subject
- preheader
- schedule
ContentRequestBody:
type: object
properties:
headerImage:
type: string
maxLength: 50000
description: Add your own logo to the top of the email or use our pre-defined header image.
If you use your own header image please ensure it is maximum 1370 x 700, or has a 2:1 aspect
ratio. You can upload it as a base 64 encoded image.
example: iVBORw0KGgoAAAANSUhEUgAAAYQAAACoCAYAAADgpJkqAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TpSIVBQuKOGSoThb8Qhy1CkWoEGqFVh1MLv0QmjQkKS6OgmvBwY/FqoOLs64OroIg+AHi6uKk6CIl/i8ptIjx4Lgf7+497t4BQq3ENKttFNB020wl4mImuyKGXiEghD70YExmljErSUn4jq97BPh6F+NZ/uf+HF1qzmJAQCSeYYZpE68TT23aBud94ggryirxOfGISRckfuS64vEb54LLAs+MmOnUHHGEWCy0sNLCrGhqxJPEUVXTKV/IeKxy3uKslSqscU/+wnBOX17iOs1BJLCARUgQoaCCDZRgI0arToqFFO3HffwDrl8il0KuDTByzKMMDbLrB/+D391a+YlxLykcB9pfHOdjCAjtAvWq43wfO079BAg+A1d601+uAdOfpFebWvQI6N4GLq6bmrIHXO4A/U+GbMquFKQp5PPA+xl9UxbovQU6V73eGvs4fQDS1FXyBjg4BIYLlL3m8+6O1t7+PdPo7wdjx3KhiS3EigAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAN1wAADdcBQiibeAAAAAd0SU1FB+cCCAAIOwEzmTkAABQ8SURBVHja7d17eJxVnQfw7+/M5NKEliDI1lpaWuVi61IgQGlmohHYIuyj3AwKpclYNMLysBaaS/VZdXZXbJukXFYFjBaalEXWwPMgysMu22KFZALVqiiiBWzBYr219kKTJpl539/+QRBZcnsnk5lzJt/Pn8m8M2fO+T3nO+e9AkRERAAk3Q2rVsbKkoX4BKAfAvAeqKQAfcokvVufuv2+37NriYjSmFvj1UelekuvVOh5EJwqCk8V27ywrH967caXrQqEcz5Xc2w4Zb4gqtdCcNQwL/mDql6eaO3o4dASEY3P4huXzQgXhVdDcD2AsmFesl+BTyRa2h/PeSBUxavCqb65K1RxC4Djxnh5LyRU3t18zw4OMxHRKOJxE+3ddY0C6wDMHOPVSVG/sqt10zM5C4RoQ+zDCr0NwKkB3vvHB0r7Ir+Mdw5yxImI3i7SEKuE6B1QnBFg1n6h1PfPfLx1U2+m2xMedQnz+U/9XTiZvEuhl6Xx3meV9ZV+FkALh52I6E1VK2NlyQK9A9Dl0IC77hUn94n5IoCmrK0QljTF/t74+vg4ljCjOaTqn5Ro3fQnlgAREVDRUPseATYDOHECbzOgwMJES/tvMtk2M2x6NcRmZiAMAGCGiLmFJUBE9PrKQIDHJxgGAFAkk7D3ZdhASEK/loEweMOK6KracpYCEU11gwW6DsD8DL3dZZHG2D9MaiBUrvrkAgCXZ/QzRP8DE7jmgYjIdZUrr3mXACsy+qaqt5fX1RVMWiD4xv94pidvFamoqK9ZxpIgoqnKKwh/DGOcyJOGBcUzBm+YtEAAcMVkdIaIrKuKVx/FsiCiKWpS5laIfqmifvnxGQ+E8nhdCYAFk9QZswZ7S7/MmiCiqUigZ07SW5eJmFszHghFh4/MxyTu6xfojdGmmihLg4imkqqG2EwA0yfxI5ZV1NdcktFAEGPmT3K/GPjStuSm6mksESKaKgaMTPbcCiPytejqq4/JXCAoSie70Qq8z4RLbmWJENFUYVSzMbfO1lT4WxkLBF81lKX+uS7SUPNxlgkRTQWiyM7cKnJ5tLG2LiOBYERMFrvo7ujNNSezVIgo3+kIFwFPymcpbk/3YuC3NFJFDmexj8o0hEeqVsbKWC5ElNeB4Gs259ZpavBIpHHFrIkFgqd7s7yQOiVZqPdVV1eHWDJElK8kjH1Z/shZUO87F914Y1HagZCDRgOKf9wzt3QDeGsLIspTqVDB3hx8bORg8aEHquJV4746+i2B0I+iV3MTn1obaYjxojUiyktzXjy4F0B/1qdW4NLB3rlfH+8P7rfsqvl99/aBOZHTrweQi1tMVJ5Qsei13Yln+SxmIsorzz//vM6JnH4VgOOz/dkClM+pOL1wd+LZLYFWCENeyFWnicj6aEPtv7B8iCgP5WxuheBzkfqa5nQCYUcue0yBf6+oj61l7RBRftGczq0QaYg21N6JUXYfWRcIr7dbmyL1tV8BDzQTUb7EAcyO3LcB10caYnchHjfjCwTJ4bLmbUuc2L0L49WFLCUicj4QjLxgSUs+U9G766Ghu1uPHgiS0l9b04OitWW90x7jxWtE5DrPeDtsaYsAlxb3DmwdugvryIHQNWP+SwAO2NONcl6yQLvPXR07kSVFRK7atqZjH4CdFjXp7CS0Z+ixycMHAuJxH8DTlvXlgpCnPUturjmDZUVEDktY1p4TfeN3RxpilcMHAgCoJCzsyJmhkPygsqE2wpoiIheJqI3XWZUJ9BsjBoIfki02dqYCRyvwaEX98veztIjIOSlstnNuVTNiIMzeefgZAPttDQUR891I44rprC4icknXrR0vwK7jCG8xbCB0dnZ6othicb/OF6TWs7yIyEGPOxUIQ0uIzTb3qKp8ekljzTmsLSJyiYpa+2N75EAQ2Wx7xxrIF1leROQSY1JbAHhOBUKipf03AHbZHbW4aHHjstksMSJyRdfa+/cD+KlTgTBki+V9a0J++HKWGBG5RNXOMzlHDwSVH9jesWLA6xKIyC2iTzgXCL7iJ/ZHLXhNAhE5JRXW7c4Fwuzf9r4IoNfyvp3J8iIil2xb07FPgFdta9eogdDZ2ekBeMXyvi1geRGRa9TCk3bMOJr9B8v7tY+lRUQOsm5uHTMQFGL3hKt4kXVFRO4tEeybW8cMBIGeZHWnCn7NyiIi54i+16lAiDTGzgXkFMs79VlWFhG5ZMnqa94L4Fy3Vgjqf8H6VZdX8D2WFxG5xHihLwAIORMIFQ21VwBysd2rA/w0sX7DKywvInJFtL7mAgDLrQyqYRvcVDNHgG9a37O+dLC8iMgVVauuOk5FNgIQJwKhKh4rVl8eBHCM5X37Wn+o8F6WGBG5oLq6OpSSovsAvNvWNob//x+SvfoNAGdb37uCDdvXtR1kmRGRC/acWNIC6IU2t/EtK4RIfWwlgBoH+rYfCLWwxIjIBZH62NUAbrK9nX8NhGhTTRSi65zoXcHd3c337GGZEZHtok0rFkH0my601QBAVUNspvryEIBC+7MAB9X317DMiMh25U11R6vvPQygxJlASELvBHC8G10saxOtm/7EUiMi2xX7A60ATnSlvaaiPvYJAJc50t7XjpjCu1hmRGS7oesNrnWpzUZEP+tOc+V+nllERLYrj9eVqMg3Yen1BsPMrc8Br+8yCrnSyaL+gyw1IrJd0eH+6+DQriJVefCNQHBF75FDxT9kqRGR1auDuroCEWlwqMn+QKjwMacCQYBfbm9rS7LciMjq1cGM/ovh1qN9d72xK96ZQFDgeZYaEVn/41VwpWNN/uvc6lAgCA8mE5ELkVDpWIMPOhcIRuCx0IjIZpUrr3kXgBOcarSK594KQf2ZLDcispkXCs92bj3zN8c7XDrLqJzlRkR2T67+ca61WUXPdDAQ5KRI44pZLDkislbIpBxs9TsjTbULXVshGCB1HSuOiGzli/S62G715J9cCwRA5ebo6hXzWXZEZCPPeDtcbLeIf757gQCU+p7XWd5UdzRLj4hss21Nxz4Av3G1/a4FAgQ4s9gf/J/o6quPYfkRkXUU32EgZLfHF6tX0MWDzERk3eyk4W8A6GcgZNcCVW9rxapr57IEicgWifUbXlHVtW4GgsDZp48JcJKY1H8vuenad7AMicgW737lyJcBbHYuEJIhrQXwM4f7/lQTTj1cFY8VswyJyAadnZ1eQWnfZVB0ORUI29Z07IOEPgDgew73f+XgYb+NZUhEttga7zw8Y2DGBVBpd6XNIQDY3f3Twd1LL/uvuckD0wBEXOx8EVl0QuT053Ynnv0VS5GIbPDStm3e7sTPHp4bOWMAwHmw95Ga+3Ynnv3amweV43G/q6W9SYCrARxxMhSAO6tWXXUcy5CIbNLVsnGtKj4K4JDN7TRvb3j7tyFyCdw8ber4pClsYfkRkW0Sre2Pio/zAOx3JhAAoLt54/8K8BlH+335klWxU1l+RGTdSmF9+3ZVLHcqEIZWCptcO0I+JGSMfpalR0S2rhQA+a5TgQBA1eAeR/t82dL65aUsPSKykSg2uBYIgK+/drS/px+GXMCyIyIrJ16BlXOrGf2fpsjdDpcLWXZEZKOkgZUX0o6+QhB/kasdrsDZLDsisnLiVT3NtUAQhVzjcJ8vZNkRkY3EFyvPNBoxEKKNsWsAnOVwn0/jMxOIyDbRhtiHVdTKXdrDBkJF/fL3q+rX3e/6YgYCEVnj3NWxExVq7b2N3hYIFQ2x00XMEwCmu975HgYNS5CIrFgZ3FxzcsjTJwEc70QgLGn6ZIVAnwDwznwYAEkWJVmGRJRrlfU1p2lIfgjgBJvb+ddAiDbGlhvf3wwgb3azqH/oTyxFIsqlSH3tlb5IAsBM29saXhivLizrLblDVa/Ls3HY33Nb5xGWIxHlQnV1deh3c0tvgWgj7L3t9VsDoay35H4AV+TheDzPkiSiXDjnczXH7knJ/QJd6lK7wwDm5OOACPBzliURZVtlfc1pfkoeBjDPtbaH83VQfJUnWZpElE0Vq2Jn+6KPATjWxfbn7WmZYgwDgYiytzJoWP5BMbrF1TDI50D4cXfzPXtYokSUDdGmFYt8mEfh+PVbeRkICnSyRIkoG8rjdSXqew8BcP4ZLPkYCL4fku+wTIkoG6b1DXwewHvy4bvkYyB8/+m1G19mmRLRZIs0rpiuihvy5fvkXSCI6ldZpkSUFb53EYAyBoKNFF1drR2bWaVElKVfoNF8+jp5FQhGsJoVSkTZywNzMgPBTvc91dLezRIloiwmQl7d6SFfAmGfqr+K1UlE2aQOX4SWt4EgkOsTrZt4q2siyrbSfPoyzt/LSIG27paNvBCNiPijeop/mR5N9a1kTRJRjgwwEOywU9W/lA/BIaIc2s9AyL194ulFPG5ARDmWVzfRdDEQ+lT1I123drzAWiSiXFLVnQyEnPU+DquajyRaO3pYikSUa2LML/Lkmyjg1llG+2Hk4kTzvU+zDInIimnUx49UXF/m4LDC3ODSCuGPRrWqu3kjw4CIrDF9YHoPAJdPbDngh8yFidZ7n3AlEJ6TUKjiqdaOn7P8iMgmj331qwMAXL2h5k5Vv7Jn3b2JN/5gdyAIHu03RdGutffsZOkRkY1U1bkHcimwJRnWcxKtm577278be/tY1nWXzPvo9nVtB1lyRGTt5OodeQjAPofCoG3gYNFF29Z0vK3NNh5U3ivQT3a3tn+fpUZEtuu5rfNIRX3sWyLaZHM7BTjoq1yXaN34wEivsW2F8ANIaFFXSwfDgIicYcKD6wDstbiJP/JC3lmjhYFNgdAvoqu7S+dd0N18zx6WFxG5pGvt/fsh+q8WNi0FyFf6DxZFetbe99JYL7Zhl1GPJ/61Tzdv+hXLiohcVVDy27uTvXOvB7DAkib9zMBc+1TLvT8Z90onh43tE9HVs17uq2QYEJHrtsa3piB+LYDBHDclqSrrDpT2LQ4SBrlbIQieDKl86snm9hdZRkSUL7qbN/042lhzk6p8PUdNeH2PS0t6P7KzvUI4AtFYd3N71ZMtGxkGRJR3upo77hSgOcsf60H0xu7SedGJ7HExALqy2OiCfil+GICybIgob0Ohpb0JwL9l8SNDIngE8bg/kTcx3S3tqwS6EkAqC40Ol+jgh1guRJTvulvavySCzyBLxxTUx9KJvocBoF0tHXcAch4Ek/6MAV/1QpYKEU2JlUJze5v4qIDqs5P9WaIy4bnVvJlmG58qKJFFAG4GMJlPIlvKMiGiKRMK69u39x8qPhuq1wnw6qStEATnV1dXhyYUKsP9cWG8uvCY3tJLFP6lACKAnIBhDkAL8KoCzwM4H8C4G+KHvJPGc5EEEVE+qYpXhZN9cy+G4jIAHwRwAoY/2/OPCjwnQAWAaeOf0WXJRB4TMK5HOyyMVxeW9U2f5yN1dMgTzxg5ZJL489bbNx4AgGhjTZuqfHr8bdYbupo77mR5ENFUVl5XV1D4jr658M07Qp54HqS3CAN7t67/9l4AiDTUrAFkdYC3/FJ3S3vaB7PHdR3CL+OdgwB2jPiL3yu4RUxqxXhXCapmKQAGAhFNadvb2pIARtxb4qcKWkw49c8ASsb5lksxgbObMnIdQmL9hlcAPDr+LfS88rq6ApYDEdHIem7b8BeFPhBgk8XlTXVH5zQQAACCIA+JmF40fWAJh5uIaIyfzybQA3jCxTp4fs4DoWBQHgUw7osixKCKQ01ENLrB/dOegOLw+BPET3tuzVggbL194wGo/iLAJpUcaiKi0W1va0uq4JnxbyFpz62ZvZeRyI8CvLqCxxGIiMYxtUKDzK2nRVdffYwFgYCdAV5dUlw2WM6hJiIanaoJMrcaeOFIzgNBfdkV7EvqBzjURERjTdT+rmBbpLfbKKOBIAYvB9yExxGIiMbghf1Ac6umObdmNBBS4fCugB9eOdF7bxAR5bvBv5S8AsALsMlZS+uXl+Y0EJ4pnP3ngCl29J5509/L4SYiGtnQFc0HA2xS8FoovCingTD0cIZA9/5WP3Uqh5uIaEz9QV4c8jXw3JrxR2gKcCRQA8S8j+NMRDSmQHOrQgPPrRkPBA3caH8Wx5mIKLOBAGjgudXkutEKlHKciYgyHQgmtweV02m0pNFoIqIpRwKvECwIBBnfMxbefL0exZEmIhpjqvQ1HHATCwJBMSPQ630d4FATEY0xtYoEmlsVMhj0MyZjl9H0YF8SBzjURERjzpaB5lZB8Lk1o4FQFa8KY/yPehtqtBzkQBMRjTlbBtv7Ag08t2Y0EAZ75859PZgCLRH2c6CJiEa2+MZlMwAEuqW1IvjcmtFAMKrzgm/kMxCIiEYRKi6YH3hqlRzvMvJhAgeCAn/gcBMRjUwEgQMhnbk1sysEg8D3zgj5eIHDTUQ06vR+SuAtfAk8t2b2ATnQs4Ju0ndU8UscbCKiUfiB51Z4ZjCHgRCPGyjOCLjV7u3xtj6ONhHRKESCBkLvM83/+bucBcKS114+GQGvQQC4u4iIaDRVq646DsCcgJu9CEBzFggiaT2ybQeHm4hoZMlQURrPnpe05tbM7TIS/VDQTVS5QiAiGpUffG6F+GnNrZlbIQAfDPzhIgwEIqLRJ9fgP7bTPHszI4FQWV9zGoDAD2PwQimeYURENILFjctmA1gQOEOMSWtuzUgg+AYfS2OzwaLiV1/mkBMRDa9AQ1cg6O2AAPjJUA53GalckcZGu7bGt6Y45EREI02tcnkam+3ruW3DX3ISCJGm2oXpLGkA3tSOiGgkVQ2xmVBEgqcI0p5bJxwI6unH0tzU45ATEQ0vBb0CQCj4b22kvedlwoEg6S1pAMDnkBMRjfRDX7M+t04oEIZ2F52W5tedwyEnIhpmbm1cMQuQD6S5+WykcSAaAMITaXTIl0EfuDKtCBNVDjsR0TA/lz0pMEauTm9jf391dbXp7OzkbnkiIkrP/wFmzt6DKBrR5wAAAABJRU5ErkJggg==
body:
type: string
maxLength: 10000
description: Use our pre-defined email body or customise it to fit your brand. Add dynamic data
by using the variables provided.
example: Thanks so much for your order!
isFooterHidden:
type: boolean
description: Hide our email footer explaining the benefits of Greenspark.
example: 'false'
isTotalImpactHidden:
type: boolean
description: Hide your total impact so far within your emails.
example: 'false'
required:
- headerImage
- body
- isFooterHidden
- isTotalImpactHidden
NotificationTemplateRequestDto:
type: object
properties:
isActive:
type: boolean
description: Start sending this template to your customers.
example: 'false'
type:
$ref: '#/components/schemas/TypeRequestBody'
settings:
$ref: '#/components/schemas/SettingsRequestBody'
content:
$ref: '#/components/schemas/ContentRequestBody'
required:
- isActive
- type
- settings
- content
Metadata:
type: object
properties:
key:
type: string
description: Minimum 1, maximum 40 characters.
example: customerId
value:
type: string
description: Minimum 1, maximum 100 characters.
example: 743ce227-22ef-4c6e-9c06-725f97b99690
required:
- key
- value
ImpactDto:
type: object
properties:
impactPurchases:
type: array
items:
oneOf:
- $ref: '#/components/schemas/ImpactPurchase'
- $ref: '#/components/schemas/ImpactPurchaseByValue'
description: The impactPurchases array defines the impacts you would like to create.
estimationId:
type: string
example: aac1bdc1-1324-4734-8e64-3304ec2d4b30
description: The id of the estimation that was used to calculate the impact.
metadata:
description: In the metadata array you can store up to 10 key-value pairs. You can use them
to associate arbitrary data with your impact.
type: array
items:
$ref: '#/components/schemas/Metadata'
required:
- impactPurchases
ImpactPurchaseDetail:
type: object
properties:
type:
type: string
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
description: Type of the impact you purchased.
example: trees
amount:
type: number
description: Amount of the impact you purchased.
example: 3
spentValue:
type: number
description: The value which has been spent on your chosen impacts and will therefore be billed.
example: 0.6
unspentValue:
type: number
description: 'Any value which is not spent. This is due to the difference between the value
you have chosen to spend and the actual price of the impacts. You will not be billed for this. '
example: 0.01
projectId:
type: string
description: The id of the project.
example: 34d41293-6b84-40e7-9744-122e301590a2
required:
- type
- amount
- spentValue
- unspentValue
- projectId
ImpactPurchase:
type: object
properties:
type:
type: string
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
description: Type of the impact.
example: trees
projectId:
type: string
description: The id of the project.
example: 34d41293-6b84-40e7-9744-122e301590a2
amount:
type: number
description: Amount means number of trees, number of plastic bottles, kg of CO2.
example: 5
required:
- type
- amount
ImpactPurchaseByValue:
type: object
properties:
type:
type: string
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
description: Type of the impact.
example: trees
projectId:
type: string
description: The id of the project.
example: 34d41293-6b84-40e7-9744-122e301590a2
value:
type: number
description: Value of the impacts to be purchased in the account’s currency.
example: 1.8
required:
- type
- value
CreateImpactBatchRequest:
type: object
properties:
sourceId:
type: string
description: The id of the source associated with the impact.
example: 631b035dcd13c4ad66c6d496
triggerId:
type: string
description: The id of the trigger associated with the impact.
example: 281f045dcd23c4ae26c6d498
impact:
description: The impact property defines the impact purchases you would like to create with
the corresponding metadata and estimation.
allOf:
- $ref: '#/components/schemas/ImpactDto'
required:
- impact
CreateImpactBatchRequestBody:
type: object
properties:
requests:
maxItems: 50
description: The requests array defines the list of impacts you would like to create.
type: array
items:
$ref: '#/components/schemas/CreateImpactBatchRequest'
required:
- requests
BatchImpactPurchaseResponse:
type: object
properties:
transactionId:
type: string
description: The id of the transaction associated with a single impact creation.
impactPurchases:
description: The impactPurchases array contains details on a specific impact creation.
type: array
items:
$ref: '#/components/schemas/ImpactPurchaseDetail'
required:
- transactionId
- impactPurchases
BatchImpactPurchaseResponses:
type: object
properties:
responses:
description: The responses array contains the results of the batch impact purchases.
type: array
items:
$ref: '#/components/schemas/BatchImpactPurchaseResponse'
required:
- responses
RawReportRow:
type: object
properties:
createdAt:
type: string
example: '2022-09-09 09:12:54.162+00'
description: Creation date of the impact.
totalPrice:
type: number
example: 1
description: Total amount of money spent on the impact.
currency:
type: string
example: dollar
description: The currency of the spent money on the impact.
sourceName:
type: string
example: source1
description: The name of the source associated with the impact.
sourceId:
type: string
example: 631b035dcd13c4ad66c6d496
description: The id of the source associated with the impact.
triggerName:
type: string
example: trigger1
description: The name of the trigger associated with the impact.
triggerId:
type: string
example: 631b035dcd13c4ad66c6d497
description: The id of the trigger associated with the impact.
impactPurchases:
description: The impactPurchases array contains your spending on a specific purpose.
type: array
items:
$ref: '#/components/schemas/ImpactPurchase'
metadata:
description: In the metadata array you can store up to 10 key-value pairs. You can use them
to associate arbitrary data with your impact.
type: array
items:
$ref: '#/components/schemas/Metadata'
required:
- createdAt
- totalPrice
- currency
- sourceName
- sourceId
- triggerName
- triggerId
- impactPurchases
- metadata
RawReport:
type: object
properties:
rows:
example:
- createdAt: '2022-09-09 09:12:54.162+00'
totalPrice: 1
currency: dollar
sourceName: source1
sourceId: 631b035dcd13c4ad66c6d496
triggerName: trigger1
triggerId: 631b035dcd13c4ad66c6d497
impactPurchases:
- type: trees
amount: 5
price: 1
- type: carbon
amount: 5
price: 0.05
metadata:
- key: key1
value: value1
- key: key2
value: value2
- createdAt: '2022-09-09 09:05:07.863+00'
totalPrice: 0.05
currency: dollar
sourceName: API
sourceId: null
triggerName: TAILORED_IMPACT
triggerId: null
impactPurchases:
- type: carbon
amount: 5
price: 0.05
metadata:
- key: key1
value: value1
- key: key2
value: value2
type: array
items:
$ref: '#/components/schemas/RawReportRow'
totalRows:
type: number
example: 42
description: Number of rows in the report.
maxResults:
type: number
example: 100
description: Maximum number of rows per page.
cursor:
type: string
example: BG6JLNBVQMAQAAASA4EAAEEAQCAAKGQEBBSBAZBAWCXBK===
description: If the result set spread through multiple pages, you can fetch the next page with
it. If null, it indicates that no pagination needed.
reportId:
type: string
example: 1aae6329-1417-48c1-96a5-a6d21c0f1a57
description: The id of your generated report. If the result set spread through multiple pages,
you can refer to your report with it while pagination.
required:
- rows
- totalRows
- maxResults
- cursor
- reportId
EstimationsByMCCRequestBody:
type: object
properties:
price:
type: number
description: Price of purchase.
example: 1000
mcc:
type: string
description: '[Merchant Category Code](https://usa.visa.com/content/dam/VCOM/download/merchants/visa-merchant-data-standards-manual.pdf)
of Merchant.'
example: '5411'
currencyISO:
type: string
description: ISO Currency Code of Purchase.
example: EUR
merchant:
type: string
description: Name of Merchant.
example: Superstore
geo:
type: string
enum:
- USA
- EU/UK
- GB
- BG
- AT
- AU
- BE
- BR
- CA
- CH
- CN
- CZ
- DE
- DK
- ES
- FR
- GR
- HR
- HU
- IT
- JP
- KR
- LT
- LV
- MX
- NL
- 'NO'
- PL
- PT
- RU
- SK
- TW
- WA
- WE
- WF
- WL
- WM
- EE
- ID
- IE
- MT
- SE
- SI
- ZA
description: Indicates the specific country that should be used for the CO2 emissions factors.
example: EU/UK
userType:
type: string
enum:
- PERSONAL
- BUSINESS
description: 'Indicates whether the API should use emissions factors for people or businesses
(Either: "PERSONAL"(default), "BUSINESS")'
example: PERSONAL
metadata:
description: In the metadata array you can store up to 10 key-value pairs. You can use them
to associate arbitrary data with your estimation.
type: array
items:
$ref: '#/components/schemas/Metadata'
required:
- price
- mcc
- currencyISO
Estimation:
type: object
properties:
emissionsLevel:
type: string
enum:
- category
- merchant
description: Either "category" or "merchant" depending on whether there is emissions data available
on that merchant or only on the mcc category.
example: category
name:
type: string
description: 'In the case of "category" this is the mcc code string (Ex: Supermarkets), and
if emissions_level is "merchant" it returns the name of the merchant you entered (ex: "Superstore").
[Full list of merchant categories.](https://usa.visa.com/content/dam/VCOM/download/merchants/visa-merchant-data-standards-manual.pdf)'
example: Superstore
kgOfCO2Emissions:
type: number
description: Estimated carbon footprint In Kg of CO2 equivalent.
example: 4.66
mtOfCO2Emissions:
type: number
description: Estimated carbon footprint In metric tons (mt) of CO2 equivalent.
example: 0.0047
similarTo:
description: Random list of relatable actions with similar footprint.
example:
- Eating 52 cookies
- Absorbed by a tree every 19 days
- Eating 1.8 cans of tuna
type: array
items:
type: string
required:
- emissionsLevel
- name
- kgOfCO2Emissions
- mtOfCO2Emissions
- similarTo
EstimationsByCategoryTypeRequestBody:
type: object
properties:
price:
type: number
description: Price of purchase.
example: 1000
categoryType:
type: string
enum:
- plaid
description: Type of category.
example: plaid
categoryValue:
description: The name of the category used to calculate the co2 emission. We support all [plaid
categories](https://plaid.com/docs/api/products/transactions/#categoriesget) and the new categorisation
for [personal_finance_category](https://plaid.com/docs/api/products/transactions/#transactions-recurring-get-request-options-include-personal-finance-category).
example:
- FOOD_AND_DRINK
- FOOD_AND_DRINK_GROCERIES
type: array
items:
type: string
currencyISO:
type: string
description: ISO Currency Code of Purchase.
example: EUR
geo:
type: string
enum:
- USA
- EU/UK
- GB
- BG
- AT
- AU
- BE
- BR
- CA
- CH
- CN
- CZ
- DE
- DK
- ES
- FR
- GR
- HR
- HU
- IT
- JP
- KR
- LT
- LV
- MX
- NL
- 'NO'
- PL
- PT
- RU
- SK
- TW
- WA
- WE
- WF
- WL
- WM
- EE
- ID
- IE
- MT
- SE
- SI
- ZA
description: Indicates the specific country that should be used for the CO2 emissions factors.
example: EU/UK
userType:
type: string
enum:
- PERSONAL
- BUSINESS
description: 'Indicates whether the API should use emissions factors for people or businesses
(Either: "PERSONAL"(default), "BUSINESS")'
example: PERSONAL
metadata:
description: In the metadata array you can store up to 10 key-value pairs. You can use them
to associate arbitrary data with your estimation.
type: array
items:
$ref: '#/components/schemas/Metadata'
required:
- price
- categoryType
- categoryValue
- currencyISO
EstimationsByMCC:
type: object
properties:
price:
type: number
description: Price of purchase.
example: 1000
mcc:
type: string
description: '[Merchant Category Code](https://usa.visa.com/content/dam/VCOM/download/merchants/visa-merchant-data-standards-manual.pdf)
of Merchant.'
example: '5411'
currencyISO:
type: string
description: ISO Currency Code of Purchase.
example: EUR
merchant:
type: string
description: Name of Merchant.
example: Superstore
required:
- price
- mcc
- currencyISO
BulkEstimationsByMCCRequestBody:
type: object
properties:
geo:
type: string
enum:
- USA
- EU/UK
- GB
- BG
- AT
- AU
- BE
- BR
- CA
- CH
- CN
- CZ
- DE
- DK
- ES
- FR
- GR
- HR
- HU
- IT
- JP
- KR
- LT
- LV
- MX
- NL
- 'NO'
- PL
- PT
- RU
- SK
- TW
- WA
- WE
- WF
- WL
- WM
- EE
- ID
- IE
- MT
- SE
- SI
- ZA
description: Indicates the specific country that should be used for the CO2 emissions factors.
example: EU/UK
userType:
type: string
enum:
- PERSONAL
- BUSINESS
description: 'Indicates whether the API should use emissions factors for people or businesses
(Either: "PERSONAL"(default), "BUSINESS")'
example: PERSONAL
transactions:
description: Array of transactions.
example:
- merchant: Supermarket
price: 77.96
mcc: '3612'
currencyISO: GBP
- merchant: Superstore
price: 41.27
mcc: '3611'
currencyISO: HUF
type: array
items:
$ref: '#/components/schemas/EstimationsByMCC'
metadata:
description: In the metadata array you can store up to 10 key-value pairs. You can use them
to associate arbitrary data with your estimation.
type: array
items:
$ref: '#/components/schemas/Metadata'
required:
- transactions
EstimationsByCategoryType:
type: object
properties:
price:
type: number
description: Price of purchase.
example: 1000
categoryType:
type: string
enum:
- plaid
description: Type of category.
example: plaid
categoryValue:
description: The name of the category used to calculate the co2 emission. We support all [plaid
categories](https://plaid.com/docs/api/products/transactions/#categoriesget) and the new categorisation
for [personal_finance_category](https://plaid.com/docs/api/products/transactions/#transactions-recurring-get-request-options-include-personal-finance-category).
example:
- FOOD_AND_DRINK
- FOOD_AND_DRINK_GROCERIES
type: array
items:
type: string
currencyISO:
type: string
description: ISO Currency Code of Purchase.
example: EUR
required:
- price
- categoryType
- categoryValue
- currencyISO
BulkEstimationsByCategoryTypeRequestBody:
type: object
properties:
geo:
type: string
enum:
- USA
- EU/UK
- GB
- BG
- AT
- AU
- BE
- BR
- CA
- CH
- CN
- CZ
- DE
- DK
- ES
- FR
- GR
- HR
- HU
- IT
- JP
- KR
- LT
- LV
- MX
- NL
- 'NO'
- PL
- PT
- RU
- SK
- TW
- WA
- WE
- WF
- WL
- WM
- EE
- ID
- IE
- MT
- SE
- SI
- ZA
description: Indicates the specific country that should be used for the CO2 emissions factors.
example: EU/UK
userType:
type: string
enum:
- PERSONAL
- BUSINESS
description: 'Indicates whether the API should use emissions factors for people or businesses
(Either: "PERSONAL"(default), "BUSINESS")'
example: PERSONAL
transactions:
description: Array of transactions.
example:
- price: 77.96
currencyISO: GBP
categoryType: plaid
categoryValue:
- FOOD_AND_DRINK
- FOOD_AND_DRINK_GROCERIES
type: array
items:
$ref: '#/components/schemas/EstimationsByCategoryType'
metadata:
description: In the metadata array you can store up to 10 key-value pairs. You can use them
to associate arbitrary data with your estimation.
type: array
items:
$ref: '#/components/schemas/Metadata'
required:
- transactions
ImpactPurchaseWithPrice:
type: object
properties:
type:
type: string
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
description: Type of the impact.
example: trees
projectId:
type: string
description: The id of the project.
example: 34d41293-6b84-40e7-9744-122e301590a2
amount:
type: number
description: Amount means number of trees, number of plastic bottles, kg of CO2.
example: 5
price:
type: number
example: 0.55
description: Amount of money spent on the impact purchase.
purchaseIds:
example:
- id1
- id2
description: The ids of the purchases what are made to for the impact.
type: array
items:
type: string
required:
- type
- amount
- price
- purchaseIds
RawReportRowV2:
type: object
properties:
id:
type: string
example: ecebda64-1da0-4894-8658-f79059eaa00d
description: ID of the impact.
createdAt:
type: string
example: '2022-09-09 09:12:54.162+00'
description: Creation date of the impact.
totalPrice:
type: number
example: 22.76
description: Total amount of money spent on the impact.
currency:
type: string
example: dollar
description: The currency of the spent money on the impact.
sourceName:
type: string
example: source1
description: The name of the source associated with the impact.
sourceId:
type: string
example: 631b035dcd13c4ad66c6d496
description: The id of the source associated with the impact.
triggerName:
type: string
example: trigger1
description: The name of the trigger associated with the impact.
triggerId:
type: string
example: 631b035dcd13c4ad66c6d497
description: The id of the trigger associated with the impact.
impactPurchases:
description: The impactPurchases array contains your spending on a specific purpose.
type: array
items:
$ref: '#/components/schemas/ImpactPurchaseWithPrice'
metadata:
description: In the metadata array you can store up to 10 key-value pairs. You can use them
to associate arbitrary data with your impact.
type: array
items:
$ref: '#/components/schemas/Metadata'
status:
type: object
description: The payment status of the impact.
required:
- id
- createdAt
- totalPrice
- currency
- sourceName
- sourceId
- triggerName
- triggerId
- impactPurchases
- metadata
- status
RawReportV2:
type: object
properties:
rows:
example:
- id: 89842ca8-476d-4cea-9f72-c5341c6220a7
createdAt: '2022-09-09 09:12:54.162+00'
totalPrice: 1
currency: dollar
sourceName: source1
sourceId: 631b035dcd13c4ad66c6d496
triggerName: trigger1
triggerId: 631b035dcd13c4ad66c6d497
impactPurchases:
- type: trees
amount: 5
price: 1
- type: carbon
amount: 5
price: 0.05
metadata:
- key: key1
value: value1
- key: key2
value: value2
- id: 28e34977-6934-4db8-b0d1-3dbe2b9243ec
createdAt: '2022-09-09 09:05:07.863+00'
totalPrice: 0.05
currency: dollar
sourceName: API
sourceId: null
triggerName: TAILORED_IMPACT
triggerId: null
impactPurchases:
- type: carbon
amount: 5
price: 0.05
metadata:
- key: key1
value: value1
- key: key2
value: value2
type: array
items:
$ref: '#/components/schemas/RawReportRowV2'
maxResults:
type: number
example: 100
description: Maximum number of rows per page.
cursor:
type: string
example: BG6JLNBVQMAQAAASA4EAAEEAQCAAKGQEBBSBAZBAWCXBK===
description: If the result set spread through multiple pages, you can fetch the next page with
it. If null, it indicates that no pagination needed.
required:
- rows
- maxResults
- cursor
CommunityAccount:
type: object
properties:
comparisons:
type: array
description: The comparisons array defines the impacts equivalents.
items:
oneOf:
- $ref: '#/components/schemas/CarbonComparison'
- $ref: '#/components/schemas/PlasticComparison'
- $ref: '#/components/schemas/TreeComparison'
- $ref: '#/components/schemas/KelpComparison'
- $ref: '#/components/schemas/WaterComparison'
- $ref: '#/components/schemas/BeesComparison'
impacts:
type: array
description: The impacts array defines the Greenspark community account's impacts.
items:
oneOf:
- $ref: '#/components/schemas/AccountImpactV2'
- $ref: '#/components/schemas/RelationImpactV2'
required:
- comparisons
- impacts
AccountImpactV2:
type: object
properties:
type:
type: string
description: The impact type.
example: carbon
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
amount:
type: number
description: The impact amount.
example: 100
source:
type: string
description: The impact source.
example: account
enum:
- account
projectId:
type: string
description: The project id of the impact.
example: c6e4b1bf-843e-4859-bc85-c3b764f507e6
required:
- type
- amount
- source
- projectId
RelationImpactV2:
type: object
properties:
type:
type: string
description: The impact type.
example: carbon
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
amount:
type: number
description: The impact amount.
example: 100
source:
type: string
description: The impact source.
example: relation
enum:
- relation
projectId:
type: string
description: The project id of the impact.
example: c6e4b1bf-843e-4859-bc85-c3b764f507e6
required:
- type
- amount
- source
- projectId
CarbonComparison:
type: object
properties:
amount:
type: number
description: The amount of the comparison calculation.
example: 14
description:
type: string
description: The description of the comparison.
example: This is a comparison description.
link:
type: string
description: The link which contains information on the comparison calculation.
example: example.com
amountDescription:
type: string
description: Short summary of the comparison equivalent description provided by the link.
example: This is a short summary.
suffix:
type: string
description: The unit of the comparison.
nullable: true
example: ha
type:
type: string
description: Impact type.
enum:
- carbon
example: carbon
unit:
type: string
description: The carbon comparison unit.
example: flights
enum:
- flights
- distance
- plantBased
required:
- amount
- description
- link
- amountDescription
- type
- unit
PlasticComparison:
type: object
properties:
amount:
type: number
description: The amount of the comparison calculation.
example: 14
description:
type: string
description: The description of the comparison.
example: This is a comparison description.
link:
type: string
description: The link which contains information on the comparison calculation.
example: example.com
amountDescription:
type: string
description: Short summary of the comparison equivalent description provided by the link.
example: This is a short summary.
suffix:
type: string
description: The unit of the comparison.
nullable: true
example: ha
type:
type: string
description: Impact type.
enum:
- plastic
example: plastic
unit:
type: string
description: The plastic comparison unit.
example: straws
enum:
- straws
- coffeeCups
- bathtubs
required:
- amount
- description
- link
- amountDescription
- type
- unit
TreeComparison:
type: object
properties:
amount:
type: number
description: The amount of the comparison calculation.
example: 14
description:
type: string
description: The description of the comparison.
example: This is a comparison description.
link:
type: string
description: The link which contains information on the comparison calculation.
example: example.com
amountDescription:
type: string
description: Short summary of the comparison equivalent description provided by the link.
example: This is a short summary.
suffix:
type: string
description: The unit of the comparison.
nullable: true
example: ha
type:
type: string
description: Impact type.
enum:
- trees
example: trees
unit:
type: string
description: The tree comparison unit.
example: areaPlanted
enum:
- areaPlanted
- carbonSequestered
- footballPitches
required:
- amount
- description
- link
- amountDescription
- type
- unit
KelpComparison:
type: object
properties:
amount:
type: number
description: The amount of the comparison calculation.
example: 14
description:
type: string
description: The description of the comparison.
example: This is a comparison description.
link:
type: string
description: The link which contains information on the comparison calculation.
example: example.com
amountDescription:
type: string
description: Short summary of the comparison equivalent description provided by the link.
example: This is a short summary.
suffix:
type: string
description: The unit of the comparison.
nullable: true
example: ha
type:
type: string
description: Impact type.
enum:
- kelp
example: kelp
unit:
type: string
description: The kelp comparison unit.
example: iceHockeyRinks
enum:
- iceHockeyRinks
- carbonSequestered
- babyWhales
required:
- amount
- description
- link
- amountDescription
- type
- unit
WaterComparison:
type: object
properties:
amount:
type: number
description: The amount of the comparison calculation.
example: 14
description:
type: string
description: The description of the comparison.
example: This is a comparison description.
link:
type: string
description: The link which contains information on the comparison calculation.
example: example.com
amountDescription:
type: string
description: Short summary of the comparison equivalent description provided by the link.
example: This is a short summary.
suffix:
type: string
description: The unit of the comparison.
nullable: true
example: ha
type:
type: string
description: Impact type.
enum:
- water
example: water
unit:
type: string
description: The water comparison unit.
example: litres
enum:
- litres
- fetchingWater
- brighterEducation
required:
- amount
- description
- link
- amountDescription
- type
- unit
BeesComparison:
type: object
properties:
amount:
type: number
description: The amount of the comparison calculation.
example: 14
description:
type: string
description: The description of the comparison.
example: This is a comparison description.
link:
type: string
description: The link which contains information on the comparison calculation.
example: example.com
amountDescription:
type: string
description: Short summary of the comparison equivalent description provided by the link.
example: This is a short summary.
suffix:
type: string
description: The unit of the comparison.
nullable: true
example: ha
type:
type: string
description: Impact type.
enum:
- bees
example: bees
unit:
type: string
description: The bees comparison unit.
example: hives
enum:
- hives
- honey
- flowers
required:
- amount
- description
- link
- amountDescription
- type
- unit
TransactionPurchase:
type: object
properties:
id:
type: string
description: The id of the purchase.
example: '1234'
type:
type: string
description: The type of the purchase.
example: trees
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
amount:
type: number
description: The impact amount of the purchase.
example: 10
projectId:
type: string
description: The project id of the purchase.
example: '1234'
receiptUrl:
type: string
description: The receipt url of the purchase.
example: https://example.com/receipt
provider:
type: string
description: The provider of the impacts.
example: veritree
periodStartDate:
type: string
description: The start of the period the purchase made for.
example: '2024-01-01'
periodEndDate:
type: string
description: The end of the period the purchase made for.
example: '2024-01-31'
evidences:
type: array
description: The evidences of a purchase.
items:
oneOf:
- $ref: '#/components/schemas/PlantingSessionResponse'
- $ref: '#/components/schemas/PlasticCollectionResponse'
example: []
default: []
required:
- id
- type
- amount
- projectId
- receiptUrl
- provider
- periodStartDate
- periodEndDate
- evidences
EvidenceImageResponse:
type: object
properties:
altitude:
type: number
description: Altitude
longitude:
type: number
description: Longitude
latitude:
type: number
description: Latitude
url:
type: string
description: Public URL of the image.
previewUrl:
type: string
description: Optional preview URL of the image.
alt:
type: string
description: Alternate text for the image.
required:
- altitude
- longitude
- latitude
- url
PointDto:
type: object
properties:
type:
type: string
description: Specifies the type of GeoJSON object.
example: Feature
coordinates:
description: Coordinates of Point geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.2
example: Feature
type: array
items:
type: string
required:
- type
- coordinates
FeatureDto:
type: object
properties:
type:
type: string
description: Specifies the type of GeoJSON object.
example: Feature
geometry:
description: Geometry object. https://tools.ietf.org/html/rfc7946#section-3
example:
type: Point
coordinates:
- -122.63701428179544
- 44.86975845546196
allOf:
- $ref: '#/components/schemas/PointDto'
properties:
type: object
description: Properties associated with this feature.
required:
- type
- geometry
- properties
FeatureCollectionDto:
type: object
properties:
features:
description: A collection of feature objects. https://tools.ietf.org/html/rfc7946#section-3.3
example:
- type: Feature
geometry:
type: Point
coordinates:
- -122.63701428179544
- 44.86975845546196
properties: {}
type: array
items:
$ref: '#/components/schemas/FeatureDto'
type:
type: string
description: Specifies the type of GeoJSON object.
example: FeatureCollection
required:
- features
- type
EvidenceVideoResponse:
type: object
properties:
altitude:
type: number
description: Altitude
longitude:
type: number
description: Longitude
latitude:
type: number
description: Latitude
url:
type: string
description: Public URL of the video.
previewUrl:
type: string
description: Optional preview URL of the video.
alt:
type: string
description: Alternate text for the video.
required:
- altitude
- longitude
- latitude
- url
SiteAssessmentResponse:
type: object
properties:
plantingSite:
type: string
description: Planting site name.
nullable: true
assessedAt:
type: string
description: ISO timestamp when the assessment was done.
nullable: true
assessorName:
type: string
description: Assessor full name.
nullable: true
notes:
type: string
description: Notes captured during assessment.
nullable: true
images:
description: Images attached to the assessment.
type: array
items:
$ref: '#/components/schemas/EvidenceImageResponse'
geoJSON:
description: GeoJSON objects attached to the assessment.
type: array
items:
$ref: '#/components/schemas/FeatureCollectionDto'
videos:
description: Videos attached to the assessment.
type: array
items:
$ref: '#/components/schemas/EvidenceVideoResponse'
PlantingSpeciesResponse:
type: object
properties:
name:
type: string
description: Species common name.
amountPlanted:
type: number
description: Amount planted for this species.
required:
- name
- amountPlanted
PlantingDetailsResponse:
type: object
properties:
datePlanted:
type: string
description: ISO date when the planting happened.
nullable: true
startTime:
type: string
description: Planting start time (ISO-8601).
nullable: true
endTime:
type: string
description: Planting end time (ISO-8601).
nullable: true
siteForester:
type: string
description: Name of the site forester.
nullable: true
numberOfPlanters:
type: number
description: Number of planters.
nullable: true
notes:
type: string
description: Notes captured during planting.
nullable: true
amountPlanted:
type: number
description: Total amount planted during this session.
nullable: true
images:
description: Images attached to planting details.
type: array
items:
$ref: '#/components/schemas/EvidenceImageResponse'
geoJSON:
description: GeoJSON objects attached to planting details.
type: array
items:
$ref: '#/components/schemas/FeatureCollectionDto'
videos:
description: Videos attached to planting details.
type: array
items:
$ref: '#/components/schemas/EvidenceVideoResponse'
species:
description: Species breakdown for this planting session.
type: array
items:
$ref: '#/components/schemas/PlantingSpeciesResponse'
PlantingSessionBlockchainResponse:
type: object
properties:
arweaveUrl:
type: string
description: Arweave URL, if available.
nullable: true
SurvivabilityMetric:
type: object
properties:
name:
type: string
description: Metric name.
example: Survival Rate
value:
type: number
description: Metric value.
example: 96
unit:
type: string
description: Unit for the metric value.
example: '%'
updatedAt:
type: string
description: ISO timestamp when the metric was last updated.
example: '2024-01-01T00:00:00.000Z'
type:
type: string
description: Metric type/category.
example: chronological
required:
- name
- value
- unit
- updatedAt
- type
SurvivabilityStats:
type: object
properties:
fieldUpdateId:
type: number
description: Field update id (Veritree)
metrics:
description: Survivability metrics for this field update.
example:
- name: Survival Rate
type: chronological
unit: '%'
value: 96
updatedAt: '2024-01-01T00:00:00.000Z'
- name: Min Height
type: chronological
unit: cm
value: 55
updatedAt: '2024-01-01T00:00:00.000Z'
type: array
items:
$ref: '#/components/schemas/SurvivabilityMetric'
required:
- fieldUpdateId
- metrics
ExternalReportResponse:
type: object
properties:
externalId:
type: string
description: External report id.
title:
type: string
description: External report title.
nullable: true
reportedAt:
type: string
description: ISO date when this report was reported.
nullable: true
fieldUpdateId:
type: number
description: Field update id associated with this report.
images:
description: Images attached to this report.
type: array
items:
$ref: '#/components/schemas/EvidenceImageResponse'
geoJSON:
description: GeoJSON objects attached to this report.
type: array
items:
$ref: '#/components/schemas/FeatureCollectionDto'
videos:
description: Videos attached to this report.
type: array
items:
$ref: '#/components/schemas/EvidenceVideoResponse'
required:
- externalId
- fieldUpdateId
VeritreeSubsiteResponse:
type: object
properties:
id:
type: number
description: Veritree subsite id.
latitude:
type: number
description: Latitude
longitude:
type: number
description: Longitude
geofences:
type: object
description: Geofence for this subsite as a GeoJSON MultiPolygon.
required:
- id
- latitude
- longitude
- geofences
PlantingSessionResponse:
type: object
properties:
fieldUpdateId:
type: number
description: Unique identifier of the field update.
accountId:
type: string
description: Present only when the planting session is related to the authenticated account.
siteAssessment:
description: Site assessment details.
allOf:
- $ref: '#/components/schemas/SiteAssessmentResponse'
planting:
description: Planting details.
allOf:
- $ref: '#/components/schemas/PlantingDetailsResponse'
blockchain:
description: Blockchain references for this planting session.
allOf:
- $ref: '#/components/schemas/PlantingSessionBlockchainResponse'
survivabilityStats:
description: Optional survivability stats.
nullable: true
allOf:
- $ref: '#/components/schemas/SurvivabilityStats'
externalReports:
description: External reports attached to this session.
type: array
items:
$ref: '#/components/schemas/ExternalReportResponse'
altitude:
type: number
description: Altitude
longitude:
type: number
description: Longitude
latitude:
type: number
description: Latitude
site:
description: Subsite associated with this session.
allOf:
- $ref: '#/components/schemas/VeritreeSubsiteResponse'
type:
type: string
description: Discriminator type for evidence unions.
example: PlantingSession
required:
- fieldUpdateId
- siteAssessment
- planting
- blockchain
- altitude
- longitude
- latitude
- site
- type
PlasticCollectionResponse:
type: object
properties:
accountId:
type: string
description: Present only when the collection is related to the authenticated account.
collectorName:
type: string
description: The name of the collector who collected the plastic waste.
buyerName:
type: string
description: The name of the buyer who buys the plastic waste from the collector.
materialType:
type: string
description: The type of plastic material collected.
weight:
type: string
description: The weight of the collected plastic waste.
numberOfPlasticBottlesRescued:
type: number
description: Number of plastic bottles recovered, computed from weight.
geoJSON:
description: The geometry of the plastic collection.
allOf:
- $ref: '#/components/schemas/FeatureCollectionDto'
createdAt:
type: string
description: The creation time of the plastic collection (ISO-8601).
externalId:
type: string
description: External identifier for the plastic collection.
required:
- collectorName
- buyerName
- materialType
- weight
- numberOfPlasticBottlesRescued
- geoJSON
- createdAt
- externalId
ProjectMetadata:
type: object
properties:
description:
type: string
description: The description of the metadata.
key:
type: string
description: The key of the metadata.
type:
type: string
description: The type of the metadata. It can be either a primitive type, an array or an object
or even a custom type.
value:
type: object
description: The value of the metadata with the type defined in the type field.
required:
- description
- key
- type
- value
ProjectDetails:
type: object
properties:
projectId:
type: string
description: The unique identifier of the project.
example: ca724c03-6e8b-4c17-800d-80177ede64c7
projectCategoryId:
type: string
description: Defines the category that the project falls under. It links the project to its
relevant category.
example: 256d3c28-e9c3-4a47-a5a8-63b7634ac5bd
name:
type: string
description: The name of the project.
example: Hydropower Project
description:
type: string
description: Detailed explanation of what the project is about. It provides more context for
users who want to understand the project.
type:
type: string
description: Refers to the type of impact that the project is expected to have.
example: carbon
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
unit:
type: number
description: 'The purchase unit of the given project. Example: purchasing 20 bees by purchasing
one amount of the project.'
example: 20
registryLink:
type: string
description: This is a link to a webpage where users can find more detailed information about
the project.
example: www.example.com
link:
type: string
description: This is a link to the project specific Greenspark page.
example: https://www.getgreenspark.com/projects/the-plastic-bank-turning-plastic-pollution-into-empowering-income
imageUrl:
type: string
description: Link to an image representing the project.
example: www.example.com/image.png
thumbnailImageUrl:
type: string
description: Link to a thumbnail image representing the project.
example: www.example.com/image_thumbnail.png
countries:
type: string
description: List of countries where the project is located.
example:
- China
- India
- Brazil
vintage:
type: number
description: The year when the project started.
example: 2020
price:
type: number
description: Defines how much it costs to purchase one unit of impact in the account's currency.
example: 0.01
availability:
type: number
description: Defines how many units of impact are still available for purchase through the project.
If there's no limit, this would be null. For a carbon offsetting project, this would be the
number of tonnes of carbon that can still be offset through the project.
example: 1000
default:
type: boolean
description: Defines the default project for a project category. When an impact purchase is
made, the default project's impact will be purchased if the project is not specified.
example: true
status:
type: string
description: Defines the project status.
example: approved
enum:
- approved
- deprecated
statusInitiatedAt:
type: string
description: The date when the project get into the current status.
example: '2024-01-01'
projectPartnerLogo:
type: string
description: Defines the logo of the project partner.
example: https://cdn.getgreenspark.com/project-images/partner-logos/example_logo.jpg
geoJSON:
description: The geometry of the project. http://datatracker.ietf.org/doc/html/rfc7946#section-3.3
example:
type: FeatureCollection
features:
- type: Feature
geometry:
type: Point
coordinates:
- -122.63701428179544
- 44.86975845546196
properties: {}
allOf:
- $ref: '#/components/schemas/FeatureCollectionDto'
metadata:
description: Defines project specific additional information.
type: array
items:
$ref: '#/components/schemas/ProjectMetadata'
required:
- projectId
- projectCategoryId
- name
- description
- type
- unit
- link
- imageUrl
- thumbnailImageUrl
- countries
- vintage
- price
- status
- statusInitiatedAt
ProjectCategoryImage:
type: object
properties:
imageUrl:
type: string
description: The url of the image.
example: example.com/image.png
style:
type: string
description: The style of the image.
example: flat
enum:
- flat
- simplified
- 3d
required:
- imageUrl
- style
ProjectCategory:
type: object
properties:
projectCategoryId:
type: string
description: The unique identifier of the project.
example: 256d3c28-e9c3-4a47-a5a8-63b7634ac5bd
name:
type: string
description: The name of the project category.
example: Energy Efficiency
description:
type: string
description: Detailed explanation of what the project category is about. It provides more context
for users who want to understand the category.
example: Energy Efficiency project category description.
images:
description: Images associated with the project category. They help users visualise the impact
of the project category.
type: array
items:
$ref: '#/components/schemas/ProjectCategoryImage'
type:
type: string
description: Defines the type of environmental impact associated with projects in this category.
example: carbon
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
required:
- projectCategoryId
- name
- description
- images
- type
Project:
type: object
properties:
projectId:
type: string
description: The unique identifier of the project.
example: ca724c03-6e8b-4c17-800d-80177ede64c7
projectCategoryId:
type: string
description: Defines the category that the project falls under. It links the project to its
relevant category.
example: 256d3c28-e9c3-4a47-a5a8-63b7634ac5bd
name:
type: string
description: The name of the project.
example: Hydropower Project
description:
type: string
description: Detailed explanation of what the project is about. It provides more context for
users who want to understand the project.
type:
type: string
description: Refers to the type of impact that the project is expected to have.
example: carbon
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
unit:
type: number
description: 'The purchase unit of the given project. Example: purchasing 20 bees by purchasing
one amount of the project.'
example: 20
registryLink:
type: string
description: This is a link to a webpage where users can find more detailed information about
the project.
example: www.example.com
link:
type: string
description: This is a link to the project specific Greenspark page.
example: https://www.getgreenspark.com/projects/the-plastic-bank-turning-plastic-pollution-into-empowering-income
imageUrl:
type: string
description: Link to an image representing the project.
example: www.example.com/image.png
thumbnailImageUrl:
type: string
description: Link to a thumbnail image representing the project.
example: www.example.com/image_thumbnail.png
countries:
type: string
description: List of countries where the project is located.
example:
- China
- India
- Brazil
vintage:
type: number
description: The year when the project started.
example: 2020
price:
type: number
description: Defines how much it costs to purchase one unit of impact in the account's currency.
example: 0.01
availability:
type: number
description: Defines how many units of impact are still available for purchase through the project.
If there's no limit, this would be null. For a carbon offsetting project, this would be the
number of tonnes of carbon that can still be offset through the project.
example: 1000
default:
type: boolean
description: Defines the default project for a project category. When an impact purchase is
made, the default project's impact will be purchased if the project is not specified.
example: true
status:
type: string
description: Defines the project status.
example: approved
enum:
- approved
- deprecated
statusInitiatedAt:
type: string
description: The date when the project get into the current status.
example: '2024-01-01'
projectPartnerLogo:
type: string
description: Defines the logo of the project partner.
example: https://cdn.getgreenspark.com/project-images/partner-logos/example_logo.jpg
geoJSON:
description: The geometry of the project. http://datatracker.ietf.org/doc/html/rfc7946#section-3.3
example:
type: FeatureCollection
features:
- type: Feature
geometry:
type: Point
coordinates:
- -122.63701428179544
- 44.86975845546196
properties: {}
allOf:
- $ref: '#/components/schemas/FeatureCollectionDto'
required:
- projectId
- projectCategoryId
- name
- description
- type
- unit
- link
- imageUrl
- thumbnailImageUrl
- countries
- vintage
- price
- status
- statusInitiatedAt
PublicAccount:
type: object
properties:
comparisons:
type: array
description: The comparisons array defines the impacts equivalents.
items:
oneOf:
- $ref: '#/components/schemas/CarbonComparison'
- $ref: '#/components/schemas/PlasticComparison'
- $ref: '#/components/schemas/TreeComparison'
- $ref: '#/components/schemas/KelpComparison'
- $ref: '#/components/schemas/WaterComparison'
- $ref: '#/components/schemas/BeesComparison'
name:
type: string
description: The account name.
example: ACME
nullable: false
signupDate:
type: string
description: The account signup date.
example: '2021-01-01T00:00:00.000Z'
nullable: false
accountType:
type: string
description: The account type.
example: business
enum:
- business
- personal
- family
impacts:
type: array
description: The impacts array defines the account's impacts.
items:
oneOf:
- $ref: '#/components/schemas/AccountImpact'
- $ref: '#/components/schemas/RelationImpact'
- $ref: '#/components/schemas/TransferredImpact'
- $ref: '#/components/schemas/ImpactActionImpact'
required:
- comparisons
- name
- signupDate
- accountType
- impacts
AccountImpact:
type: object
properties:
type:
type: string
description: The impact type.
example: carbon
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
amount:
type: number
description: The impact amount.
example: 100
source:
type: string
description: The impact source.
example: account
enum:
- account
required:
- type
- amount
- source
RelationImpact:
type: object
properties:
type:
type: string
description: The impact type.
example: carbon
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
amount:
type: number
description: The impact amount.
example: 100
source:
type: string
description: The impact source.
example: relation
enum:
- relation
required:
- type
- amount
- source
TransferredImpact:
type: object
properties:
type:
type: string
description: The impact type.
example: carbon
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
amount:
type: number
description: The impact amount.
example: 100
source:
type: string
description: The impact source.
example: transferred
enum:
- transferred
urls:
description: The urls to the transferred impacts' invoices.
example:
- example.com/image.png
type: array
items:
type: string
required:
- type
- amount
- source
- urls
ImpactActionImpact:
type: object
properties:
type:
type: string
description: The impact type.
example: carbon
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
amount:
type: number
description: The impact amount.
example: 100
source:
type: string
description: The impact source.
example: impactAction
enum:
- impactAction
required:
- type
- amount
- source
PublicAccountV2:
type: object
properties:
comparisons:
type: array
description: The comparisons array defines the impacts equivalents.
items:
oneOf:
- $ref: '#/components/schemas/CarbonComparison'
- $ref: '#/components/schemas/PlasticComparison'
- $ref: '#/components/schemas/TreeComparison'
- $ref: '#/components/schemas/KelpComparison'
- $ref: '#/components/schemas/WaterComparison'
- $ref: '#/components/schemas/BeesComparison'
name:
type: string
description: The account name.
example: ACME
nullable: false
signupDate:
type: string
description: The account signup date.
example: '2021-01-01T00:00:00.000Z'
nullable: false
accountType:
type: string
description: The account type.
example: business
enum:
- business
- personal
- family
impacts:
type: array
description: The impacts array defines the account's impacts.
items:
oneOf:
- $ref: '#/components/schemas/AccountImpactV2'
- $ref: '#/components/schemas/RelationImpactV2'
- $ref: '#/components/schemas/TransferredImpact'
- $ref: '#/components/schemas/ImpactActionImpactV2'
comparisonsByProject:
type: array
description: The comparisons array defines the impacts equivalents per project.
items:
oneOf:
- $ref: '#/components/schemas/CarbonComparisonByProject'
- $ref: '#/components/schemas/PlasticComparisonByProject'
- $ref: '#/components/schemas/TreeComparisonByProject'
- $ref: '#/components/schemas/KelpComparisonByProject'
- $ref: '#/components/schemas/WaterComparisonByProject'
- $ref: '#/components/schemas/BeesComparisonByProject'
required:
- comparisons
- name
- signupDate
- accountType
- impacts
- comparisonsByProject
ImpactActionImpactV2:
type: object
properties:
type:
type: string
description: The impact type.
example: carbon
enum:
- trees
- carbon
- plastic
- kelp
- water
- bees
amount:
type: number
description: The impact amount.
example: 100
source:
type: string
description: The impact source.
example: impactAction
enum:
- impactAction
projectId:
type: string
description: The project id of the impact.
example: c6e4b1bf-843e-4859-bc85-c3b764f507e6
required:
- type
- amount
- source
- projectId
CarbonComparisonByProject:
type: object
properties:
amount:
type: number
description: The amount of the comparison calculation.
example: 14
description:
type: string
description: The description of the comparison.
example: This is a comparison description.
link:
type: string
description: The link which contains information on the comparison calculation.
example: example.com
amountDescription:
type: string
description: Short summary of the comparison equivalent description provided by the link.
example: This is a short summary.
suffix:
type: string
description: The unit of the comparison.
nullable: true
example: ha
type:
type: string
description: Impact type.
enum:
- carbon
example: carbon
projectId:
type: string
description: The ID of the project.
example: 7b726bbc-b121-4432-96d8-30d507a19664
enum:
- 596f61ee-7149-43ac-ba4e-efb90ee3bd47
- 7accc260-ab82-4c51-a959-e6736284c45a
- 9deda055-cd6d-4ebe-b343-4c9b73ccf2d6
- c6e4b1bf-843e-4859-bc85-c3b764f507e6
- a0636f61-c9a4-4e42-ad34-26155f3dd827
- 6b0add6d-246f-4a22-a072-3469eb65b225
- 7b726bbc-b121-4432-96d8-30d507a19664
- 6b563fc1-033b-40ea-89b7-c8702b74b5af
- bd5df270-6223-46e1-baf1-04d7e20f429f
- fed92a6e-1842-43bc-9510-a8b93e7d910a
- 14f00fb9-3a8e-4b36-9385-ddb606d3bb41
- 9be7083e-be8b-4608-96d0-a526445b4667
unit:
type: string
description: The carbon comparison unit.
example: flights
enum:
- flights
- distance
- plantBased
required:
- amount
- description
- link
- amountDescription
- type
- projectId
- unit
PlasticComparisonByProject:
type: object
properties:
amount:
type: number
description: The amount of the comparison calculation.
example: 14
description:
type: string
description: The description of the comparison.
example: This is a comparison description.
link:
type: string
description: The link which contains information on the comparison calculation.
example: example.com
amountDescription:
type: string
description: Short summary of the comparison equivalent description provided by the link.
example: This is a short summary.
suffix:
type: string
description: The unit of the comparison.
nullable: true
example: ha
type:
type: string
description: Impact type.
enum:
- plastic
example: plastic
projectId:
type: string
description: The ID of the project.
example: 7b726bbc-b121-4432-96d8-30d507a19664
enum:
- 596f61ee-7149-43ac-ba4e-efb90ee3bd47
- 7accc260-ab82-4c51-a959-e6736284c45a
- 9deda055-cd6d-4ebe-b343-4c9b73ccf2d6
- c6e4b1bf-843e-4859-bc85-c3b764f507e6
- a0636f61-c9a4-4e42-ad34-26155f3dd827
- 6b0add6d-246f-4a22-a072-3469eb65b225
- 7b726bbc-b121-4432-96d8-30d507a19664
- 6b563fc1-033b-40ea-89b7-c8702b74b5af
- bd5df270-6223-46e1-baf1-04d7e20f429f
- fed92a6e-1842-43bc-9510-a8b93e7d910a
- 14f00fb9-3a8e-4b36-9385-ddb606d3bb41
- 9be7083e-be8b-4608-96d0-a526445b4667
unit:
type: string
description: The plastic comparison unit.
example: straws
enum:
- straws
- coffeeCups
- bathtubs
required:
- amount
- description
- link
- amountDescription
- type
- projectId
- unit
TreeComparisonByProject:
type: object
properties:
amount:
type: number
description: The amount of the comparison calculation.
example: 14
description:
type: string
description: The description of the comparison.
example: This is a comparison description.
link:
type: string
description: The link which contains information on the comparison calculation.
example: example.com
amountDescription:
type: string
description: Short summary of the comparison equivalent description provided by the link.
example: This is a short summary.
suffix:
type: string
description: The unit of the comparison.
nullable: true
example: ha
type:
type: string
description: Impact type.
enum:
- trees
example: trees
projectId:
type: string
description: The ID of the project.
example: 7b726bbc-b121-4432-96d8-30d507a19664
enum:
- 596f61ee-7149-43ac-ba4e-efb90ee3bd47
- 7accc260-ab82-4c51-a959-e6736284c45a
- 9deda055-cd6d-4ebe-b343-4c9b73ccf2d6
- c6e4b1bf-843e-4859-bc85-c3b764f507e6
- a0636f61-c9a4-4e42-ad34-26155f3dd827
- 6b0add6d-246f-4a22-a072-3469eb65b225
- 7b726bbc-b121-4432-96d8-30d507a19664
- 6b563fc1-033b-40ea-89b7-c8702b74b5af
- bd5df270-6223-46e1-baf1-04d7e20f429f
- fed92a6e-1842-43bc-9510-a8b93e7d910a
- 14f00fb9-3a8e-4b36-9385-ddb606d3bb41
- 9be7083e-be8b-4608-96d0-a526445b4667
unit:
type: string
description: The tree comparison unit.
example: areaPlanted
enum:
- areaPlanted
- carbonSequestered
- footballPitches
required:
- amount
- description
- link
- amountDescription
- type
- projectId
- unit
KelpComparisonByProject:
type: object
properties:
amount:
type: number
description: The amount of the comparison calculation.
example: 14
description:
type: string
description: The description of the comparison.
example: This is a comparison description.
link:
type: string
description: The link which contains information on the comparison calculation.
example: example.com
amountDescription:
type: string
description: Short summary of the comparison equivalent description provided by the link.
example: This is a short summary.
suffix:
type: string
description: The unit of the comparison.
nullable: true
example: ha
type:
type: string
description: Impact type.
enum:
- kelp
example: kelp
projectId:
type: string
description: The ID of the project.
example: 7b726bbc-b121-4432-96d8-30d507a19664
enum:
- 596f61ee-7149-43ac-ba4e-efb90ee3bd47
- 7accc260-ab82-4c51-a959-e6736284c45a
- 9deda055-cd6d-4ebe-b343-4c9b73ccf2d6
- c6e4b1bf-843e-4859-bc85-c3b764f507e6
- a0636f61-c9a4-4e42-ad34-26155f3dd827
- 6b0add6d-246f-4a22-a072-3469eb65b225
- 7b726bbc-b121-4432-96d8-30d507a19664
- 6b563fc1-033b-40ea-89b7-c8702b74b5af
- bd5df270-6223-46e1-baf1-04d7e20f429f
- fed92a6e-1842-43bc-9510-a8b93e7d910a
- 14f00fb9-3a8e-4b36-9385-ddb606d3bb41
- 9be7083e-be8b-4608-96d0-a526445b4667
unit:
type: string
description: The kelp comparison unit.
example: iceHockeyRinks
enum:
- iceHockeyRinks
- carbonSequestered
- babyWhales
required:
- amount
- description
- link
- amountDescription
- type
- projectId
- unit
WaterComparisonByProject:
type: object
properties:
amount:
type: number
description: The amount of the comparison calculation.
example: 14
description:
type: string
description: The description of the comparison.
example: This is a comparison description.
link:
type: string
description: The link which contains information on the comparison calculation.
example: example.com
amountDescription:
type: string
description: Short summary of the comparison equivalent description provided by the link.
example: This is a short summary.
suffix:
type: string
description: The unit of the comparison.
nullable: true
example: ha
type:
type: string
description: Impact type.
enum:
- water
example: water
projectId:
type: string
description: The ID of the project.
example: 7b726bbc-b121-4432-96d8-30d507a19664
enum:
- 596f61ee-7149-43ac-ba4e-efb90ee3bd47
- 7accc260-ab82-4c51-a959-e6736284c45a
- 9deda055-cd6d-4ebe-b343-4c9b73ccf2d6
- c6e4b1bf-843e-4859-bc85-c3b764f507e6
- a0636f61-c9a4-4e42-ad34-26155f3dd827
- 6b0add6d-246f-4a22-a072-3469eb65b225
- 7b726bbc-b121-4432-96d8-30d507a19664
- 6b563fc1-033b-40ea-89b7-c8702b74b5af
- bd5df270-6223-46e1-baf1-04d7e20f429f
- fed92a6e-1842-43bc-9510-a8b93e7d910a
- 14f00fb9-3a8e-4b36-9385-ddb606d3bb41
- 9be7083e-be8b-4608-96d0-a526445b4667
unit:
type: string
description: The water comparison unit.
example: litres
enum:
- litres
- fetchingWater
- brighterEducation
required:
- amount
- description
- link
- amountDescription
- type
- projectId
- unit
BeesComparisonByProject:
type: object
properties:
amount:
type: number
description: The amount of the comparison calculation.
example: 14
description:
type: string
description: The description of the comparison.
example: This is a comparison description.
link:
type: string
description: The link which contains information on the comparison calculation.
example: example.com
amountDescription:
type: string
description: Short summary of the comparison equivalent description provided by the link.
example: This is a short summary.
suffix:
type: string
description: The unit of the comparison.
nullable: true
example: ha
type:
type: string
description: Impact type.
enum:
- bees
example: bees
projectId:
type: string
description: The ID of the project.
example: 7b726bbc-b121-4432-96d8-30d507a19664
enum:
- 596f61ee-7149-43ac-ba4e-efb90ee3bd47
- 7accc260-ab82-4c51-a959-e6736284c45a
- 9deda055-cd6d-4ebe-b343-4c9b73ccf2d6
- c6e4b1bf-843e-4859-bc85-c3b764f507e6
- a0636f61-c9a4-4e42-ad34-26155f3dd827
- 6b0add6d-246f-4a22-a072-3469eb65b225
- 7b726bbc-b121-4432-96d8-30d507a19664
- 6b563fc1-033b-40ea-89b7-c8702b74b5af
- bd5df270-6223-46e1-baf1-04d7e20f429f
- fed92a6e-1842-43bc-9510-a8b93e7d910a
- 14f00fb9-3a8e-4b36-9385-ddb606d3bb41
- 9be7083e-be8b-4608-96d0-a526445b4667
unit:
type: string
description: The bees comparison unit.
example: hives
enum:
- hives
- honey
- flowers
required:
- amount
- description
- link
- amountDescription
- type
- projectId
- unit
TestNotificationTemplateRequestDto:
type: object
properties:
customerEmail:
type: string
description: Test recipient email address.
example: customer@example.com
notificationTemplate:
description: Notification template to test.
allOf:
- $ref: '#/components/schemas/NotificationTemplateRequestDto'
required:
- customerEmail
- notificationTemplate
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: x-api-key
description: 'Greenspark API key. Match key to host: sandbox key -> sandbox host, production key
-> production host.'
tags:
- name: Account
- name: Email
- name: Estimations
- name: Impacts
- name: Projects
- name: Reports
- name: Widgets