---
updatedAt: 2025-10-11T20:16:08.000Z
agentTools:
  projectIndex: https://docs.getgreenspark.com/llms.txt
---

# Fetch Carbon Estimate of a Transaction by Open Banking Category Types

Estimating the carbon footprint of a transaction based on Open Banking Category Types

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/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": []
          }
        ]
      }
    }
  },
  "info": {
    "title": "Estimations",
    "description": "Here you can find documentation and examples for Greenspark Estimations API",
    "version": "v1",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://api.getgreenspark.com",
      "description": "Production environment"
    },
    {
      "url": "https://sandbox.getgreenspark.com",
      "description": "Sandbox environment"
    },
    {
      "url": "https://demo-api.getgreenspark.com",
      "description": "Demo environment"
    }
  ],
  "components": {
    "securitySchemes": {
      "access-key": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    },
    "schemas": {
      "Metadata": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "Minimum 1, maximum 40 characters.",
            "example": "customerId"
          },
          "value": {
            "type": "string",
            "description": "Minimum 1, maximum 80 characters.",
            "example": "743ce227-22ef-4c6e-9c06-725f97b99690"
          }
        },
        "required": [
          "key",
          "value"
        ]
      },
      "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"
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```