everydayhero: Developer

Dynamic Leaderboards

Leaderboard of pages, sorted by donation value

GET https://everydayhero.com/api/v2/search/pages_totals

Parameters

page_ids : optional string or Array
Page ID, only totals for that the specified page or pages will be retrieved. An Array of IDs can be provided, eg: page_ids[]=1&page_ids[]=2

exclude_page_ids : optional string or Array
Page ID, exclude the specified pages from results. An Array of IDs can be provided, eg: exclude_page_ids[]=1&exclude_page_ids[]=2

charity_id : optional string or Array
Charity ID, only totals for that the specified Charity will be retrieved. An Array of IDs can be provided, eg: charity_id[]=au-1&charity_id[]=au-2

campaign_id : optional string or Array
Campaign ID, only totals for that the specified Campaign will be retrieved. An Array of IDs can be provided, eg: campaign_id[]=au-1&campaign_id[]=au-2

start_at : optional string/date-time
Start at date, ISO format: “2014-08-20 05:02:13”, filter totals by a range.

end_at : optional string/date-time
End at date, ISO format: “2014-08-20 05:02:13”, filter totals by a range.

group_value : optional String/Array
Return donations matching specific page group value, or any of the provided array values. An Array of values can be provided, eg: group_value[]=QLD&group_value[]=ABC

max_amount_cents : optional integer
Cents value for the max amount a page should have raised to be displayable.

min_amount_cents : optional integer
Cents value for the min amount a page should have raised to be displayable.

group_by : optional String
Group leaderboard by type, supported values: pages, teams, groups. default: pages.

group_id : optional integer
If group_by is set as groups, group_id is required, and should be the ID of the group to display on the leaderboard.

Pagination

For more information about pagination, please see the pagination overview.

limit : optional integer
The number of items per page.

page : optional integer
The page number to return.

Example

https://everydayhero.com/api/v2/search/pages_totals.json?campaign_id=au-0
{
  "results": [
    {
      "count": 123,
      "amount_cents": 1234,
      "gift_aid_amount_cents": 1234,
      "page": {
        "id": 274309,
        "name": "Sam's Page",
        "url": "https://give.everydayhero.com/au/samantha",
        "target_cents": 58100,
        "charity_name": "Australian Mitochondrial Disease Foundation",
        "image": {
          "original_image_url": "https://d3r0m2twuddj1w.cloudfront.net/assets/pages/images/original/missing-287b7881555195b87fb952fff10d1055.gif",
          "tiny_image_url": "https://d3r0m2twuddj1w.cloudfront.net/assets/pages/images/tiny/missing-86b4014d2c2a8802376800af9035e6f2.gif",
          "small_image_url": "https://d3r0m2twuddj1w.cloudfront.net/assets/pages/images/small/missing-8f1165a727871b3370402cd59ec43690.gif",
          "medium_image_url": "https://d3r0m2twuddj1w.cloudfront.net/assets/pages/images/medium/missing-b2926d047013659ed9e5cb85add1de64.gif",
          "large_image_url": "https://d3r0m2twuddj1w.cloudfront.net/assets/pages/images/large/missing-73dc8fb87713b4c3fd2eba7ba6f3085b.gif",
          "extra_large_image_url": "https://d3r0m2twuddj1w.cloudfront.net/pages/images/extra_large/missing.gif"
        },
        "amount": {
          "cents": 0,
          "currency": {
            "iso_code": "AUD",
            "name": "Australian Dollar",
            "symbol": "$"
          }
        }
      }
    }
  ]
}