Fetches carbon score for payment cards and aggregates the same on a weekly and monthly basis. The result will be in descending order.
POST {{baseUrl}}/payment-cards/aggregate-transaction-footprints
Allows a service provider to fetch aggregate carbon score for a single or multiple payment cards. A payment card has to be registered first using /payment-cards
or /payment-card-enrolments
endpoint before this endpoint can be called. The aggregate can be requested weekly or monthly. Note that ONLY cleared transactions will be returned.
If any of the paymentCardIds is not valid or not registered, then the entire request will be rejected, and no aggregate will be returned.
If no transaction is found for a particular paymentCardId then the response will have an empty list against that paymentCardId.
Request Body
{"paymentCardIds"=>["83c0711e-1851-4771-950a-055dded7f168"], "aggregateType"=>1, "crossPANAggregate"=>"Y", "fromDate"=>"2021-05-07", "toDate"=>"2021-05-07"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
x-openapi-clientid | string | (Required) Unique Client Id as assigned by Mastercard Developers after creating a project. This will also be a unique Id of your Service Provider record. | |
channel | string | Channel of onboarding from which service provider onboarded and now the API call has been initiated. Possible values are, |
- CC = Indicates that service provider is onboarded directly on Carbon Calculator. And API calls has been initiated directly.
- CT = Indicates that service provider is onboarded via Carbon Tracker/Carbon Calculator Experience. And API calls has been initiated via CT/CCE. |
|
origMcApiClientId
| string | | Client Id of originator issuer from where the API call has been initiated. | |Content-Type
| string | | | |Accept
| string | | |
RESPONSES
status: OK
{"aggregateTransactionFootprint":[{"paymentCardId":"8a581a55-bcea-4c3e-8e0f-9b4726e5e6d3","footprintAggregation":[{"carbonEmissionInGrams":140.52,"carbonEmissionInOunces":7.19,"aggregateValue":"Week-26|2019"},{"carbonEmissionInGrams":142.67,"carbonEmissionInOunces":6.94,"aggregateValue":"Week-25|2019"}]},{"paymentCardId":"328b62d4-287c-4c9f-a05d-6d4a67f208d8","footprintAggregation":[{"carbonEmissionInGrams":143.64,"carbonEmissionInOunces":6.97,"aggregateValue":"Week-26|2019"},{"carbonEmissionInGrams":218.31,"carbonEmissionInOunces":7.19,"aggregateValue":"Week-25|2019"}]}],"crossPANAggregation":[{"carbonEmissionInGrams":284.16,"carbonEmissionInOunces":14.16,"aggregateValue":"Week-26|2019"},{"carbonEmissionInGrams":360.98,"carbonEmissionInOunces":14.13,"aggregateValue":"Week-25|2019"}]}