API reference · Campaigns
Get all campaigns metrics
GET/v1/campaigns/metrics
Retrieve aggregated usage metrics for a given account or across all accounts. These metrics match the ones displayed in the global impact dashboard and the global metrics widget. ⚠️ We recommend including the global metrics widget in your app instead for a better experience.
Requires a Bearer access token.
Parameters
createdAt_lt#string (date-time)in queryFormat: YYYY-MM-DDTHH:MM:SSZ.
createdAt_lte#string (date-time)in queryFormat: YYYY-MM-DDTHH:MM:SSZ.
createdAt_gt#string (date-time)in queryFormat: YYYY-MM-DDTHH:MM:SSZ.
createdAt_gte#string (date-time)in queryFormat: YYYY-MM-DDTHH:MM:SSZ.
accountId#stringin queryUUIDId of the account. Only useful for Platform customers to get metrics for a specific account.
includeChildAccountsCampaigns#booleanin queryInclude child accounts' campaigns
includeMatchedDonationsInMetrics#booleanin queryInclude matched donations made by and charged to the beneficiary in the metrics
Response
200 · GlobalMetricsNo field is described in the spec.
numberOfDonations#numberalways returnedtotalDonation#numberalways returnednumberOfMatchedDonations#numberalways returnedtotalMatchedDonation#numberalways returnednumberOfCharitiesWithDonations#numberalways returnedusedDonationsMetric#Metricalways returned2 child fields
valuenumberalways returnedpercentagenumberalways returned
sortedCharities#SortedCharity[]always returned10 child fields
charityIdstringalways returnednamestringalways returnedlogoUrlstringalways returnedsustainableDevelopmentGoalsstring[]always returnedNO_POVERTYZERO_HUNGERGOOD_HEALTH_AND_WELL_BEINGQUALITY_EDUCATIONGENDER_EQUALITYCLEAN_WATER_AND_SANITATIONAFFORDABLE_AND_CLEAN_ENERGYDECENT_WORK_AND_ECONOMIC_GROWTHINDUSTRY_INNOVATION_AND_INFRASTRUCTUREREDUCED_INEQUALITIESSUSTAINABLE_CITIES_AND_COMMUNITIESRESPONSIBLE_CONSUMPTION_AND_PRODUCTIONCLIMATE_ACTIONLIFE_BELOW_WATERLIFE_ON_LANDPEACE_JUSTICE_AND_STRONG_INSTITUTIONSPARTNERSHIPS_FOR_THE_GOALSimpactIndicatorsOmitTypeClass[]always returned10 child fields
userInvitationIdstringalways returnedfirstNamestringalways returnedlastNamestringalways returnedemailstringalways returnedphonestringstatusUserInvitationStatusalways returnedPENDINGCLAIMEDCANCELEDroleRolealways returnedADMINMEMBERPAYROLL_MANAGERaccountIdstringalways returnedcreatedAtstring (date-time)always returnedupdatedAtstring (date-time)always returned
numberOfDonationsnumberalways returnedtotalnumberalways returnedpercentagenumberalways returnedtotalMatchedDonationnumberalways returnedlatestDonationstring (date-time)always returned
sortedSdgs#SortedSustainableDevelopmentGoal[]always returned5 child fields
sustainableDevelopmentGoalstringalways returnedNO_POVERTYZERO_HUNGERGOOD_HEALTH_AND_WELL_BEINGQUALITY_EDUCATIONGENDER_EQUALITYCLEAN_WATER_AND_SANITATIONAFFORDABLE_AND_CLEAN_ENERGYDECENT_WORK_AND_ECONOMIC_GROWTHINDUSTRY_INNOVATION_AND_INFRASTRUCTUREREDUCED_INEQUALITIESSUSTAINABLE_CITIES_AND_COMMUNITIESRESPONSIBLE_CONSUMPTION_AND_PRODUCTIONCLIMATE_ACTIONLIFE_BELOW_WATERLIFE_ON_LANDPEACE_JUSTICE_AND_STRONG_INSTITUTIONSPARTNERSHIPS_FOR_THE_GOALSnumberOfDonationsnumberalways returnedtotalnumberalways returnedpercentagenumberalways returnedcharitiesLightCharity[]always returned3 child fields
charityIdstringalways returnednamestringalways returnedlogoUrlstringalways returned
sortedImpactIndicators#SortedImpactIndicator[]always returned9 child fields
charityImpactIndicatorIdstringalways returnedsingularLabelstringalways returnedpluralLabelstringalways returnedcountnumberalways returnedtotalnumberalways returnedcountMatchedDonationnumberalways returnedtotalMatchedDonationnumberalways returnednamestringalways returnedlogoUrlstringalways returned
monthlyDonations#MonthlyDonation[]always returned3 child fields
namestringalways returnedaveragenumberalways returnedaverageMatchedDonationnumberalways returned
nps#NPSalways returned4 child fields
promotersnumberalways returneddetractorsnumberalways returnedneutralsnumberalways returnedscorenumberalways returned
rating#Ratingalways returned1 child field
averagenumberalways returned
comments#Commment[]always returned5 child fields
feedbackIdstringalways returnedcommentstringcharityCommentCharityalways returned2 child fields
namestringalways returnedlogoUrlstringalways returned
campaignCommentCampaignalways returned2 child fields
namestringalways returnedlogoUrlstring
donorCommentDonoralways returned1 child field
emailstring
emailMetrics#EmailMetricsalways returned4 child fields
sentMetricalways returned2 child fields
valuenumberalways returnedpercentagenumberalways returned
openedMetricalways returned2 child fields
valuenumberalways returnedpercentagenumberalways returned
clickedMetricalways returned2 child fields
valuenumberalways returnedpercentagenumberalways returned
errorMetricalways returned2 child fields
valuenumberalways returnedpercentagenumberalways returned
numberOfPublishedCampaigns#numberalways returnedcampaigns#TopCampaignMetrics[]always returned6 child fields
campaignIdstringalways returnednamestringalways returnednumberOfDonationsnumberalways returnedtotalDonationnumberalways returnedpercentagenumberalways returnedstatusstringalways returnedDRAFTPENDINGACTIVECOMPLETECANCELED
Errors
400Only one of accountId or includeChildAccountsCampaigns can be used
{ "statusCode": 400, "message": "Only one of accountId or includeChildAccountsCampaigns can be used", "error": "Bad Request" }400A field is missing, has the wrong type, or is not part of the request schema.
Every request with a body or query is validated.
{ "statusCode": 400, "message": [ "amount must not be less than 1", "property foo should not exist" ], "error": "Bad Request" }401Unauthorized
Missing, expired or invalid access token.
{ "statusCode": 401, "message": "Unauthorized" }403Account closed
{ "message": "Account closed", "code": "ACCOUNT_CLOSED" }
curl -X GET https://api.sandbox.charitips.com/v1/campaigns/metrics \ -H "Authorization: Bearer $CHARITIPS_TOKEN"Request bodies are written for this docs and checked against the API's validation; ids in angle brackets are placeholders. Response values are placeholders built from the schema.