Skip to main content

Statistics API

You can easily view all donations made through the Statistics API in our partner portal and see some statistics to track your impact. If you want, you can also retrieve the statistics through our Statistics API and display them in your services by making a request to the statistics endpoint.

The statistics include aggregation of donations made split by causes. It will also show total donation count and number of unique donors.

const response = await fetch(
"https://api.milkywire.com/partners/v2/statistics",
{
method: "GET",
headers: {
authorization: "Bearer <public key>",
},
}
);

This is what an an example response could look like:

{
"currencyCode": "SEK",
"donationsPerEntity": [
{
"amount": 15000,
"count": 80,
"causeId": "<causeId1>"
},
{
"amount": 85000,
"count": 120,
"causeId": "<causeId2>"
}
],
"uniqueDonors": 180,
"totalDonationAmount": 100000,
"donationCount": 200
}

For more details, see our Statistics API documentation.