# Get Aggregate Carbon Scores
source: https://developer.mastercard.com/priceless-planet-carbon-tracker/documentation/use-cases/aggregate_carbon_scores/index.md

## Overview {#overview}

The `GET /issuers/users/{userid}/aggregate-carbon-scores` endpoint fetches the aggregate carbon scores for the enrolled consumer from the transactions made in the current month.

The issuers can use this aggregate score to build an overlay experience within the bank's app and provide a snapshot of their score prior to opening the dashboard.

### Sample Screenshots {#sample-screenshots}

The following screenshot shows the consumer's aggregate carbon score on the Carbon Calculator widget in the listing view:
![Aggregate Carbon Score](https://static.developer.mastercard.com/content/priceless-planet-carbon-tracker/uploads/Aggregate_Carbon_Score.png)

## Pre-requisites {#pre-requisites}

Following are the pre-requisites for the issuer to use this service:

* A consumer must enroll on the CCE platform.
* The issuer must store the `userid` for the requesting consumer.

Tip: To create your project on Mastercard Developers, refer to the [Quick Start Guide](https://developer.mastercard.com/priceless-planet-carbon-tracker/documentation/quick-start-guide/index.md) for more information.

## Sequence Diagram {#sequence-diagram}

The following sequence diagram shows how an issuer can fetch an aggregate carbon score for the current month.
Diagram aggregate_carbon_scores

## Execution Steps {#execution-steps}

The following details the steps in the above sequence diagram:

1. The consumer requests to view the aggregate carbon score for the payment card.
2. The issuer app sends the request to the issuer server.
3. The issuer server sends the request to the `GET /issuers/users/{userid}/aggregate-carbon-scores` endpoint.
4. The Carbon Calculator Experience application validates the request.
5. The application fetches the data as per the request.
6. The application sends the aggregate carbon score to the issuer server.
7. The issuer server sends the aggregate carbon score to the issuer app.
8. The issuer app displays the aggregate carbon score to the consumer.

<br />

## Error Messages {#error-messages}

You receive an error response for an invalid request or any missing request parameter.
Note: For more information about the error codes, refer to the [Code and Formats](https://developer.mastercard.com/priceless-planet-carbon-tracker/documentation/code-and-formats/index.md) section.

## Endpoint {#endpoint}


API Reference: `GET /issuers/users/{userid}/aggregate-carbon-scores`

## Sample Request and Response {#sample-request-and-response}

For more details on the sample request and response, refer to the [How to call the Aggregate Carbon Score API](https://developer.mastercard.com/priceless-planet-carbon-tracker/tutorial/test-cases/step5/index.md) tutorial.
