50/50 – Make or Break

50 projects created in 50 days to raise
£1 million for famine relief in East Africa

Donate now

50/50 API

The 50/50 application programming interface is available for those creating fundraising projects for the overarching 50/50 campaign.

Primarily it can be used to track donations to your project – assuming that you have opted to use either our UK or US payment gateways – however it can also be used to notify us of donations you have gathered elsewhere, i.e. in person, or using a different online payments mechanism.

Endpoints

All endpoints require a valid API key. Write requests are only permitted on projects that you have been assigned to by 50/50 moderators. You can request an API key on our Google Group if you are currently running a project on 50/50.

Successful requests will return a status of 200, failed requests will return a 400 and error message, for example:

  {
    "status": 400,
    "data": {
      "message": "You must provide a valid API key"
    }
  }

For use with cross-domain AJAX, all endpoints will return JSONP if a callback parameter is supplied.

50/50 Statistics

Returns a few statistics for the overarching 50/50 campaign. Donation totals are expressed in GBP.

http://5050.gd/api/[api_key]/statistics
{
  "status": 200,
  "data": {
    "project_count": "3",
    "backer_count": "54",
    "donation_count": "34",
    "donation_total": "1093"
  }
}

List projects

Lists all current 50/50 projects.

http://5050.gd/api/[api_key]/projects/list
{
  "status": 200,
  "data": [{
    "id": "1",
    "title": "Give-a-gram",
    "description": "Short description about the project.",
    "project_page": "http:/5050.gd/projects/give-a-gram",
    "donated": "34345",
    "backers": "34",
    "hashtag": "#giveagram",
    "long_donation_url": "https://fundraise.unicef.org.uk/Donate/ToEvent/e0d4ef9d-985d-4ea8-9d25-9f480084f22d?project_id=1",
    "short_donation_url": "http://5050.gd/dn1",
    "campaigner": "1",
    "created_at": "2011-08-23 09:58:54"
  },
  {
    "id": "2",
    "title": "Facebook Famine",
    "description": "Short description about the project.",
    "project_page": "http:/5050.gd/projects/facebook-famine",
    "donated": "345",
    "backers": "12",
    "hashtag": "#facebookfamine",
    "long_donation_url": "https://fundraise.unicef.org.uk/Donate/ToEvent/e0d4ef9d-985d-4ea8-9d25-9f480084f22d?project_id=2",
    "short_donation_url": "http://5050.gd/dn2",
    "campaigner": "2",
    "created_at": "2011-08-23 09:58:54"
  }]
}

Project details

Show details for specific project.

http://5050.gd/api/[api_key]/projects/[project_id]
{
  "status": 200,
  "data": {
    "id": "1",
    "title": "Give-a-gram",
    "description": "Short description about the project.",
    "project_page": "http:/5050.gd/projects/give-a-gram",
    "donated": "34345",
    "currency": "GBP",
    "backers": "34",
    "hashtag": "#giveagram",
    "long_donation_url": "https://fundraise.unicef.org.uk/Donate/ToEvent/e0d4ef9d-985d-4ea8-9d25-9f480084f22d?project_id=1",
    "short_donation_url": "http://5050.gd/dn1",
    "campaigner": "1",
    "created_at": "2011-08-23 09:58:54"
  }
}

List project donations

List donations for a specific project.

http://5050.gd/api/[api_key]/projects/[project_id]/donations
{
  "status": 200,
  "data": [{
    "id": "1",
    "amount": "203.23",
    "currency": "GBP",
    "name": "Andrew Senter",
    "source": "unicef",
    "data": "arbitrary_string",
    "donated_at": "2011-08-23 09:58:54"
  },
  {
    "id": "2",
    "amount": "1245.23",
    "currency": "GBP",
    "name": "Cath Richardson",
    "source": "unicef",
    "data": "arbitrary_string",
    "donated_at": "2011-08-23 09:58:54"
  }]
}

Search donations for a specific project.

http://5050.gd/api/[api_key]/projects/[project_id]/donations/search

This endpoint must be accessed using the GET HTTP method and accepts the following parameters:

  [optional] from_id     : Return donations with an ID greater than this value
  [optional] name        : Search using a donor name
  [optional] data        : Return donations containing a specific data value
{
  "status": 200,
  "data": [{
    "id": "1",
    "amount": "203.23",
    "currency": "GBP",
    "name": "Andrew Senter",
    "source": "unicef",
    "data": "arbitrary_string",
    "donated_at": "2011-08-23 09:58:54"
  },
  {
    "id": "2",
    "amount": "1245.23",
    "currency": "GBP",
    "name": "Cath Richardson",
    "source": "unicef",
    "data": "arbitrary_string",
    "donated_at": "2011-08-23 09:58:54"
  }]
}

Notify 50/50 of project donation

Notify us of a new donation, i.e. one that you may have received in person, or from another online payment mechanism. Your API key must be associated with the requested project for this to be successful.

http://5050.gd/api/projects/donations/notify/

This endpoint must be accessed using the POST HTTP method and accepts the following parameters:

Note: Currently only USD, GBP and EUR donations are accepted.

  [required] api_key     : Your API key
  [required] project_id  : Your project's unique ID
  [required] amount      : A float expressing the amount donated
  [required] currency    : Donation currency code (ISO 4217)
  [optional] name        : The donor's name
  [optional] data        : An arbitrary string to store with the donation
{
  "status": 200,
  "data": {
    "message": "Donation saved"
  }
}

List project pledges

List of users who have pledged to take part in a specific project.

http://5050.gd/api/[api_key]/projects/[project_id]/pledges
{
  "data": [{
    "name": "Andrew Senter",
    "email": "andrew@madebymany.co.uk",
    "avatar": "http://a1.twimg.com/profile_images/1434346598/photo_normal.jpg",
    "pledged_at": "2011-08-23 09:58:54"
  },
  {
    "name": "Cath Richardson",
    "email": "cath@madebymany.co.uk",
    "avatar": "http://a1.twimg.com/profile_images/1434346598/photo_normal.jpg",
    "pledged_at": "2011-08-23 09:58:54"
  }]
}

List campaigners

List all campaigners currently running projects on 50/50.

http://5050.gd/api/[api_key]/campaigners/list
{
  "status": 200,
  "data": [{
    "id": "1",
    "name": "Made by Many",
    "description": "Make stuff, digitally",
    "location": "London, UK",
    "avatar": "http://5050.gd/images...",
    "created_at": "2011-08-23 09:58:54"
  },
  {
    "id": "2",
    "name": "Made by Many",
    "description": "Make stuff, digitally",
    "location": "London, UK",
    "avatar": "http://5050.gd/images...",
    "created_at": "2011-08-23 09:58:54"
  }]
}

Campaigner details

Show details for a specific campaigner.

http://5050.gd/api/[api_key]/campaigners/[campaigner_id]
{
  "status": 200,
  "data": {
    "id": "1",
    "name": "Made by Many",
    "description": "Make stuff, digitally",
    "location": "London, UK",
    "avatar": "http://5050.gd/images...",
    "created_at": "2011-08-23 09:58:54"
  }
}

Custom donation callbacks

If your service requires a custom callback on donation to satisfy a functional requirement that the above API can not, please contact us to discuss the implementation of a custom callback from 5050.gd to your web service.